| OLD | NEW |
| (Empty) |
| 1 // This is a generated file (see the discoveryapis_generator project). | |
| 2 | |
| 3 library googleapis.dfareporting.v2_2; | |
| 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.2'; | |
| 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.2/"}) : | |
| 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. | |
| 427 * | |
| 428 * Request parameters: | |
| 429 * | |
| 430 * [profileId] - User profile ID associated with this request. | |
| 431 * | |
| 432 * [active] - Select only active user profiles. | |
| 433 * | |
| 434 * [ids] - Select only user profiles with these IDs. | |
| 435 * | |
| 436 * [maxResults] - Maximum number of results to return. | |
| 437 * | |
| 438 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 439 * | |
| 440 * [searchString] - Allows searching for objects by name, ID or email. | |
| 441 * Wildcards (*) are allowed. For example, "user profile*2015" will return | |
| 442 * objects with names like "user profile June 2015", "user profile April | |
| 443 * 2015", or simply "user profile 2015". Most of the searches also add | |
| 444 * wildcards implicitly at the start and the end of the search string. For | |
| 445 * example, a search string of "user profile" will match objects with name "my | |
| 446 * user profile", "user profile 2015", or simply "user profile". | |
| 447 * | |
| 448 * [sortField] - Field by which to sort the list. | |
| 449 * Possible string values are: | |
| 450 * - "ID" | |
| 451 * - "NAME" | |
| 452 * | |
| 453 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 454 * Possible string values are: | |
| 455 * - "ASCENDING" | |
| 456 * - "DESCENDING" | |
| 457 * | |
| 458 * [subaccountId] - Select only user profiles with the specified subaccount | |
| 459 * ID. | |
| 460 * | |
| 461 * [userRoleId] - Select only user profiles with the specified user role ID. | |
| 462 * | |
| 463 * Completes with a [AccountUserProfilesListResponse]. | |
| 464 * | |
| 465 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 466 * error. | |
| 467 * | |
| 468 * If the used [http.Client] completes with an error when making a REST call, | |
| 469 * this method will complete with the same error. | |
| 470 */ | |
| 471 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}) { | |
| 472 var _url = null; | |
| 473 var _queryParams = new core.Map(); | |
| 474 var _uploadMedia = null; | |
| 475 var _uploadOptions = null; | |
| 476 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 477 var _body = null; | |
| 478 | |
| 479 if (profileId == null) { | |
| 480 throw new core.ArgumentError("Parameter profileId is required."); | |
| 481 } | |
| 482 if (active != null) { | |
| 483 _queryParams["active"] = ["${active}"]; | |
| 484 } | |
| 485 if (ids != null) { | |
| 486 _queryParams["ids"] = ids; | |
| 487 } | |
| 488 if (maxResults != null) { | |
| 489 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 490 } | |
| 491 if (pageToken != null) { | |
| 492 _queryParams["pageToken"] = [pageToken]; | |
| 493 } | |
| 494 if (searchString != null) { | |
| 495 _queryParams["searchString"] = [searchString]; | |
| 496 } | |
| 497 if (sortField != null) { | |
| 498 _queryParams["sortField"] = [sortField]; | |
| 499 } | |
| 500 if (sortOrder != null) { | |
| 501 _queryParams["sortOrder"] = [sortOrder]; | |
| 502 } | |
| 503 if (subaccountId != null) { | |
| 504 _queryParams["subaccountId"] = [subaccountId]; | |
| 505 } | |
| 506 if (userRoleId != null) { | |
| 507 _queryParams["userRoleId"] = [userRoleId]; | |
| 508 } | |
| 509 | |
| 510 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/acc
ountUserProfiles'; | |
| 511 | |
| 512 var _response = _requester.request(_url, | |
| 513 "GET", | |
| 514 body: _body, | |
| 515 queryParams: _queryParams, | |
| 516 uploadOptions: _uploadOptions, | |
| 517 uploadMedia: _uploadMedia, | |
| 518 downloadOptions: _downloadOptions); | |
| 519 return _response.then((data) => new AccountUserProfilesListResponse.fromJson
(data)); | |
| 520 } | |
| 521 | |
| 522 /** | |
| 523 * Updates an existing account user profile. This method supports patch | |
| 524 * semantics. | |
| 525 * | |
| 526 * [request] - The metadata request object. | |
| 527 * | |
| 528 * Request parameters: | |
| 529 * | |
| 530 * [profileId] - User profile ID associated with this request. | |
| 531 * | |
| 532 * [id] - User profile ID. | |
| 533 * | |
| 534 * Completes with a [AccountUserProfile]. | |
| 535 * | |
| 536 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 537 * error. | |
| 538 * | |
| 539 * If the used [http.Client] completes with an error when making a REST call, | |
| 540 * this method will complete with the same error. | |
| 541 */ | |
| 542 async.Future<AccountUserProfile> patch(AccountUserProfile request, core.String
profileId, core.String id) { | |
| 543 var _url = null; | |
| 544 var _queryParams = new core.Map(); | |
| 545 var _uploadMedia = null; | |
| 546 var _uploadOptions = null; | |
| 547 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 548 var _body = null; | |
| 549 | |
| 550 if (request != null) { | |
| 551 _body = convert.JSON.encode((request).toJson()); | |
| 552 } | |
| 553 if (profileId == null) { | |
| 554 throw new core.ArgumentError("Parameter profileId is required."); | |
| 555 } | |
| 556 if (id == null) { | |
| 557 throw new core.ArgumentError("Parameter id is required."); | |
| 558 } | |
| 559 _queryParams["id"] = [id]; | |
| 560 | |
| 561 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/acc
ountUserProfiles'; | |
| 562 | |
| 563 var _response = _requester.request(_url, | |
| 564 "PATCH", | |
| 565 body: _body, | |
| 566 queryParams: _queryParams, | |
| 567 uploadOptions: _uploadOptions, | |
| 568 uploadMedia: _uploadMedia, | |
| 569 downloadOptions: _downloadOptions); | |
| 570 return _response.then((data) => new AccountUserProfile.fromJson(data)); | |
| 571 } | |
| 572 | |
| 573 /** | |
| 574 * Updates an existing account user profile. | |
| 575 * | |
| 576 * [request] - The metadata request object. | |
| 577 * | |
| 578 * Request parameters: | |
| 579 * | |
| 580 * [profileId] - User profile ID associated with this request. | |
| 581 * | |
| 582 * Completes with a [AccountUserProfile]. | |
| 583 * | |
| 584 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 585 * error. | |
| 586 * | |
| 587 * If the used [http.Client] completes with an error when making a REST call, | |
| 588 * this method will complete with the same error. | |
| 589 */ | |
| 590 async.Future<AccountUserProfile> update(AccountUserProfile request, core.Strin
g profileId) { | |
| 591 var _url = null; | |
| 592 var _queryParams = new core.Map(); | |
| 593 var _uploadMedia = null; | |
| 594 var _uploadOptions = null; | |
| 595 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 596 var _body = null; | |
| 597 | |
| 598 if (request != null) { | |
| 599 _body = convert.JSON.encode((request).toJson()); | |
| 600 } | |
| 601 if (profileId == null) { | |
| 602 throw new core.ArgumentError("Parameter profileId is required."); | |
| 603 } | |
| 604 | |
| 605 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/acc
ountUserProfiles'; | |
| 606 | |
| 607 var _response = _requester.request(_url, | |
| 608 "PUT", | |
| 609 body: _body, | |
| 610 queryParams: _queryParams, | |
| 611 uploadOptions: _uploadOptions, | |
| 612 uploadMedia: _uploadMedia, | |
| 613 downloadOptions: _downloadOptions); | |
| 614 return _response.then((data) => new AccountUserProfile.fromJson(data)); | |
| 615 } | |
| 616 | |
| 617 } | |
| 618 | |
| 619 | |
| 620 class AccountsResourceApi { | |
| 621 final commons.ApiRequester _requester; | |
| 622 | |
| 623 AccountsResourceApi(commons.ApiRequester client) : | |
| 624 _requester = client; | |
| 625 | |
| 626 /** | |
| 627 * Gets one account by ID. | |
| 628 * | |
| 629 * Request parameters: | |
| 630 * | |
| 631 * [profileId] - User profile ID associated with this request. | |
| 632 * | |
| 633 * [id] - Account ID. | |
| 634 * | |
| 635 * Completes with a [Account]. | |
| 636 * | |
| 637 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 638 * error. | |
| 639 * | |
| 640 * If the used [http.Client] completes with an error when making a REST call, | |
| 641 * this method will complete with the same error. | |
| 642 */ | |
| 643 async.Future<Account> get(core.String profileId, core.String id) { | |
| 644 var _url = null; | |
| 645 var _queryParams = new core.Map(); | |
| 646 var _uploadMedia = null; | |
| 647 var _uploadOptions = null; | |
| 648 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 649 var _body = null; | |
| 650 | |
| 651 if (profileId == null) { | |
| 652 throw new core.ArgumentError("Parameter profileId is required."); | |
| 653 } | |
| 654 if (id == null) { | |
| 655 throw new core.ArgumentError("Parameter id is required."); | |
| 656 } | |
| 657 | |
| 658 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/acc
ounts/' + commons.Escaper.ecapeVariable('$id'); | |
| 659 | |
| 660 var _response = _requester.request(_url, | |
| 661 "GET", | |
| 662 body: _body, | |
| 663 queryParams: _queryParams, | |
| 664 uploadOptions: _uploadOptions, | |
| 665 uploadMedia: _uploadMedia, | |
| 666 downloadOptions: _downloadOptions); | |
| 667 return _response.then((data) => new Account.fromJson(data)); | |
| 668 } | |
| 669 | |
| 670 /** | |
| 671 * Retrieves the list of accounts, possibly filtered. | |
| 672 * | |
| 673 * Request parameters: | |
| 674 * | |
| 675 * [profileId] - User profile ID associated with this request. | |
| 676 * | |
| 677 * [active] - Select only active accounts. Don't set this field to select both | |
| 678 * active and non-active accounts. | |
| 679 * | |
| 680 * [ids] - Select only accounts with these IDs. | |
| 681 * | |
| 682 * [maxResults] - Maximum number of results to return. | |
| 683 * | |
| 684 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 685 * | |
| 686 * [searchString] - Allows searching for objects by name or ID. Wildcards (*) | |
| 687 * are allowed. For example, "account*2015" will return objects with names | |
| 688 * like "account June 2015", "account April 2015", or simply "account 2015". | |
| 689 * Most of the searches also add wildcards implicitly at the start and the end | |
| 690 * of the search string. For example, a search string of "account" will match | |
| 691 * objects with name "my account", "account 2015", or simply "account". | |
| 692 * | |
| 693 * [sortField] - Field by which to sort the list. | |
| 694 * Possible string values are: | |
| 695 * - "ID" | |
| 696 * - "NAME" | |
| 697 * | |
| 698 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 699 * Possible string values are: | |
| 700 * - "ASCENDING" | |
| 701 * - "DESCENDING" | |
| 702 * | |
| 703 * Completes with a [AccountsListResponse]. | |
| 704 * | |
| 705 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 706 * error. | |
| 707 * | |
| 708 * If the used [http.Client] completes with an error when making a REST call, | |
| 709 * this method will complete with the same error. | |
| 710 */ | |
| 711 async.Future<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}) { | |
| 712 var _url = null; | |
| 713 var _queryParams = new core.Map(); | |
| 714 var _uploadMedia = null; | |
| 715 var _uploadOptions = null; | |
| 716 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 717 var _body = null; | |
| 718 | |
| 719 if (profileId == null) { | |
| 720 throw new core.ArgumentError("Parameter profileId is required."); | |
| 721 } | |
| 722 if (active != null) { | |
| 723 _queryParams["active"] = ["${active}"]; | |
| 724 } | |
| 725 if (ids != null) { | |
| 726 _queryParams["ids"] = ids; | |
| 727 } | |
| 728 if (maxResults != null) { | |
| 729 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 730 } | |
| 731 if (pageToken != null) { | |
| 732 _queryParams["pageToken"] = [pageToken]; | |
| 733 } | |
| 734 if (searchString != null) { | |
| 735 _queryParams["searchString"] = [searchString]; | |
| 736 } | |
| 737 if (sortField != null) { | |
| 738 _queryParams["sortField"] = [sortField]; | |
| 739 } | |
| 740 if (sortOrder != null) { | |
| 741 _queryParams["sortOrder"] = [sortOrder]; | |
| 742 } | |
| 743 | |
| 744 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/acc
ounts'; | |
| 745 | |
| 746 var _response = _requester.request(_url, | |
| 747 "GET", | |
| 748 body: _body, | |
| 749 queryParams: _queryParams, | |
| 750 uploadOptions: _uploadOptions, | |
| 751 uploadMedia: _uploadMedia, | |
| 752 downloadOptions: _downloadOptions); | |
| 753 return _response.then((data) => new AccountsListResponse.fromJson(data)); | |
| 754 } | |
| 755 | |
| 756 /** | |
| 757 * Updates an existing account. This method supports patch semantics. | |
| 758 * | |
| 759 * [request] - The metadata request object. | |
| 760 * | |
| 761 * Request parameters: | |
| 762 * | |
| 763 * [profileId] - User profile ID associated with this request. | |
| 764 * | |
| 765 * [id] - Account ID. | |
| 766 * | |
| 767 * Completes with a [Account]. | |
| 768 * | |
| 769 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 770 * error. | |
| 771 * | |
| 772 * If the used [http.Client] completes with an error when making a REST call, | |
| 773 * this method will complete with the same error. | |
| 774 */ | |
| 775 async.Future<Account> patch(Account request, core.String profileId, core.Strin
g id) { | |
| 776 var _url = null; | |
| 777 var _queryParams = new core.Map(); | |
| 778 var _uploadMedia = null; | |
| 779 var _uploadOptions = null; | |
| 780 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 781 var _body = null; | |
| 782 | |
| 783 if (request != null) { | |
| 784 _body = convert.JSON.encode((request).toJson()); | |
| 785 } | |
| 786 if (profileId == null) { | |
| 787 throw new core.ArgumentError("Parameter profileId is required."); | |
| 788 } | |
| 789 if (id == null) { | |
| 790 throw new core.ArgumentError("Parameter id is required."); | |
| 791 } | |
| 792 _queryParams["id"] = [id]; | |
| 793 | |
| 794 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/acc
ounts'; | |
| 795 | |
| 796 var _response = _requester.request(_url, | |
| 797 "PATCH", | |
| 798 body: _body, | |
| 799 queryParams: _queryParams, | |
| 800 uploadOptions: _uploadOptions, | |
| 801 uploadMedia: _uploadMedia, | |
| 802 downloadOptions: _downloadOptions); | |
| 803 return _response.then((data) => new Account.fromJson(data)); | |
| 804 } | |
| 805 | |
| 806 /** | |
| 807 * Updates an existing account. | |
| 808 * | |
| 809 * [request] - The metadata request object. | |
| 810 * | |
| 811 * Request parameters: | |
| 812 * | |
| 813 * [profileId] - User profile ID associated with this request. | |
| 814 * | |
| 815 * Completes with a [Account]. | |
| 816 * | |
| 817 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 818 * error. | |
| 819 * | |
| 820 * If the used [http.Client] completes with an error when making a REST call, | |
| 821 * this method will complete with the same error. | |
| 822 */ | |
| 823 async.Future<Account> update(Account request, core.String profileId) { | |
| 824 var _url = null; | |
| 825 var _queryParams = new core.Map(); | |
| 826 var _uploadMedia = null; | |
| 827 var _uploadOptions = null; | |
| 828 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 829 var _body = null; | |
| 830 | |
| 831 if (request != null) { | |
| 832 _body = convert.JSON.encode((request).toJson()); | |
| 833 } | |
| 834 if (profileId == null) { | |
| 835 throw new core.ArgumentError("Parameter profileId is required."); | |
| 836 } | |
| 837 | |
| 838 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/acc
ounts'; | |
| 839 | |
| 840 var _response = _requester.request(_url, | |
| 841 "PUT", | |
| 842 body: _body, | |
| 843 queryParams: _queryParams, | |
| 844 uploadOptions: _uploadOptions, | |
| 845 uploadMedia: _uploadMedia, | |
| 846 downloadOptions: _downloadOptions); | |
| 847 return _response.then((data) => new Account.fromJson(data)); | |
| 848 } | |
| 849 | |
| 850 } | |
| 851 | |
| 852 | |
| 853 class AdsResourceApi { | |
| 854 final commons.ApiRequester _requester; | |
| 855 | |
| 856 AdsResourceApi(commons.ApiRequester client) : | |
| 857 _requester = client; | |
| 858 | |
| 859 /** | |
| 860 * Gets one ad by ID. | |
| 861 * | |
| 862 * Request parameters: | |
| 863 * | |
| 864 * [profileId] - User profile ID associated with this request. | |
| 865 * | |
| 866 * [id] - Ad ID. | |
| 867 * | |
| 868 * Completes with a [Ad]. | |
| 869 * | |
| 870 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 871 * error. | |
| 872 * | |
| 873 * If the used [http.Client] completes with an error when making a REST call, | |
| 874 * this method will complete with the same error. | |
| 875 */ | |
| 876 async.Future<Ad> get(core.String profileId, core.String id) { | |
| 877 var _url = null; | |
| 878 var _queryParams = new core.Map(); | |
| 879 var _uploadMedia = null; | |
| 880 var _uploadOptions = null; | |
| 881 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 882 var _body = null; | |
| 883 | |
| 884 if (profileId == null) { | |
| 885 throw new core.ArgumentError("Parameter profileId is required."); | |
| 886 } | |
| 887 if (id == null) { | |
| 888 throw new core.ArgumentError("Parameter id is required."); | |
| 889 } | |
| 890 | |
| 891 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/ads
/' + commons.Escaper.ecapeVariable('$id'); | |
| 892 | |
| 893 var _response = _requester.request(_url, | |
| 894 "GET", | |
| 895 body: _body, | |
| 896 queryParams: _queryParams, | |
| 897 uploadOptions: _uploadOptions, | |
| 898 uploadMedia: _uploadMedia, | |
| 899 downloadOptions: _downloadOptions); | |
| 900 return _response.then((data) => new Ad.fromJson(data)); | |
| 901 } | |
| 902 | |
| 903 /** | |
| 904 * Inserts a new ad. | |
| 905 * | |
| 906 * [request] - The metadata request object. | |
| 907 * | |
| 908 * Request parameters: | |
| 909 * | |
| 910 * [profileId] - User profile ID associated with this request. | |
| 911 * | |
| 912 * Completes with a [Ad]. | |
| 913 * | |
| 914 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 915 * error. | |
| 916 * | |
| 917 * If the used [http.Client] completes with an error when making a REST call, | |
| 918 * this method will complete with the same error. | |
| 919 */ | |
| 920 async.Future<Ad> insert(Ad request, core.String profileId) { | |
| 921 var _url = null; | |
| 922 var _queryParams = new core.Map(); | |
| 923 var _uploadMedia = null; | |
| 924 var _uploadOptions = null; | |
| 925 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 926 var _body = null; | |
| 927 | |
| 928 if (request != null) { | |
| 929 _body = convert.JSON.encode((request).toJson()); | |
| 930 } | |
| 931 if (profileId == null) { | |
| 932 throw new core.ArgumentError("Parameter profileId is required."); | |
| 933 } | |
| 934 | |
| 935 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/ads
'; | |
| 936 | |
| 937 var _response = _requester.request(_url, | |
| 938 "POST", | |
| 939 body: _body, | |
| 940 queryParams: _queryParams, | |
| 941 uploadOptions: _uploadOptions, | |
| 942 uploadMedia: _uploadMedia, | |
| 943 downloadOptions: _downloadOptions); | |
| 944 return _response.then((data) => new Ad.fromJson(data)); | |
| 945 } | |
| 946 | |
| 947 /** | |
| 948 * Retrieves a list of ads, possibly filtered. | |
| 949 * | |
| 950 * Request parameters: | |
| 951 * | |
| 952 * [profileId] - User profile ID associated with this request. | |
| 953 * | |
| 954 * [active] - Select only active ads. | |
| 955 * | |
| 956 * [advertiserId] - Select only ads with this advertiser ID. | |
| 957 * | |
| 958 * [archived] - Select only archived ads. | |
| 959 * | |
| 960 * [audienceSegmentIds] - Select only ads with these audience segment IDs. | |
| 961 * | |
| 962 * [campaignIds] - Select only ads with these campaign IDs. | |
| 963 * | |
| 964 * [compatibility] - Select default ads with the specified compatibility. | |
| 965 * Applicable when type is AD_SERVING_DEFAULT_AD. WEB and WEB_INTERSTITIAL | |
| 966 * refer to rendering either on desktop or on mobile devices for regular or | |
| 967 * interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering | |
| 968 * in mobile apps. IN_STREAM_VIDEO refers to rendering an in-stream video ads | |
| 969 * developed with the VAST standard. | |
| 970 * Possible string values are: | |
| 971 * - "APP" | |
| 972 * - "APP_INTERSTITIAL" | |
| 973 * - "IN_STREAM_VIDEO" | |
| 974 * - "WEB" | |
| 975 * - "WEB_INTERSTITIAL" | |
| 976 * | |
| 977 * [creativeIds] - Select only ads with these creative IDs assigned. | |
| 978 * | |
| 979 * [creativeOptimizationConfigurationIds] - Select only ads with these | |
| 980 * creative optimization configuration IDs. | |
| 981 * | |
| 982 * [creativeType] - Select only ads with the specified creativeType. | |
| 983 * Possible string values are: | |
| 984 * - "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO" | |
| 985 * - "CUSTOM_INPAGE" | |
| 986 * - "CUSTOM_INTERSTITIAL" | |
| 987 * - "ENHANCED_BANNER" | |
| 988 * - "ENHANCED_IMAGE" | |
| 989 * - "FLASH_INPAGE" | |
| 990 * - "HTML5_BANNER" | |
| 991 * - "IMAGE" | |
| 992 * - "INSTREAM_VIDEO" | |
| 993 * - "INTERNAL_REDIRECT" | |
| 994 * - "INTERSTITIAL_INTERNAL_REDIRECT" | |
| 995 * - "REDIRECT" | |
| 996 * - "RICH_MEDIA_EXPANDING" | |
| 997 * - "RICH_MEDIA_IM_EXPAND" | |
| 998 * - "RICH_MEDIA_INPAGE" | |
| 999 * - "RICH_MEDIA_INPAGE_FLOATING" | |
| 1000 * - "RICH_MEDIA_INTERSTITIAL_FLOAT" | |
| 1001 * - "RICH_MEDIA_MOBILE_IN_APP" | |
| 1002 * - "RICH_MEDIA_MULTI_FLOATING" | |
| 1003 * - "RICH_MEDIA_PEEL_DOWN" | |
| 1004 * - "TRACKING_TEXT" | |
| 1005 * - "VAST_REDIRECT" | |
| 1006 * - "VPAID_LINEAR" | |
| 1007 * - "VPAID_NON_LINEAR" | |
| 1008 * | |
| 1009 * [dynamicClickTracker] - Select only dynamic click trackers. Applicable when | |
| 1010 * type is AD_SERVING_CLICK_TRACKER. If true, select dynamic click trackers. | |
| 1011 * If false, select static click trackers. Leave unset to select both. | |
| 1012 * | |
| 1013 * [ids] - Select only ads with these IDs. | |
| 1014 * | |
| 1015 * [landingPageIds] - Select only ads with these landing page IDs. | |
| 1016 * | |
| 1017 * [maxResults] - Maximum number of results to return. | |
| 1018 * | |
| 1019 * [overriddenEventTagId] - Select only ads with this event tag override ID. | |
| 1020 * | |
| 1021 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 1022 * | |
| 1023 * [placementIds] - Select only ads with these placement IDs assigned. | |
| 1024 * | |
| 1025 * [remarketingListIds] - Select only ads whose list targeting expression use | |
| 1026 * these remarketing list IDs. | |
| 1027 * | |
| 1028 * [searchString] - Allows searching for objects by name or ID. Wildcards (*) | |
| 1029 * are allowed. For example, "ad*2015" will return objects with names like "ad | |
| 1030 * June 2015", "ad April 2015", or simply "ad 2015". Most of the searches also | |
| 1031 * add wildcards implicitly at the start and the end of the search string. For | |
| 1032 * example, a search string of "ad" will match objects with name "my ad", "ad | |
| 1033 * 2015", or simply "ad". | |
| 1034 * | |
| 1035 * [sizeIds] - Select only ads with these size IDs. | |
| 1036 * | |
| 1037 * [sortField] - Field by which to sort the list. | |
| 1038 * Possible string values are: | |
| 1039 * - "ID" | |
| 1040 * - "NAME" | |
| 1041 * | |
| 1042 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 1043 * Possible string values are: | |
| 1044 * - "ASCENDING" | |
| 1045 * - "DESCENDING" | |
| 1046 * | |
| 1047 * [sslCompliant] - Select only ads that are SSL-compliant. | |
| 1048 * | |
| 1049 * [sslRequired] - Select only ads that require SSL. | |
| 1050 * | |
| 1051 * [type] - Select only ads with these types. | |
| 1052 * | |
| 1053 * Completes with a [AdsListResponse]. | |
| 1054 * | |
| 1055 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 1056 * error. | |
| 1057 * | |
| 1058 * If the used [http.Client] completes with an error when making a REST call, | |
| 1059 * this method will complete with the same error. | |
| 1060 */ | |
| 1061 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}) { | |
| 1062 var _url = null; | |
| 1063 var _queryParams = new core.Map(); | |
| 1064 var _uploadMedia = null; | |
| 1065 var _uploadOptions = null; | |
| 1066 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 1067 var _body = null; | |
| 1068 | |
| 1069 if (profileId == null) { | |
| 1070 throw new core.ArgumentError("Parameter profileId is required."); | |
| 1071 } | |
| 1072 if (active != null) { | |
| 1073 _queryParams["active"] = ["${active}"]; | |
| 1074 } | |
| 1075 if (advertiserId != null) { | |
| 1076 _queryParams["advertiserId"] = [advertiserId]; | |
| 1077 } | |
| 1078 if (archived != null) { | |
| 1079 _queryParams["archived"] = ["${archived}"]; | |
| 1080 } | |
| 1081 if (audienceSegmentIds != null) { | |
| 1082 _queryParams["audienceSegmentIds"] = audienceSegmentIds; | |
| 1083 } | |
| 1084 if (campaignIds != null) { | |
| 1085 _queryParams["campaignIds"] = campaignIds; | |
| 1086 } | |
| 1087 if (compatibility != null) { | |
| 1088 _queryParams["compatibility"] = [compatibility]; | |
| 1089 } | |
| 1090 if (creativeIds != null) { | |
| 1091 _queryParams["creativeIds"] = creativeIds; | |
| 1092 } | |
| 1093 if (creativeOptimizationConfigurationIds != null) { | |
| 1094 _queryParams["creativeOptimizationConfigurationIds"] = creativeOptimizatio
nConfigurationIds; | |
| 1095 } | |
| 1096 if (creativeType != null) { | |
| 1097 _queryParams["creativeType"] = [creativeType]; | |
| 1098 } | |
| 1099 if (dynamicClickTracker != null) { | |
| 1100 _queryParams["dynamicClickTracker"] = ["${dynamicClickTracker}"]; | |
| 1101 } | |
| 1102 if (ids != null) { | |
| 1103 _queryParams["ids"] = ids; | |
| 1104 } | |
| 1105 if (landingPageIds != null) { | |
| 1106 _queryParams["landingPageIds"] = landingPageIds; | |
| 1107 } | |
| 1108 if (maxResults != null) { | |
| 1109 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 1110 } | |
| 1111 if (overriddenEventTagId != null) { | |
| 1112 _queryParams["overriddenEventTagId"] = [overriddenEventTagId]; | |
| 1113 } | |
| 1114 if (pageToken != null) { | |
| 1115 _queryParams["pageToken"] = [pageToken]; | |
| 1116 } | |
| 1117 if (placementIds != null) { | |
| 1118 _queryParams["placementIds"] = placementIds; | |
| 1119 } | |
| 1120 if (remarketingListIds != null) { | |
| 1121 _queryParams["remarketingListIds"] = remarketingListIds; | |
| 1122 } | |
| 1123 if (searchString != null) { | |
| 1124 _queryParams["searchString"] = [searchString]; | |
| 1125 } | |
| 1126 if (sizeIds != null) { | |
| 1127 _queryParams["sizeIds"] = sizeIds; | |
| 1128 } | |
| 1129 if (sortField != null) { | |
| 1130 _queryParams["sortField"] = [sortField]; | |
| 1131 } | |
| 1132 if (sortOrder != null) { | |
| 1133 _queryParams["sortOrder"] = [sortOrder]; | |
| 1134 } | |
| 1135 if (sslCompliant != null) { | |
| 1136 _queryParams["sslCompliant"] = ["${sslCompliant}"]; | |
| 1137 } | |
| 1138 if (sslRequired != null) { | |
| 1139 _queryParams["sslRequired"] = ["${sslRequired}"]; | |
| 1140 } | |
| 1141 if (type != null) { | |
| 1142 _queryParams["type"] = type; | |
| 1143 } | |
| 1144 | |
| 1145 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/ads
'; | |
| 1146 | |
| 1147 var _response = _requester.request(_url, | |
| 1148 "GET", | |
| 1149 body: _body, | |
| 1150 queryParams: _queryParams, | |
| 1151 uploadOptions: _uploadOptions, | |
| 1152 uploadMedia: _uploadMedia, | |
| 1153 downloadOptions: _downloadOptions); | |
| 1154 return _response.then((data) => new AdsListResponse.fromJson(data)); | |
| 1155 } | |
| 1156 | |
| 1157 /** | |
| 1158 * Updates an existing ad. This method supports patch semantics. | |
| 1159 * | |
| 1160 * [request] - The metadata request object. | |
| 1161 * | |
| 1162 * Request parameters: | |
| 1163 * | |
| 1164 * [profileId] - User profile ID associated with this request. | |
| 1165 * | |
| 1166 * [id] - Ad ID. | |
| 1167 * | |
| 1168 * Completes with a [Ad]. | |
| 1169 * | |
| 1170 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 1171 * error. | |
| 1172 * | |
| 1173 * If the used [http.Client] completes with an error when making a REST call, | |
| 1174 * this method will complete with the same error. | |
| 1175 */ | |
| 1176 async.Future<Ad> patch(Ad request, core.String profileId, core.String id) { | |
| 1177 var _url = null; | |
| 1178 var _queryParams = new core.Map(); | |
| 1179 var _uploadMedia = null; | |
| 1180 var _uploadOptions = null; | |
| 1181 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 1182 var _body = null; | |
| 1183 | |
| 1184 if (request != null) { | |
| 1185 _body = convert.JSON.encode((request).toJson()); | |
| 1186 } | |
| 1187 if (profileId == null) { | |
| 1188 throw new core.ArgumentError("Parameter profileId is required."); | |
| 1189 } | |
| 1190 if (id == null) { | |
| 1191 throw new core.ArgumentError("Parameter id is required."); | |
| 1192 } | |
| 1193 _queryParams["id"] = [id]; | |
| 1194 | |
| 1195 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/ads
'; | |
| 1196 | |
| 1197 var _response = _requester.request(_url, | |
| 1198 "PATCH", | |
| 1199 body: _body, | |
| 1200 queryParams: _queryParams, | |
| 1201 uploadOptions: _uploadOptions, | |
| 1202 uploadMedia: _uploadMedia, | |
| 1203 downloadOptions: _downloadOptions); | |
| 1204 return _response.then((data) => new Ad.fromJson(data)); | |
| 1205 } | |
| 1206 | |
| 1207 /** | |
| 1208 * Updates an existing ad. | |
| 1209 * | |
| 1210 * [request] - The metadata request object. | |
| 1211 * | |
| 1212 * Request parameters: | |
| 1213 * | |
| 1214 * [profileId] - User profile ID associated with this request. | |
| 1215 * | |
| 1216 * Completes with a [Ad]. | |
| 1217 * | |
| 1218 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 1219 * error. | |
| 1220 * | |
| 1221 * If the used [http.Client] completes with an error when making a REST call, | |
| 1222 * this method will complete with the same error. | |
| 1223 */ | |
| 1224 async.Future<Ad> update(Ad request, core.String profileId) { | |
| 1225 var _url = null; | |
| 1226 var _queryParams = new core.Map(); | |
| 1227 var _uploadMedia = null; | |
| 1228 var _uploadOptions = null; | |
| 1229 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 1230 var _body = null; | |
| 1231 | |
| 1232 if (request != null) { | |
| 1233 _body = convert.JSON.encode((request).toJson()); | |
| 1234 } | |
| 1235 if (profileId == null) { | |
| 1236 throw new core.ArgumentError("Parameter profileId is required."); | |
| 1237 } | |
| 1238 | |
| 1239 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/ads
'; | |
| 1240 | |
| 1241 var _response = _requester.request(_url, | |
| 1242 "PUT", | |
| 1243 body: _body, | |
| 1244 queryParams: _queryParams, | |
| 1245 uploadOptions: _uploadOptions, | |
| 1246 uploadMedia: _uploadMedia, | |
| 1247 downloadOptions: _downloadOptions); | |
| 1248 return _response.then((data) => new Ad.fromJson(data)); | |
| 1249 } | |
| 1250 | |
| 1251 } | |
| 1252 | |
| 1253 | |
| 1254 class AdvertiserGroupsResourceApi { | |
| 1255 final commons.ApiRequester _requester; | |
| 1256 | |
| 1257 AdvertiserGroupsResourceApi(commons.ApiRequester client) : | |
| 1258 _requester = client; | |
| 1259 | |
| 1260 /** | |
| 1261 * Deletes an existing advertiser group. | |
| 1262 * | |
| 1263 * Request parameters: | |
| 1264 * | |
| 1265 * [profileId] - User profile ID associated with this request. | |
| 1266 * | |
| 1267 * [id] - Advertiser group ID. | |
| 1268 * | |
| 1269 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 1270 * error. | |
| 1271 * | |
| 1272 * If the used [http.Client] completes with an error when making a REST call, | |
| 1273 * this method will complete with the same error. | |
| 1274 */ | |
| 1275 async.Future delete(core.String profileId, core.String id) { | |
| 1276 var _url = null; | |
| 1277 var _queryParams = new core.Map(); | |
| 1278 var _uploadMedia = null; | |
| 1279 var _uploadOptions = null; | |
| 1280 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 1281 var _body = null; | |
| 1282 | |
| 1283 if (profileId == null) { | |
| 1284 throw new core.ArgumentError("Parameter profileId is required."); | |
| 1285 } | |
| 1286 if (id == null) { | |
| 1287 throw new core.ArgumentError("Parameter id is required."); | |
| 1288 } | |
| 1289 | |
| 1290 _downloadOptions = null; | |
| 1291 | |
| 1292 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/adv
ertiserGroups/' + commons.Escaper.ecapeVariable('$id'); | |
| 1293 | |
| 1294 var _response = _requester.request(_url, | |
| 1295 "DELETE", | |
| 1296 body: _body, | |
| 1297 queryParams: _queryParams, | |
| 1298 uploadOptions: _uploadOptions, | |
| 1299 uploadMedia: _uploadMedia, | |
| 1300 downloadOptions: _downloadOptions); | |
| 1301 return _response.then((data) => null); | |
| 1302 } | |
| 1303 | |
| 1304 /** | |
| 1305 * Gets one advertiser group by ID. | |
| 1306 * | |
| 1307 * Request parameters: | |
| 1308 * | |
| 1309 * [profileId] - User profile ID associated with this request. | |
| 1310 * | |
| 1311 * [id] - Advertiser group ID. | |
| 1312 * | |
| 1313 * Completes with a [AdvertiserGroup]. | |
| 1314 * | |
| 1315 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 1316 * error. | |
| 1317 * | |
| 1318 * If the used [http.Client] completes with an error when making a REST call, | |
| 1319 * this method will complete with the same error. | |
| 1320 */ | |
| 1321 async.Future<AdvertiserGroup> get(core.String profileId, core.String id) { | |
| 1322 var _url = null; | |
| 1323 var _queryParams = new core.Map(); | |
| 1324 var _uploadMedia = null; | |
| 1325 var _uploadOptions = null; | |
| 1326 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 1327 var _body = null; | |
| 1328 | |
| 1329 if (profileId == null) { | |
| 1330 throw new core.ArgumentError("Parameter profileId is required."); | |
| 1331 } | |
| 1332 if (id == null) { | |
| 1333 throw new core.ArgumentError("Parameter id is required."); | |
| 1334 } | |
| 1335 | |
| 1336 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/adv
ertiserGroups/' + commons.Escaper.ecapeVariable('$id'); | |
| 1337 | |
| 1338 var _response = _requester.request(_url, | |
| 1339 "GET", | |
| 1340 body: _body, | |
| 1341 queryParams: _queryParams, | |
| 1342 uploadOptions: _uploadOptions, | |
| 1343 uploadMedia: _uploadMedia, | |
| 1344 downloadOptions: _downloadOptions); | |
| 1345 return _response.then((data) => new AdvertiserGroup.fromJson(data)); | |
| 1346 } | |
| 1347 | |
| 1348 /** | |
| 1349 * Inserts a new advertiser group. | |
| 1350 * | |
| 1351 * [request] - The metadata request object. | |
| 1352 * | |
| 1353 * Request parameters: | |
| 1354 * | |
| 1355 * [profileId] - User profile ID associated with this request. | |
| 1356 * | |
| 1357 * Completes with a [AdvertiserGroup]. | |
| 1358 * | |
| 1359 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 1360 * error. | |
| 1361 * | |
| 1362 * If the used [http.Client] completes with an error when making a REST call, | |
| 1363 * this method will complete with the same error. | |
| 1364 */ | |
| 1365 async.Future<AdvertiserGroup> insert(AdvertiserGroup request, core.String prof
ileId) { | |
| 1366 var _url = null; | |
| 1367 var _queryParams = new core.Map(); | |
| 1368 var _uploadMedia = null; | |
| 1369 var _uploadOptions = null; | |
| 1370 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 1371 var _body = null; | |
| 1372 | |
| 1373 if (request != null) { | |
| 1374 _body = convert.JSON.encode((request).toJson()); | |
| 1375 } | |
| 1376 if (profileId == null) { | |
| 1377 throw new core.ArgumentError("Parameter profileId is required."); | |
| 1378 } | |
| 1379 | |
| 1380 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/adv
ertiserGroups'; | |
| 1381 | |
| 1382 var _response = _requester.request(_url, | |
| 1383 "POST", | |
| 1384 body: _body, | |
| 1385 queryParams: _queryParams, | |
| 1386 uploadOptions: _uploadOptions, | |
| 1387 uploadMedia: _uploadMedia, | |
| 1388 downloadOptions: _downloadOptions); | |
| 1389 return _response.then((data) => new AdvertiserGroup.fromJson(data)); | |
| 1390 } | |
| 1391 | |
| 1392 /** | |
| 1393 * Retrieves a list of advertiser groups, possibly filtered. | |
| 1394 * | |
| 1395 * Request parameters: | |
| 1396 * | |
| 1397 * [profileId] - User profile ID associated with this request. | |
| 1398 * | |
| 1399 * [ids] - Select only advertiser groups with these IDs. | |
| 1400 * | |
| 1401 * [maxResults] - Maximum number of results to return. | |
| 1402 * | |
| 1403 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 1404 * | |
| 1405 * [searchString] - Allows searching for objects by name or ID. Wildcards (*) | |
| 1406 * are allowed. For example, "advertiser*2015" will return objects with names | |
| 1407 * like "advertiser group June 2015", "advertiser group April 2015", or simply | |
| 1408 * "advertiser group 2015". Most of the searches also add wildcards implicitly | |
| 1409 * at the start and the end of the search string. For example, a search string | |
| 1410 * of "advertisergroup" will match objects with name "my advertisergroup", | |
| 1411 * "advertisergroup 2015", or simply "advertisergroup". | |
| 1412 * | |
| 1413 * [sortField] - Field by which to sort the list. | |
| 1414 * Possible string values are: | |
| 1415 * - "ID" | |
| 1416 * - "NAME" | |
| 1417 * | |
| 1418 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 1419 * Possible string values are: | |
| 1420 * - "ASCENDING" | |
| 1421 * - "DESCENDING" | |
| 1422 * | |
| 1423 * Completes with a [AdvertiserGroupsListResponse]. | |
| 1424 * | |
| 1425 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 1426 * error. | |
| 1427 * | |
| 1428 * If the used [http.Client] completes with an error when making a REST call, | |
| 1429 * this method will complete with the same error. | |
| 1430 */ | |
| 1431 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}) { | |
| 1432 var _url = null; | |
| 1433 var _queryParams = new core.Map(); | |
| 1434 var _uploadMedia = null; | |
| 1435 var _uploadOptions = null; | |
| 1436 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 1437 var _body = null; | |
| 1438 | |
| 1439 if (profileId == null) { | |
| 1440 throw new core.ArgumentError("Parameter profileId is required."); | |
| 1441 } | |
| 1442 if (ids != null) { | |
| 1443 _queryParams["ids"] = ids; | |
| 1444 } | |
| 1445 if (maxResults != null) { | |
| 1446 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 1447 } | |
| 1448 if (pageToken != null) { | |
| 1449 _queryParams["pageToken"] = [pageToken]; | |
| 1450 } | |
| 1451 if (searchString != null) { | |
| 1452 _queryParams["searchString"] = [searchString]; | |
| 1453 } | |
| 1454 if (sortField != null) { | |
| 1455 _queryParams["sortField"] = [sortField]; | |
| 1456 } | |
| 1457 if (sortOrder != null) { | |
| 1458 _queryParams["sortOrder"] = [sortOrder]; | |
| 1459 } | |
| 1460 | |
| 1461 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/adv
ertiserGroups'; | |
| 1462 | |
| 1463 var _response = _requester.request(_url, | |
| 1464 "GET", | |
| 1465 body: _body, | |
| 1466 queryParams: _queryParams, | |
| 1467 uploadOptions: _uploadOptions, | |
| 1468 uploadMedia: _uploadMedia, | |
| 1469 downloadOptions: _downloadOptions); | |
| 1470 return _response.then((data) => new AdvertiserGroupsListResponse.fromJson(da
ta)); | |
| 1471 } | |
| 1472 | |
| 1473 /** | |
| 1474 * Updates an existing advertiser group. This method supports patch semantics. | |
| 1475 * | |
| 1476 * [request] - The metadata request object. | |
| 1477 * | |
| 1478 * Request parameters: | |
| 1479 * | |
| 1480 * [profileId] - User profile ID associated with this request. | |
| 1481 * | |
| 1482 * [id] - Advertiser group ID. | |
| 1483 * | |
| 1484 * Completes with a [AdvertiserGroup]. | |
| 1485 * | |
| 1486 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 1487 * error. | |
| 1488 * | |
| 1489 * If the used [http.Client] completes with an error when making a REST call, | |
| 1490 * this method will complete with the same error. | |
| 1491 */ | |
| 1492 async.Future<AdvertiserGroup> patch(AdvertiserGroup request, core.String profi
leId, core.String id) { | |
| 1493 var _url = null; | |
| 1494 var _queryParams = new core.Map(); | |
| 1495 var _uploadMedia = null; | |
| 1496 var _uploadOptions = null; | |
| 1497 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 1498 var _body = null; | |
| 1499 | |
| 1500 if (request != null) { | |
| 1501 _body = convert.JSON.encode((request).toJson()); | |
| 1502 } | |
| 1503 if (profileId == null) { | |
| 1504 throw new core.ArgumentError("Parameter profileId is required."); | |
| 1505 } | |
| 1506 if (id == null) { | |
| 1507 throw new core.ArgumentError("Parameter id is required."); | |
| 1508 } | |
| 1509 _queryParams["id"] = [id]; | |
| 1510 | |
| 1511 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/adv
ertiserGroups'; | |
| 1512 | |
| 1513 var _response = _requester.request(_url, | |
| 1514 "PATCH", | |
| 1515 body: _body, | |
| 1516 queryParams: _queryParams, | |
| 1517 uploadOptions: _uploadOptions, | |
| 1518 uploadMedia: _uploadMedia, | |
| 1519 downloadOptions: _downloadOptions); | |
| 1520 return _response.then((data) => new AdvertiserGroup.fromJson(data)); | |
| 1521 } | |
| 1522 | |
| 1523 /** | |
| 1524 * Updates an existing advertiser group. | |
| 1525 * | |
| 1526 * [request] - The metadata request object. | |
| 1527 * | |
| 1528 * Request parameters: | |
| 1529 * | |
| 1530 * [profileId] - User profile ID associated with this request. | |
| 1531 * | |
| 1532 * Completes with a [AdvertiserGroup]. | |
| 1533 * | |
| 1534 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 1535 * error. | |
| 1536 * | |
| 1537 * If the used [http.Client] completes with an error when making a REST call, | |
| 1538 * this method will complete with the same error. | |
| 1539 */ | |
| 1540 async.Future<AdvertiserGroup> update(AdvertiserGroup request, core.String prof
ileId) { | |
| 1541 var _url = null; | |
| 1542 var _queryParams = new core.Map(); | |
| 1543 var _uploadMedia = null; | |
| 1544 var _uploadOptions = null; | |
| 1545 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 1546 var _body = null; | |
| 1547 | |
| 1548 if (request != null) { | |
| 1549 _body = convert.JSON.encode((request).toJson()); | |
| 1550 } | |
| 1551 if (profileId == null) { | |
| 1552 throw new core.ArgumentError("Parameter profileId is required."); | |
| 1553 } | |
| 1554 | |
| 1555 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/adv
ertiserGroups'; | |
| 1556 | |
| 1557 var _response = _requester.request(_url, | |
| 1558 "PUT", | |
| 1559 body: _body, | |
| 1560 queryParams: _queryParams, | |
| 1561 uploadOptions: _uploadOptions, | |
| 1562 uploadMedia: _uploadMedia, | |
| 1563 downloadOptions: _downloadOptions); | |
| 1564 return _response.then((data) => new AdvertiserGroup.fromJson(data)); | |
| 1565 } | |
| 1566 | |
| 1567 } | |
| 1568 | |
| 1569 | |
| 1570 class AdvertisersResourceApi { | |
| 1571 final commons.ApiRequester _requester; | |
| 1572 | |
| 1573 AdvertisersResourceApi(commons.ApiRequester client) : | |
| 1574 _requester = client; | |
| 1575 | |
| 1576 /** | |
| 1577 * Gets one advertiser by ID. | |
| 1578 * | |
| 1579 * Request parameters: | |
| 1580 * | |
| 1581 * [profileId] - User profile ID associated with this request. | |
| 1582 * | |
| 1583 * [id] - Advertiser ID. | |
| 1584 * | |
| 1585 * Completes with a [Advertiser]. | |
| 1586 * | |
| 1587 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 1588 * error. | |
| 1589 * | |
| 1590 * If the used [http.Client] completes with an error when making a REST call, | |
| 1591 * this method will complete with the same error. | |
| 1592 */ | |
| 1593 async.Future<Advertiser> get(core.String profileId, core.String id) { | |
| 1594 var _url = null; | |
| 1595 var _queryParams = new core.Map(); | |
| 1596 var _uploadMedia = null; | |
| 1597 var _uploadOptions = null; | |
| 1598 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 1599 var _body = null; | |
| 1600 | |
| 1601 if (profileId == null) { | |
| 1602 throw new core.ArgumentError("Parameter profileId is required."); | |
| 1603 } | |
| 1604 if (id == null) { | |
| 1605 throw new core.ArgumentError("Parameter id is required."); | |
| 1606 } | |
| 1607 | |
| 1608 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/adv
ertisers/' + commons.Escaper.ecapeVariable('$id'); | |
| 1609 | |
| 1610 var _response = _requester.request(_url, | |
| 1611 "GET", | |
| 1612 body: _body, | |
| 1613 queryParams: _queryParams, | |
| 1614 uploadOptions: _uploadOptions, | |
| 1615 uploadMedia: _uploadMedia, | |
| 1616 downloadOptions: _downloadOptions); | |
| 1617 return _response.then((data) => new Advertiser.fromJson(data)); | |
| 1618 } | |
| 1619 | |
| 1620 /** | |
| 1621 * Inserts a new advertiser. | |
| 1622 * | |
| 1623 * [request] - The metadata request object. | |
| 1624 * | |
| 1625 * Request parameters: | |
| 1626 * | |
| 1627 * [profileId] - User profile ID associated with this request. | |
| 1628 * | |
| 1629 * Completes with a [Advertiser]. | |
| 1630 * | |
| 1631 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 1632 * error. | |
| 1633 * | |
| 1634 * If the used [http.Client] completes with an error when making a REST call, | |
| 1635 * this method will complete with the same error. | |
| 1636 */ | |
| 1637 async.Future<Advertiser> insert(Advertiser request, core.String profileId) { | |
| 1638 var _url = null; | |
| 1639 var _queryParams = new core.Map(); | |
| 1640 var _uploadMedia = null; | |
| 1641 var _uploadOptions = null; | |
| 1642 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 1643 var _body = null; | |
| 1644 | |
| 1645 if (request != null) { | |
| 1646 _body = convert.JSON.encode((request).toJson()); | |
| 1647 } | |
| 1648 if (profileId == null) { | |
| 1649 throw new core.ArgumentError("Parameter profileId is required."); | |
| 1650 } | |
| 1651 | |
| 1652 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/adv
ertisers'; | |
| 1653 | |
| 1654 var _response = _requester.request(_url, | |
| 1655 "POST", | |
| 1656 body: _body, | |
| 1657 queryParams: _queryParams, | |
| 1658 uploadOptions: _uploadOptions, | |
| 1659 uploadMedia: _uploadMedia, | |
| 1660 downloadOptions: _downloadOptions); | |
| 1661 return _response.then((data) => new Advertiser.fromJson(data)); | |
| 1662 } | |
| 1663 | |
| 1664 /** | |
| 1665 * Retrieves a list of advertisers, possibly filtered. | |
| 1666 * | |
| 1667 * Request parameters: | |
| 1668 * | |
| 1669 * [profileId] - User profile ID associated with this request. | |
| 1670 * | |
| 1671 * [advertiserGroupIds] - Select only advertisers with these advertiser group | |
| 1672 * IDs. | |
| 1673 * | |
| 1674 * [floodlightConfigurationIds] - Select only advertisers with these | |
| 1675 * floodlight configuration IDs. | |
| 1676 * | |
| 1677 * [ids] - Select only advertisers with these IDs. | |
| 1678 * | |
| 1679 * [includeAdvertisersWithoutGroupsOnly] - Select only advertisers which do | |
| 1680 * not belong to any advertiser group. | |
| 1681 * | |
| 1682 * [maxResults] - Maximum number of results to return. | |
| 1683 * | |
| 1684 * [onlyParent] - Select only advertisers which use another advertiser's | |
| 1685 * floodlight configuration. | |
| 1686 * | |
| 1687 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 1688 * | |
| 1689 * [searchString] - Allows searching for objects by name or ID. Wildcards (*) | |
| 1690 * are allowed. For example, "advertiser*2015" will return objects with names | |
| 1691 * like "advertiser June 2015", "advertiser April 2015", or simply "advertiser | |
| 1692 * 2015". Most of the searches also add wildcards implicitly at the start and | |
| 1693 * the end of the search string. For example, a search string of "advertiser" | |
| 1694 * will match objects with name "my advertiser", "advertiser 2015", or simply | |
| 1695 * "advertiser". | |
| 1696 * | |
| 1697 * [sortField] - Field by which to sort the list. | |
| 1698 * Possible string values are: | |
| 1699 * - "ID" | |
| 1700 * - "NAME" | |
| 1701 * | |
| 1702 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 1703 * Possible string values are: | |
| 1704 * - "ASCENDING" | |
| 1705 * - "DESCENDING" | |
| 1706 * | |
| 1707 * [status] - Select only advertisers with the specified status. | |
| 1708 * Possible string values are: | |
| 1709 * - "APPROVED" | |
| 1710 * - "ON_HOLD" | |
| 1711 * | |
| 1712 * [subaccountId] - Select only advertisers with these subaccount IDs. | |
| 1713 * | |
| 1714 * Completes with a [AdvertisersListResponse]. | |
| 1715 * | |
| 1716 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 1717 * error. | |
| 1718 * | |
| 1719 * If the used [http.Client] completes with an error when making a REST call, | |
| 1720 * this method will complete with the same error. | |
| 1721 */ | |
| 1722 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}) { | |
| 1723 var _url = null; | |
| 1724 var _queryParams = new core.Map(); | |
| 1725 var _uploadMedia = null; | |
| 1726 var _uploadOptions = null; | |
| 1727 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 1728 var _body = null; | |
| 1729 | |
| 1730 if (profileId == null) { | |
| 1731 throw new core.ArgumentError("Parameter profileId is required."); | |
| 1732 } | |
| 1733 if (advertiserGroupIds != null) { | |
| 1734 _queryParams["advertiserGroupIds"] = advertiserGroupIds; | |
| 1735 } | |
| 1736 if (floodlightConfigurationIds != null) { | |
| 1737 _queryParams["floodlightConfigurationIds"] = floodlightConfigurationIds; | |
| 1738 } | |
| 1739 if (ids != null) { | |
| 1740 _queryParams["ids"] = ids; | |
| 1741 } | |
| 1742 if (includeAdvertisersWithoutGroupsOnly != null) { | |
| 1743 _queryParams["includeAdvertisersWithoutGroupsOnly"] = ["${includeAdvertise
rsWithoutGroupsOnly}"]; | |
| 1744 } | |
| 1745 if (maxResults != null) { | |
| 1746 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 1747 } | |
| 1748 if (onlyParent != null) { | |
| 1749 _queryParams["onlyParent"] = ["${onlyParent}"]; | |
| 1750 } | |
| 1751 if (pageToken != null) { | |
| 1752 _queryParams["pageToken"] = [pageToken]; | |
| 1753 } | |
| 1754 if (searchString != null) { | |
| 1755 _queryParams["searchString"] = [searchString]; | |
| 1756 } | |
| 1757 if (sortField != null) { | |
| 1758 _queryParams["sortField"] = [sortField]; | |
| 1759 } | |
| 1760 if (sortOrder != null) { | |
| 1761 _queryParams["sortOrder"] = [sortOrder]; | |
| 1762 } | |
| 1763 if (status != null) { | |
| 1764 _queryParams["status"] = [status]; | |
| 1765 } | |
| 1766 if (subaccountId != null) { | |
| 1767 _queryParams["subaccountId"] = [subaccountId]; | |
| 1768 } | |
| 1769 | |
| 1770 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/adv
ertisers'; | |
| 1771 | |
| 1772 var _response = _requester.request(_url, | |
| 1773 "GET", | |
| 1774 body: _body, | |
| 1775 queryParams: _queryParams, | |
| 1776 uploadOptions: _uploadOptions, | |
| 1777 uploadMedia: _uploadMedia, | |
| 1778 downloadOptions: _downloadOptions); | |
| 1779 return _response.then((data) => new AdvertisersListResponse.fromJson(data)); | |
| 1780 } | |
| 1781 | |
| 1782 /** | |
| 1783 * Updates an existing advertiser. This method supports patch semantics. | |
| 1784 * | |
| 1785 * [request] - The metadata request object. | |
| 1786 * | |
| 1787 * Request parameters: | |
| 1788 * | |
| 1789 * [profileId] - User profile ID associated with this request. | |
| 1790 * | |
| 1791 * [id] - Advertiser ID. | |
| 1792 * | |
| 1793 * Completes with a [Advertiser]. | |
| 1794 * | |
| 1795 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 1796 * error. | |
| 1797 * | |
| 1798 * If the used [http.Client] completes with an error when making a REST call, | |
| 1799 * this method will complete with the same error. | |
| 1800 */ | |
| 1801 async.Future<Advertiser> patch(Advertiser request, core.String profileId, core
.String id) { | |
| 1802 var _url = null; | |
| 1803 var _queryParams = new core.Map(); | |
| 1804 var _uploadMedia = null; | |
| 1805 var _uploadOptions = null; | |
| 1806 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 1807 var _body = null; | |
| 1808 | |
| 1809 if (request != null) { | |
| 1810 _body = convert.JSON.encode((request).toJson()); | |
| 1811 } | |
| 1812 if (profileId == null) { | |
| 1813 throw new core.ArgumentError("Parameter profileId is required."); | |
| 1814 } | |
| 1815 if (id == null) { | |
| 1816 throw new core.ArgumentError("Parameter id is required."); | |
| 1817 } | |
| 1818 _queryParams["id"] = [id]; | |
| 1819 | |
| 1820 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/adv
ertisers'; | |
| 1821 | |
| 1822 var _response = _requester.request(_url, | |
| 1823 "PATCH", | |
| 1824 body: _body, | |
| 1825 queryParams: _queryParams, | |
| 1826 uploadOptions: _uploadOptions, | |
| 1827 uploadMedia: _uploadMedia, | |
| 1828 downloadOptions: _downloadOptions); | |
| 1829 return _response.then((data) => new Advertiser.fromJson(data)); | |
| 1830 } | |
| 1831 | |
| 1832 /** | |
| 1833 * Updates an existing advertiser. | |
| 1834 * | |
| 1835 * [request] - The metadata request object. | |
| 1836 * | |
| 1837 * Request parameters: | |
| 1838 * | |
| 1839 * [profileId] - User profile ID associated with this request. | |
| 1840 * | |
| 1841 * Completes with a [Advertiser]. | |
| 1842 * | |
| 1843 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 1844 * error. | |
| 1845 * | |
| 1846 * If the used [http.Client] completes with an error when making a REST call, | |
| 1847 * this method will complete with the same error. | |
| 1848 */ | |
| 1849 async.Future<Advertiser> update(Advertiser request, core.String profileId) { | |
| 1850 var _url = null; | |
| 1851 var _queryParams = new core.Map(); | |
| 1852 var _uploadMedia = null; | |
| 1853 var _uploadOptions = null; | |
| 1854 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 1855 var _body = null; | |
| 1856 | |
| 1857 if (request != null) { | |
| 1858 _body = convert.JSON.encode((request).toJson()); | |
| 1859 } | |
| 1860 if (profileId == null) { | |
| 1861 throw new core.ArgumentError("Parameter profileId is required."); | |
| 1862 } | |
| 1863 | |
| 1864 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/adv
ertisers'; | |
| 1865 | |
| 1866 var _response = _requester.request(_url, | |
| 1867 "PUT", | |
| 1868 body: _body, | |
| 1869 queryParams: _queryParams, | |
| 1870 uploadOptions: _uploadOptions, | |
| 1871 uploadMedia: _uploadMedia, | |
| 1872 downloadOptions: _downloadOptions); | |
| 1873 return _response.then((data) => new Advertiser.fromJson(data)); | |
| 1874 } | |
| 1875 | |
| 1876 } | |
| 1877 | |
| 1878 | |
| 1879 class BrowsersResourceApi { | |
| 1880 final commons.ApiRequester _requester; | |
| 1881 | |
| 1882 BrowsersResourceApi(commons.ApiRequester client) : | |
| 1883 _requester = client; | |
| 1884 | |
| 1885 /** | |
| 1886 * Retrieves a list of browsers. | |
| 1887 * | |
| 1888 * Request parameters: | |
| 1889 * | |
| 1890 * [profileId] - User profile ID associated with this request. | |
| 1891 * | |
| 1892 * Completes with a [BrowsersListResponse]. | |
| 1893 * | |
| 1894 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 1895 * error. | |
| 1896 * | |
| 1897 * If the used [http.Client] completes with an error when making a REST call, | |
| 1898 * this method will complete with the same error. | |
| 1899 */ | |
| 1900 async.Future<BrowsersListResponse> list(core.String profileId) { | |
| 1901 var _url = null; | |
| 1902 var _queryParams = new core.Map(); | |
| 1903 var _uploadMedia = null; | |
| 1904 var _uploadOptions = null; | |
| 1905 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 1906 var _body = null; | |
| 1907 | |
| 1908 if (profileId == null) { | |
| 1909 throw new core.ArgumentError("Parameter profileId is required."); | |
| 1910 } | |
| 1911 | |
| 1912 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/bro
wsers'; | |
| 1913 | |
| 1914 var _response = _requester.request(_url, | |
| 1915 "GET", | |
| 1916 body: _body, | |
| 1917 queryParams: _queryParams, | |
| 1918 uploadOptions: _uploadOptions, | |
| 1919 uploadMedia: _uploadMedia, | |
| 1920 downloadOptions: _downloadOptions); | |
| 1921 return _response.then((data) => new BrowsersListResponse.fromJson(data)); | |
| 1922 } | |
| 1923 | |
| 1924 } | |
| 1925 | |
| 1926 | |
| 1927 class CampaignCreativeAssociationsResourceApi { | |
| 1928 final commons.ApiRequester _requester; | |
| 1929 | |
| 1930 CampaignCreativeAssociationsResourceApi(commons.ApiRequester client) : | |
| 1931 _requester = client; | |
| 1932 | |
| 1933 /** | |
| 1934 * Associates a creative with the specified campaign. This method creates a | |
| 1935 * default ad with dimensions matching the creative in the campaign if such a | |
| 1936 * default ad does not exist already. | |
| 1937 * | |
| 1938 * [request] - The metadata request object. | |
| 1939 * | |
| 1940 * Request parameters: | |
| 1941 * | |
| 1942 * [profileId] - User profile ID associated with this request. | |
| 1943 * | |
| 1944 * [campaignId] - Campaign ID in this association. | |
| 1945 * | |
| 1946 * Completes with a [CampaignCreativeAssociation]. | |
| 1947 * | |
| 1948 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 1949 * error. | |
| 1950 * | |
| 1951 * If the used [http.Client] completes with an error when making a REST call, | |
| 1952 * this method will complete with the same error. | |
| 1953 */ | |
| 1954 async.Future<CampaignCreativeAssociation> insert(CampaignCreativeAssociation r
equest, core.String profileId, core.String campaignId) { | |
| 1955 var _url = null; | |
| 1956 var _queryParams = new core.Map(); | |
| 1957 var _uploadMedia = null; | |
| 1958 var _uploadOptions = null; | |
| 1959 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 1960 var _body = null; | |
| 1961 | |
| 1962 if (request != null) { | |
| 1963 _body = convert.JSON.encode((request).toJson()); | |
| 1964 } | |
| 1965 if (profileId == null) { | |
| 1966 throw new core.ArgumentError("Parameter profileId is required."); | |
| 1967 } | |
| 1968 if (campaignId == null) { | |
| 1969 throw new core.ArgumentError("Parameter campaignId is required."); | |
| 1970 } | |
| 1971 | |
| 1972 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam
paigns/' + commons.Escaper.ecapeVariable('$campaignId') + '/campaignCreativeAsso
ciations'; | |
| 1973 | |
| 1974 var _response = _requester.request(_url, | |
| 1975 "POST", | |
| 1976 body: _body, | |
| 1977 queryParams: _queryParams, | |
| 1978 uploadOptions: _uploadOptions, | |
| 1979 uploadMedia: _uploadMedia, | |
| 1980 downloadOptions: _downloadOptions); | |
| 1981 return _response.then((data) => new CampaignCreativeAssociation.fromJson(dat
a)); | |
| 1982 } | |
| 1983 | |
| 1984 /** | |
| 1985 * Retrieves the list of creative IDs associated with the specified campaign. | |
| 1986 * | |
| 1987 * Request parameters: | |
| 1988 * | |
| 1989 * [profileId] - User profile ID associated with this request. | |
| 1990 * | |
| 1991 * [campaignId] - Campaign ID in this association. | |
| 1992 * | |
| 1993 * [maxResults] - Maximum number of results to return. | |
| 1994 * | |
| 1995 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 1996 * | |
| 1997 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 1998 * Possible string values are: | |
| 1999 * - "ASCENDING" | |
| 2000 * - "DESCENDING" | |
| 2001 * | |
| 2002 * Completes with a [CampaignCreativeAssociationsListResponse]. | |
| 2003 * | |
| 2004 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 2005 * error. | |
| 2006 * | |
| 2007 * If the used [http.Client] completes with an error when making a REST call, | |
| 2008 * this method will complete with the same error. | |
| 2009 */ | |
| 2010 async.Future<CampaignCreativeAssociationsListResponse> list(core.String profil
eId, core.String campaignId, {core.int maxResults, core.String pageToken, core.S
tring sortOrder}) { | |
| 2011 var _url = null; | |
| 2012 var _queryParams = new core.Map(); | |
| 2013 var _uploadMedia = null; | |
| 2014 var _uploadOptions = null; | |
| 2015 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 2016 var _body = null; | |
| 2017 | |
| 2018 if (profileId == null) { | |
| 2019 throw new core.ArgumentError("Parameter profileId is required."); | |
| 2020 } | |
| 2021 if (campaignId == null) { | |
| 2022 throw new core.ArgumentError("Parameter campaignId is required."); | |
| 2023 } | |
| 2024 if (maxResults != null) { | |
| 2025 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 2026 } | |
| 2027 if (pageToken != null) { | |
| 2028 _queryParams["pageToken"] = [pageToken]; | |
| 2029 } | |
| 2030 if (sortOrder != null) { | |
| 2031 _queryParams["sortOrder"] = [sortOrder]; | |
| 2032 } | |
| 2033 | |
| 2034 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam
paigns/' + commons.Escaper.ecapeVariable('$campaignId') + '/campaignCreativeAsso
ciations'; | |
| 2035 | |
| 2036 var _response = _requester.request(_url, | |
| 2037 "GET", | |
| 2038 body: _body, | |
| 2039 queryParams: _queryParams, | |
| 2040 uploadOptions: _uploadOptions, | |
| 2041 uploadMedia: _uploadMedia, | |
| 2042 downloadOptions: _downloadOptions); | |
| 2043 return _response.then((data) => new CampaignCreativeAssociationsListResponse
.fromJson(data)); | |
| 2044 } | |
| 2045 | |
| 2046 } | |
| 2047 | |
| 2048 | |
| 2049 class CampaignsResourceApi { | |
| 2050 final commons.ApiRequester _requester; | |
| 2051 | |
| 2052 CampaignsResourceApi(commons.ApiRequester client) : | |
| 2053 _requester = client; | |
| 2054 | |
| 2055 /** | |
| 2056 * Gets one campaign by ID. | |
| 2057 * | |
| 2058 * Request parameters: | |
| 2059 * | |
| 2060 * [profileId] - User profile ID associated with this request. | |
| 2061 * | |
| 2062 * [id] - Campaign ID. | |
| 2063 * | |
| 2064 * Completes with a [Campaign]. | |
| 2065 * | |
| 2066 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 2067 * error. | |
| 2068 * | |
| 2069 * If the used [http.Client] completes with an error when making a REST call, | |
| 2070 * this method will complete with the same error. | |
| 2071 */ | |
| 2072 async.Future<Campaign> get(core.String profileId, core.String id) { | |
| 2073 var _url = null; | |
| 2074 var _queryParams = new core.Map(); | |
| 2075 var _uploadMedia = null; | |
| 2076 var _uploadOptions = null; | |
| 2077 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 2078 var _body = null; | |
| 2079 | |
| 2080 if (profileId == null) { | |
| 2081 throw new core.ArgumentError("Parameter profileId is required."); | |
| 2082 } | |
| 2083 if (id == null) { | |
| 2084 throw new core.ArgumentError("Parameter id is required."); | |
| 2085 } | |
| 2086 | |
| 2087 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam
paigns/' + commons.Escaper.ecapeVariable('$id'); | |
| 2088 | |
| 2089 var _response = _requester.request(_url, | |
| 2090 "GET", | |
| 2091 body: _body, | |
| 2092 queryParams: _queryParams, | |
| 2093 uploadOptions: _uploadOptions, | |
| 2094 uploadMedia: _uploadMedia, | |
| 2095 downloadOptions: _downloadOptions); | |
| 2096 return _response.then((data) => new Campaign.fromJson(data)); | |
| 2097 } | |
| 2098 | |
| 2099 /** | |
| 2100 * Inserts a new campaign. | |
| 2101 * | |
| 2102 * [request] - The metadata request object. | |
| 2103 * | |
| 2104 * Request parameters: | |
| 2105 * | |
| 2106 * [profileId] - User profile ID associated with this request. | |
| 2107 * | |
| 2108 * [defaultLandingPageName] - Default landing page name for this new campaign. | |
| 2109 * Must be less than 256 characters long. | |
| 2110 * | |
| 2111 * [defaultLandingPageUrl] - Default landing page URL for this new campaign. | |
| 2112 * | |
| 2113 * Completes with a [Campaign]. | |
| 2114 * | |
| 2115 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 2116 * error. | |
| 2117 * | |
| 2118 * If the used [http.Client] completes with an error when making a REST call, | |
| 2119 * this method will complete with the same error. | |
| 2120 */ | |
| 2121 async.Future<Campaign> insert(Campaign request, core.String profileId, core.St
ring defaultLandingPageName, core.String defaultLandingPageUrl) { | |
| 2122 var _url = null; | |
| 2123 var _queryParams = new core.Map(); | |
| 2124 var _uploadMedia = null; | |
| 2125 var _uploadOptions = null; | |
| 2126 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 2127 var _body = null; | |
| 2128 | |
| 2129 if (request != null) { | |
| 2130 _body = convert.JSON.encode((request).toJson()); | |
| 2131 } | |
| 2132 if (profileId == null) { | |
| 2133 throw new core.ArgumentError("Parameter profileId is required."); | |
| 2134 } | |
| 2135 if (defaultLandingPageName == null) { | |
| 2136 throw new core.ArgumentError("Parameter defaultLandingPageName is required
."); | |
| 2137 } | |
| 2138 _queryParams["defaultLandingPageName"] = [defaultLandingPageName]; | |
| 2139 if (defaultLandingPageUrl == null) { | |
| 2140 throw new core.ArgumentError("Parameter defaultLandingPageUrl is required.
"); | |
| 2141 } | |
| 2142 _queryParams["defaultLandingPageUrl"] = [defaultLandingPageUrl]; | |
| 2143 | |
| 2144 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam
paigns'; | |
| 2145 | |
| 2146 var _response = _requester.request(_url, | |
| 2147 "POST", | |
| 2148 body: _body, | |
| 2149 queryParams: _queryParams, | |
| 2150 uploadOptions: _uploadOptions, | |
| 2151 uploadMedia: _uploadMedia, | |
| 2152 downloadOptions: _downloadOptions); | |
| 2153 return _response.then((data) => new Campaign.fromJson(data)); | |
| 2154 } | |
| 2155 | |
| 2156 /** | |
| 2157 * Retrieves a list of campaigns, possibly filtered. | |
| 2158 * | |
| 2159 * Request parameters: | |
| 2160 * | |
| 2161 * [profileId] - User profile ID associated with this request. | |
| 2162 * | |
| 2163 * [advertiserGroupIds] - Select only campaigns whose advertisers belong to | |
| 2164 * these advertiser groups. | |
| 2165 * | |
| 2166 * [advertiserIds] - Select only campaigns that belong to these advertisers. | |
| 2167 * | |
| 2168 * [archived] - Select only archived campaigns. Don't set this field to select | |
| 2169 * both archived and non-archived campaigns. | |
| 2170 * | |
| 2171 * [atLeastOneOptimizationActivity] - Select only campaigns that have at least | |
| 2172 * one optimization activity. | |
| 2173 * | |
| 2174 * [excludedIds] - Exclude campaigns with these IDs. | |
| 2175 * | |
| 2176 * [ids] - Select only campaigns with these IDs. | |
| 2177 * | |
| 2178 * [maxResults] - Maximum number of results to return. | |
| 2179 * | |
| 2180 * [overriddenEventTagId] - Select only campaigns that have overridden this | |
| 2181 * event tag ID. | |
| 2182 * | |
| 2183 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 2184 * | |
| 2185 * [searchString] - Allows searching for campaigns by name or ID. Wildcards | |
| 2186 * (*) are allowed. For example, "campaign*2015" will return campaigns with | |
| 2187 * names like "campaign June 2015", "campaign April 2015", or simply "campaign | |
| 2188 * 2015". Most of the searches also add wildcards implicitly at the start and | |
| 2189 * the end of the search string. For example, a search string of "campaign" | |
| 2190 * will match campaigns with name "my campaign", "campaign 2015", or simply | |
| 2191 * "campaign". | |
| 2192 * | |
| 2193 * [sortField] - Field by which to sort the list. | |
| 2194 * Possible string values are: | |
| 2195 * - "ID" | |
| 2196 * - "NAME" | |
| 2197 * | |
| 2198 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 2199 * Possible string values are: | |
| 2200 * - "ASCENDING" | |
| 2201 * - "DESCENDING" | |
| 2202 * | |
| 2203 * [subaccountId] - Select only campaigns that belong to this subaccount. | |
| 2204 * | |
| 2205 * Completes with a [CampaignsListResponse]. | |
| 2206 * | |
| 2207 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 2208 * error. | |
| 2209 * | |
| 2210 * If the used [http.Client] completes with an error when making a REST call, | |
| 2211 * this method will complete with the same error. | |
| 2212 */ | |
| 2213 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}) { | |
| 2214 var _url = null; | |
| 2215 var _queryParams = new core.Map(); | |
| 2216 var _uploadMedia = null; | |
| 2217 var _uploadOptions = null; | |
| 2218 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 2219 var _body = null; | |
| 2220 | |
| 2221 if (profileId == null) { | |
| 2222 throw new core.ArgumentError("Parameter profileId is required."); | |
| 2223 } | |
| 2224 if (advertiserGroupIds != null) { | |
| 2225 _queryParams["advertiserGroupIds"] = advertiserGroupIds; | |
| 2226 } | |
| 2227 if (advertiserIds != null) { | |
| 2228 _queryParams["advertiserIds"] = advertiserIds; | |
| 2229 } | |
| 2230 if (archived != null) { | |
| 2231 _queryParams["archived"] = ["${archived}"]; | |
| 2232 } | |
| 2233 if (atLeastOneOptimizationActivity != null) { | |
| 2234 _queryParams["atLeastOneOptimizationActivity"] = ["${atLeastOneOptimizatio
nActivity}"]; | |
| 2235 } | |
| 2236 if (excludedIds != null) { | |
| 2237 _queryParams["excludedIds"] = excludedIds; | |
| 2238 } | |
| 2239 if (ids != null) { | |
| 2240 _queryParams["ids"] = ids; | |
| 2241 } | |
| 2242 if (maxResults != null) { | |
| 2243 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 2244 } | |
| 2245 if (overriddenEventTagId != null) { | |
| 2246 _queryParams["overriddenEventTagId"] = [overriddenEventTagId]; | |
| 2247 } | |
| 2248 if (pageToken != null) { | |
| 2249 _queryParams["pageToken"] = [pageToken]; | |
| 2250 } | |
| 2251 if (searchString != null) { | |
| 2252 _queryParams["searchString"] = [searchString]; | |
| 2253 } | |
| 2254 if (sortField != null) { | |
| 2255 _queryParams["sortField"] = [sortField]; | |
| 2256 } | |
| 2257 if (sortOrder != null) { | |
| 2258 _queryParams["sortOrder"] = [sortOrder]; | |
| 2259 } | |
| 2260 if (subaccountId != null) { | |
| 2261 _queryParams["subaccountId"] = [subaccountId]; | |
| 2262 } | |
| 2263 | |
| 2264 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam
paigns'; | |
| 2265 | |
| 2266 var _response = _requester.request(_url, | |
| 2267 "GET", | |
| 2268 body: _body, | |
| 2269 queryParams: _queryParams, | |
| 2270 uploadOptions: _uploadOptions, | |
| 2271 uploadMedia: _uploadMedia, | |
| 2272 downloadOptions: _downloadOptions); | |
| 2273 return _response.then((data) => new CampaignsListResponse.fromJson(data)); | |
| 2274 } | |
| 2275 | |
| 2276 /** | |
| 2277 * Updates an existing campaign. This method supports patch semantics. | |
| 2278 * | |
| 2279 * [request] - The metadata request object. | |
| 2280 * | |
| 2281 * Request parameters: | |
| 2282 * | |
| 2283 * [profileId] - User profile ID associated with this request. | |
| 2284 * | |
| 2285 * [id] - Campaign ID. | |
| 2286 * | |
| 2287 * Completes with a [Campaign]. | |
| 2288 * | |
| 2289 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 2290 * error. | |
| 2291 * | |
| 2292 * If the used [http.Client] completes with an error when making a REST call, | |
| 2293 * this method will complete with the same error. | |
| 2294 */ | |
| 2295 async.Future<Campaign> patch(Campaign request, core.String profileId, core.Str
ing id) { | |
| 2296 var _url = null; | |
| 2297 var _queryParams = new core.Map(); | |
| 2298 var _uploadMedia = null; | |
| 2299 var _uploadOptions = null; | |
| 2300 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 2301 var _body = null; | |
| 2302 | |
| 2303 if (request != null) { | |
| 2304 _body = convert.JSON.encode((request).toJson()); | |
| 2305 } | |
| 2306 if (profileId == null) { | |
| 2307 throw new core.ArgumentError("Parameter profileId is required."); | |
| 2308 } | |
| 2309 if (id == null) { | |
| 2310 throw new core.ArgumentError("Parameter id is required."); | |
| 2311 } | |
| 2312 _queryParams["id"] = [id]; | |
| 2313 | |
| 2314 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam
paigns'; | |
| 2315 | |
| 2316 var _response = _requester.request(_url, | |
| 2317 "PATCH", | |
| 2318 body: _body, | |
| 2319 queryParams: _queryParams, | |
| 2320 uploadOptions: _uploadOptions, | |
| 2321 uploadMedia: _uploadMedia, | |
| 2322 downloadOptions: _downloadOptions); | |
| 2323 return _response.then((data) => new Campaign.fromJson(data)); | |
| 2324 } | |
| 2325 | |
| 2326 /** | |
| 2327 * Updates an existing campaign. | |
| 2328 * | |
| 2329 * [request] - The metadata request object. | |
| 2330 * | |
| 2331 * Request parameters: | |
| 2332 * | |
| 2333 * [profileId] - User profile ID associated with this request. | |
| 2334 * | |
| 2335 * Completes with a [Campaign]. | |
| 2336 * | |
| 2337 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 2338 * error. | |
| 2339 * | |
| 2340 * If the used [http.Client] completes with an error when making a REST call, | |
| 2341 * this method will complete with the same error. | |
| 2342 */ | |
| 2343 async.Future<Campaign> update(Campaign request, core.String profileId) { | |
| 2344 var _url = null; | |
| 2345 var _queryParams = new core.Map(); | |
| 2346 var _uploadMedia = null; | |
| 2347 var _uploadOptions = null; | |
| 2348 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 2349 var _body = null; | |
| 2350 | |
| 2351 if (request != null) { | |
| 2352 _body = convert.JSON.encode((request).toJson()); | |
| 2353 } | |
| 2354 if (profileId == null) { | |
| 2355 throw new core.ArgumentError("Parameter profileId is required."); | |
| 2356 } | |
| 2357 | |
| 2358 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam
paigns'; | |
| 2359 | |
| 2360 var _response = _requester.request(_url, | |
| 2361 "PUT", | |
| 2362 body: _body, | |
| 2363 queryParams: _queryParams, | |
| 2364 uploadOptions: _uploadOptions, | |
| 2365 uploadMedia: _uploadMedia, | |
| 2366 downloadOptions: _downloadOptions); | |
| 2367 return _response.then((data) => new Campaign.fromJson(data)); | |
| 2368 } | |
| 2369 | |
| 2370 } | |
| 2371 | |
| 2372 | |
| 2373 class ChangeLogsResourceApi { | |
| 2374 final commons.ApiRequester _requester; | |
| 2375 | |
| 2376 ChangeLogsResourceApi(commons.ApiRequester client) : | |
| 2377 _requester = client; | |
| 2378 | |
| 2379 /** | |
| 2380 * Gets one change log by ID. | |
| 2381 * | |
| 2382 * Request parameters: | |
| 2383 * | |
| 2384 * [profileId] - User profile ID associated with this request. | |
| 2385 * | |
| 2386 * [id] - Change log ID. | |
| 2387 * | |
| 2388 * Completes with a [ChangeLog]. | |
| 2389 * | |
| 2390 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 2391 * error. | |
| 2392 * | |
| 2393 * If the used [http.Client] completes with an error when making a REST call, | |
| 2394 * this method will complete with the same error. | |
| 2395 */ | |
| 2396 async.Future<ChangeLog> get(core.String profileId, core.String id) { | |
| 2397 var _url = null; | |
| 2398 var _queryParams = new core.Map(); | |
| 2399 var _uploadMedia = null; | |
| 2400 var _uploadOptions = null; | |
| 2401 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 2402 var _body = null; | |
| 2403 | |
| 2404 if (profileId == null) { | |
| 2405 throw new core.ArgumentError("Parameter profileId is required."); | |
| 2406 } | |
| 2407 if (id == null) { | |
| 2408 throw new core.ArgumentError("Parameter id is required."); | |
| 2409 } | |
| 2410 | |
| 2411 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cha
ngeLogs/' + commons.Escaper.ecapeVariable('$id'); | |
| 2412 | |
| 2413 var _response = _requester.request(_url, | |
| 2414 "GET", | |
| 2415 body: _body, | |
| 2416 queryParams: _queryParams, | |
| 2417 uploadOptions: _uploadOptions, | |
| 2418 uploadMedia: _uploadMedia, | |
| 2419 downloadOptions: _downloadOptions); | |
| 2420 return _response.then((data) => new ChangeLog.fromJson(data)); | |
| 2421 } | |
| 2422 | |
| 2423 /** | |
| 2424 * Retrieves a list of change logs. | |
| 2425 * | |
| 2426 * Request parameters: | |
| 2427 * | |
| 2428 * [profileId] - User profile ID associated with this request. | |
| 2429 * | |
| 2430 * [action] - Select only change logs with the specified action. | |
| 2431 * Possible string values are: | |
| 2432 * - "ACTION_ADD" | |
| 2433 * - "ACTION_ASSIGN" | |
| 2434 * - "ACTION_ASSOCIATE" | |
| 2435 * - "ACTION_CREATE" | |
| 2436 * - "ACTION_DELETE" | |
| 2437 * - "ACTION_DISABLE" | |
| 2438 * - "ACTION_EMAIL_TAGS" | |
| 2439 * - "ACTION_ENABLE" | |
| 2440 * - "ACTION_LINK" | |
| 2441 * - "ACTION_MARK_AS_DEFAULT" | |
| 2442 * - "ACTION_PUSH" | |
| 2443 * - "ACTION_REMOVE" | |
| 2444 * - "ACTION_SEND" | |
| 2445 * - "ACTION_SHARE" | |
| 2446 * - "ACTION_UNASSIGN" | |
| 2447 * - "ACTION_UNLINK" | |
| 2448 * - "ACTION_UPDATE" | |
| 2449 * | |
| 2450 * [ids] - Select only change logs with these IDs. | |
| 2451 * | |
| 2452 * [maxChangeTime] - Select only change logs whose change time is before the | |
| 2453 * specified maxChangeTime.The time should be formatted as an RFC3339 | |
| 2454 * date/time string. For example, for 10:54 PM on July 18th, 2015, in the | |
| 2455 * America/New York time zone, the format is "2015-07-18T22:54:00-04:00". In | |
| 2456 * other words, the year, month, day, the letter T, the hour (24-hour clock | |
| 2457 * system), minute, second, and then the time zone offset. | |
| 2458 * | |
| 2459 * [maxResults] - Maximum number of results to return. | |
| 2460 * | |
| 2461 * [minChangeTime] - Select only change logs whose change time is before the | |
| 2462 * specified minChangeTime.The time should be formatted as an RFC3339 | |
| 2463 * date/time string. For example, for 10:54 PM on July 18th, 2015, in the | |
| 2464 * America/New York time zone, the format is "2015-07-18T22:54:00-04:00". In | |
| 2465 * other words, the year, month, day, the letter T, the hour (24-hour clock | |
| 2466 * system), minute, second, and then the time zone offset. | |
| 2467 * | |
| 2468 * [objectIds] - Select only change logs with these object IDs. | |
| 2469 * | |
| 2470 * [objectType] - Select only change logs with the specified object type. | |
| 2471 * Possible string values are: | |
| 2472 * - "OBJECT_ACCOUNT" | |
| 2473 * - "OBJECT_ACCOUNT_BILLING_FEATURE" | |
| 2474 * - "OBJECT_AD" | |
| 2475 * - "OBJECT_ADVERTISER" | |
| 2476 * - "OBJECT_ADVERTISER_GROUP" | |
| 2477 * - "OBJECT_BILLING_ACCOUNT_GROUP" | |
| 2478 * - "OBJECT_BILLING_FEATURE" | |
| 2479 * - "OBJECT_BILLING_MINIMUM_FEE" | |
| 2480 * - "OBJECT_BILLING_PROFILE" | |
| 2481 * - "OBJECT_CAMPAIGN" | |
| 2482 * - "OBJECT_CONTENT_CATEGORY" | |
| 2483 * - "OBJECT_CREATIVE" | |
| 2484 * - "OBJECT_CREATIVE_ASSET" | |
| 2485 * - "OBJECT_CREATIVE_BUNDLE" | |
| 2486 * - "OBJECT_CREATIVE_FIELD" | |
| 2487 * - "OBJECT_CREATIVE_GROUP" | |
| 2488 * - "OBJECT_DFA_SITE" | |
| 2489 * - "OBJECT_EVENT_TAG" | |
| 2490 * - "OBJECT_FLOODLIGHT_ACTIVITY_GROUP" | |
| 2491 * - "OBJECT_FLOODLIGHT_ACTVITY" | |
| 2492 * - "OBJECT_FLOODLIGHT_CONFIGURATION" | |
| 2493 * - "OBJECT_INSTREAM_CREATIVE" | |
| 2494 * - "OBJECT_LANDING_PAGE" | |
| 2495 * - "OBJECT_MEDIA_ORDER" | |
| 2496 * - "OBJECT_PLACEMENT" | |
| 2497 * - "OBJECT_PLACEMENT_STRATEGY" | |
| 2498 * - "OBJECT_PLAYSTORE_LINK" | |
| 2499 * - "OBJECT_PROVIDED_LIST_CLIENT" | |
| 2500 * - "OBJECT_RATE_CARD" | |
| 2501 * - "OBJECT_REMARKETING_LIST" | |
| 2502 * - "OBJECT_RICHMEDIA_CREATIVE" | |
| 2503 * - "OBJECT_SD_SITE" | |
| 2504 * - "OBJECT_SIZE" | |
| 2505 * - "OBJECT_SUBACCOUNT" | |
| 2506 * - "OBJECT_TARGETING_TEMPLATE" | |
| 2507 * - "OBJECT_USER_PROFILE" | |
| 2508 * - "OBJECT_USER_PROFILE_FILTER" | |
| 2509 * - "OBJECT_USER_ROLE" | |
| 2510 * | |
| 2511 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 2512 * | |
| 2513 * [searchString] - Select only change logs whose object ID, user name, old or | |
| 2514 * new values match the search string. | |
| 2515 * | |
| 2516 * [userProfileIds] - Select only change logs with these user profile IDs. | |
| 2517 * | |
| 2518 * Completes with a [ChangeLogsListResponse]. | |
| 2519 * | |
| 2520 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 2521 * error. | |
| 2522 * | |
| 2523 * If the used [http.Client] completes with an error when making a REST call, | |
| 2524 * this method will complete with the same error. | |
| 2525 */ | |
| 2526 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}) { | |
| 2527 var _url = null; | |
| 2528 var _queryParams = new core.Map(); | |
| 2529 var _uploadMedia = null; | |
| 2530 var _uploadOptions = null; | |
| 2531 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 2532 var _body = null; | |
| 2533 | |
| 2534 if (profileId == null) { | |
| 2535 throw new core.ArgumentError("Parameter profileId is required."); | |
| 2536 } | |
| 2537 if (action != null) { | |
| 2538 _queryParams["action"] = [action]; | |
| 2539 } | |
| 2540 if (ids != null) { | |
| 2541 _queryParams["ids"] = ids; | |
| 2542 } | |
| 2543 if (maxChangeTime != null) { | |
| 2544 _queryParams["maxChangeTime"] = [maxChangeTime]; | |
| 2545 } | |
| 2546 if (maxResults != null) { | |
| 2547 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 2548 } | |
| 2549 if (minChangeTime != null) { | |
| 2550 _queryParams["minChangeTime"] = [minChangeTime]; | |
| 2551 } | |
| 2552 if (objectIds != null) { | |
| 2553 _queryParams["objectIds"] = objectIds; | |
| 2554 } | |
| 2555 if (objectType != null) { | |
| 2556 _queryParams["objectType"] = [objectType]; | |
| 2557 } | |
| 2558 if (pageToken != null) { | |
| 2559 _queryParams["pageToken"] = [pageToken]; | |
| 2560 } | |
| 2561 if (searchString != null) { | |
| 2562 _queryParams["searchString"] = [searchString]; | |
| 2563 } | |
| 2564 if (userProfileIds != null) { | |
| 2565 _queryParams["userProfileIds"] = userProfileIds; | |
| 2566 } | |
| 2567 | |
| 2568 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cha
ngeLogs'; | |
| 2569 | |
| 2570 var _response = _requester.request(_url, | |
| 2571 "GET", | |
| 2572 body: _body, | |
| 2573 queryParams: _queryParams, | |
| 2574 uploadOptions: _uploadOptions, | |
| 2575 uploadMedia: _uploadMedia, | |
| 2576 downloadOptions: _downloadOptions); | |
| 2577 return _response.then((data) => new ChangeLogsListResponse.fromJson(data)); | |
| 2578 } | |
| 2579 | |
| 2580 } | |
| 2581 | |
| 2582 | |
| 2583 class CitiesResourceApi { | |
| 2584 final commons.ApiRequester _requester; | |
| 2585 | |
| 2586 CitiesResourceApi(commons.ApiRequester client) : | |
| 2587 _requester = client; | |
| 2588 | |
| 2589 /** | |
| 2590 * Retrieves a list of cities, possibly filtered. | |
| 2591 * | |
| 2592 * Request parameters: | |
| 2593 * | |
| 2594 * [profileId] - User profile ID associated with this request. | |
| 2595 * | |
| 2596 * [countryDartIds] - Select only cities from these countries. | |
| 2597 * | |
| 2598 * [dartIds] - Select only cities with these DART IDs. | |
| 2599 * | |
| 2600 * [namePrefix] - Select only cities with names starting with this prefix. | |
| 2601 * | |
| 2602 * [regionDartIds] - Select only cities from these regions. | |
| 2603 * | |
| 2604 * Completes with a [CitiesListResponse]. | |
| 2605 * | |
| 2606 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 2607 * error. | |
| 2608 * | |
| 2609 * If the used [http.Client] completes with an error when making a REST call, | |
| 2610 * this method will complete with the same error. | |
| 2611 */ | |
| 2612 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}) { | |
| 2613 var _url = null; | |
| 2614 var _queryParams = new core.Map(); | |
| 2615 var _uploadMedia = null; | |
| 2616 var _uploadOptions = null; | |
| 2617 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 2618 var _body = null; | |
| 2619 | |
| 2620 if (profileId == null) { | |
| 2621 throw new core.ArgumentError("Parameter profileId is required."); | |
| 2622 } | |
| 2623 if (countryDartIds != null) { | |
| 2624 _queryParams["countryDartIds"] = countryDartIds; | |
| 2625 } | |
| 2626 if (dartIds != null) { | |
| 2627 _queryParams["dartIds"] = dartIds; | |
| 2628 } | |
| 2629 if (namePrefix != null) { | |
| 2630 _queryParams["namePrefix"] = [namePrefix]; | |
| 2631 } | |
| 2632 if (regionDartIds != null) { | |
| 2633 _queryParams["regionDartIds"] = regionDartIds; | |
| 2634 } | |
| 2635 | |
| 2636 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cit
ies'; | |
| 2637 | |
| 2638 var _response = _requester.request(_url, | |
| 2639 "GET", | |
| 2640 body: _body, | |
| 2641 queryParams: _queryParams, | |
| 2642 uploadOptions: _uploadOptions, | |
| 2643 uploadMedia: _uploadMedia, | |
| 2644 downloadOptions: _downloadOptions); | |
| 2645 return _response.then((data) => new CitiesListResponse.fromJson(data)); | |
| 2646 } | |
| 2647 | |
| 2648 } | |
| 2649 | |
| 2650 | |
| 2651 class ConnectionTypesResourceApi { | |
| 2652 final commons.ApiRequester _requester; | |
| 2653 | |
| 2654 ConnectionTypesResourceApi(commons.ApiRequester client) : | |
| 2655 _requester = client; | |
| 2656 | |
| 2657 /** | |
| 2658 * Gets one connection type by ID. | |
| 2659 * | |
| 2660 * Request parameters: | |
| 2661 * | |
| 2662 * [profileId] - User profile ID associated with this request. | |
| 2663 * | |
| 2664 * [id] - Connection type ID. | |
| 2665 * | |
| 2666 * Completes with a [ConnectionType]. | |
| 2667 * | |
| 2668 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 2669 * error. | |
| 2670 * | |
| 2671 * If the used [http.Client] completes with an error when making a REST call, | |
| 2672 * this method will complete with the same error. | |
| 2673 */ | |
| 2674 async.Future<ConnectionType> get(core.String profileId, core.String id) { | |
| 2675 var _url = null; | |
| 2676 var _queryParams = new core.Map(); | |
| 2677 var _uploadMedia = null; | |
| 2678 var _uploadOptions = null; | |
| 2679 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 2680 var _body = null; | |
| 2681 | |
| 2682 if (profileId == null) { | |
| 2683 throw new core.ArgumentError("Parameter profileId is required."); | |
| 2684 } | |
| 2685 if (id == null) { | |
| 2686 throw new core.ArgumentError("Parameter id is required."); | |
| 2687 } | |
| 2688 | |
| 2689 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/con
nectionTypes/' + commons.Escaper.ecapeVariable('$id'); | |
| 2690 | |
| 2691 var _response = _requester.request(_url, | |
| 2692 "GET", | |
| 2693 body: _body, | |
| 2694 queryParams: _queryParams, | |
| 2695 uploadOptions: _uploadOptions, | |
| 2696 uploadMedia: _uploadMedia, | |
| 2697 downloadOptions: _downloadOptions); | |
| 2698 return _response.then((data) => new ConnectionType.fromJson(data)); | |
| 2699 } | |
| 2700 | |
| 2701 /** | |
| 2702 * Retrieves a list of connection types. | |
| 2703 * | |
| 2704 * Request parameters: | |
| 2705 * | |
| 2706 * [profileId] - User profile ID associated with this request. | |
| 2707 * | |
| 2708 * Completes with a [ConnectionTypesListResponse]. | |
| 2709 * | |
| 2710 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 2711 * error. | |
| 2712 * | |
| 2713 * If the used [http.Client] completes with an error when making a REST call, | |
| 2714 * this method will complete with the same error. | |
| 2715 */ | |
| 2716 async.Future<ConnectionTypesListResponse> list(core.String profileId) { | |
| 2717 var _url = null; | |
| 2718 var _queryParams = new core.Map(); | |
| 2719 var _uploadMedia = null; | |
| 2720 var _uploadOptions = null; | |
| 2721 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 2722 var _body = null; | |
| 2723 | |
| 2724 if (profileId == null) { | |
| 2725 throw new core.ArgumentError("Parameter profileId is required."); | |
| 2726 } | |
| 2727 | |
| 2728 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/con
nectionTypes'; | |
| 2729 | |
| 2730 var _response = _requester.request(_url, | |
| 2731 "GET", | |
| 2732 body: _body, | |
| 2733 queryParams: _queryParams, | |
| 2734 uploadOptions: _uploadOptions, | |
| 2735 uploadMedia: _uploadMedia, | |
| 2736 downloadOptions: _downloadOptions); | |
| 2737 return _response.then((data) => new ConnectionTypesListResponse.fromJson(dat
a)); | |
| 2738 } | |
| 2739 | |
| 2740 } | |
| 2741 | |
| 2742 | |
| 2743 class ContentCategoriesResourceApi { | |
| 2744 final commons.ApiRequester _requester; | |
| 2745 | |
| 2746 ContentCategoriesResourceApi(commons.ApiRequester client) : | |
| 2747 _requester = client; | |
| 2748 | |
| 2749 /** | |
| 2750 * Deletes an existing content category. | |
| 2751 * | |
| 2752 * Request parameters: | |
| 2753 * | |
| 2754 * [profileId] - User profile ID associated with this request. | |
| 2755 * | |
| 2756 * [id] - Content category ID. | |
| 2757 * | |
| 2758 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 2759 * error. | |
| 2760 * | |
| 2761 * If the used [http.Client] completes with an error when making a REST call, | |
| 2762 * this method will complete with the same error. | |
| 2763 */ | |
| 2764 async.Future delete(core.String profileId, core.String id) { | |
| 2765 var _url = null; | |
| 2766 var _queryParams = new core.Map(); | |
| 2767 var _uploadMedia = null; | |
| 2768 var _uploadOptions = null; | |
| 2769 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 2770 var _body = null; | |
| 2771 | |
| 2772 if (profileId == null) { | |
| 2773 throw new core.ArgumentError("Parameter profileId is required."); | |
| 2774 } | |
| 2775 if (id == null) { | |
| 2776 throw new core.ArgumentError("Parameter id is required."); | |
| 2777 } | |
| 2778 | |
| 2779 _downloadOptions = null; | |
| 2780 | |
| 2781 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/con
tentCategories/' + commons.Escaper.ecapeVariable('$id'); | |
| 2782 | |
| 2783 var _response = _requester.request(_url, | |
| 2784 "DELETE", | |
| 2785 body: _body, | |
| 2786 queryParams: _queryParams, | |
| 2787 uploadOptions: _uploadOptions, | |
| 2788 uploadMedia: _uploadMedia, | |
| 2789 downloadOptions: _downloadOptions); | |
| 2790 return _response.then((data) => null); | |
| 2791 } | |
| 2792 | |
| 2793 /** | |
| 2794 * Gets one content category by ID. | |
| 2795 * | |
| 2796 * Request parameters: | |
| 2797 * | |
| 2798 * [profileId] - User profile ID associated with this request. | |
| 2799 * | |
| 2800 * [id] - Content category ID. | |
| 2801 * | |
| 2802 * Completes with a [ContentCategory]. | |
| 2803 * | |
| 2804 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 2805 * error. | |
| 2806 * | |
| 2807 * If the used [http.Client] completes with an error when making a REST call, | |
| 2808 * this method will complete with the same error. | |
| 2809 */ | |
| 2810 async.Future<ContentCategory> get(core.String profileId, core.String id) { | |
| 2811 var _url = null; | |
| 2812 var _queryParams = new core.Map(); | |
| 2813 var _uploadMedia = null; | |
| 2814 var _uploadOptions = null; | |
| 2815 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 2816 var _body = null; | |
| 2817 | |
| 2818 if (profileId == null) { | |
| 2819 throw new core.ArgumentError("Parameter profileId is required."); | |
| 2820 } | |
| 2821 if (id == null) { | |
| 2822 throw new core.ArgumentError("Parameter id is required."); | |
| 2823 } | |
| 2824 | |
| 2825 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/con
tentCategories/' + commons.Escaper.ecapeVariable('$id'); | |
| 2826 | |
| 2827 var _response = _requester.request(_url, | |
| 2828 "GET", | |
| 2829 body: _body, | |
| 2830 queryParams: _queryParams, | |
| 2831 uploadOptions: _uploadOptions, | |
| 2832 uploadMedia: _uploadMedia, | |
| 2833 downloadOptions: _downloadOptions); | |
| 2834 return _response.then((data) => new ContentCategory.fromJson(data)); | |
| 2835 } | |
| 2836 | |
| 2837 /** | |
| 2838 * Inserts a new content category. | |
| 2839 * | |
| 2840 * [request] - The metadata request object. | |
| 2841 * | |
| 2842 * Request parameters: | |
| 2843 * | |
| 2844 * [profileId] - User profile ID associated with this request. | |
| 2845 * | |
| 2846 * Completes with a [ContentCategory]. | |
| 2847 * | |
| 2848 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 2849 * error. | |
| 2850 * | |
| 2851 * If the used [http.Client] completes with an error when making a REST call, | |
| 2852 * this method will complete with the same error. | |
| 2853 */ | |
| 2854 async.Future<ContentCategory> insert(ContentCategory request, core.String prof
ileId) { | |
| 2855 var _url = null; | |
| 2856 var _queryParams = new core.Map(); | |
| 2857 var _uploadMedia = null; | |
| 2858 var _uploadOptions = null; | |
| 2859 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 2860 var _body = null; | |
| 2861 | |
| 2862 if (request != null) { | |
| 2863 _body = convert.JSON.encode((request).toJson()); | |
| 2864 } | |
| 2865 if (profileId == null) { | |
| 2866 throw new core.ArgumentError("Parameter profileId is required."); | |
| 2867 } | |
| 2868 | |
| 2869 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/con
tentCategories'; | |
| 2870 | |
| 2871 var _response = _requester.request(_url, | |
| 2872 "POST", | |
| 2873 body: _body, | |
| 2874 queryParams: _queryParams, | |
| 2875 uploadOptions: _uploadOptions, | |
| 2876 uploadMedia: _uploadMedia, | |
| 2877 downloadOptions: _downloadOptions); | |
| 2878 return _response.then((data) => new ContentCategory.fromJson(data)); | |
| 2879 } | |
| 2880 | |
| 2881 /** | |
| 2882 * Retrieves a list of content categories, possibly filtered. | |
| 2883 * | |
| 2884 * Request parameters: | |
| 2885 * | |
| 2886 * [profileId] - User profile ID associated with this request. | |
| 2887 * | |
| 2888 * [ids] - Select only content categories with these IDs. | |
| 2889 * | |
| 2890 * [maxResults] - Maximum number of results to return. | |
| 2891 * | |
| 2892 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 2893 * | |
| 2894 * [searchString] - Allows searching for objects by name or ID. Wildcards (*) | |
| 2895 * are allowed. For example, "contentcategory*2015" will return objects with | |
| 2896 * names like "contentcategory June 2015", "contentcategory April 2015", or | |
| 2897 * simply "contentcategory 2015". Most of the searches also add wildcards | |
| 2898 * implicitly at the start and the end of the search string. For example, a | |
| 2899 * search string of "contentcategory" will match objects with name "my | |
| 2900 * contentcategory", "contentcategory 2015", or simply "contentcategory". | |
| 2901 * | |
| 2902 * [sortField] - Field by which to sort the list. | |
| 2903 * Possible string values are: | |
| 2904 * - "ID" | |
| 2905 * - "NAME" | |
| 2906 * | |
| 2907 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 2908 * Possible string values are: | |
| 2909 * - "ASCENDING" | |
| 2910 * - "DESCENDING" | |
| 2911 * | |
| 2912 * Completes with a [ContentCategoriesListResponse]. | |
| 2913 * | |
| 2914 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 2915 * error. | |
| 2916 * | |
| 2917 * If the used [http.Client] completes with an error when making a REST call, | |
| 2918 * this method will complete with the same error. | |
| 2919 */ | |
| 2920 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}) { | |
| 2921 var _url = null; | |
| 2922 var _queryParams = new core.Map(); | |
| 2923 var _uploadMedia = null; | |
| 2924 var _uploadOptions = null; | |
| 2925 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 2926 var _body = null; | |
| 2927 | |
| 2928 if (profileId == null) { | |
| 2929 throw new core.ArgumentError("Parameter profileId is required."); | |
| 2930 } | |
| 2931 if (ids != null) { | |
| 2932 _queryParams["ids"] = ids; | |
| 2933 } | |
| 2934 if (maxResults != null) { | |
| 2935 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 2936 } | |
| 2937 if (pageToken != null) { | |
| 2938 _queryParams["pageToken"] = [pageToken]; | |
| 2939 } | |
| 2940 if (searchString != null) { | |
| 2941 _queryParams["searchString"] = [searchString]; | |
| 2942 } | |
| 2943 if (sortField != null) { | |
| 2944 _queryParams["sortField"] = [sortField]; | |
| 2945 } | |
| 2946 if (sortOrder != null) { | |
| 2947 _queryParams["sortOrder"] = [sortOrder]; | |
| 2948 } | |
| 2949 | |
| 2950 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/con
tentCategories'; | |
| 2951 | |
| 2952 var _response = _requester.request(_url, | |
| 2953 "GET", | |
| 2954 body: _body, | |
| 2955 queryParams: _queryParams, | |
| 2956 uploadOptions: _uploadOptions, | |
| 2957 uploadMedia: _uploadMedia, | |
| 2958 downloadOptions: _downloadOptions); | |
| 2959 return _response.then((data) => new ContentCategoriesListResponse.fromJson(d
ata)); | |
| 2960 } | |
| 2961 | |
| 2962 /** | |
| 2963 * Updates an existing content category. This method supports patch semantics. | |
| 2964 * | |
| 2965 * [request] - The metadata request object. | |
| 2966 * | |
| 2967 * Request parameters: | |
| 2968 * | |
| 2969 * [profileId] - User profile ID associated with this request. | |
| 2970 * | |
| 2971 * [id] - Content category ID. | |
| 2972 * | |
| 2973 * Completes with a [ContentCategory]. | |
| 2974 * | |
| 2975 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 2976 * error. | |
| 2977 * | |
| 2978 * If the used [http.Client] completes with an error when making a REST call, | |
| 2979 * this method will complete with the same error. | |
| 2980 */ | |
| 2981 async.Future<ContentCategory> patch(ContentCategory request, core.String profi
leId, core.String id) { | |
| 2982 var _url = null; | |
| 2983 var _queryParams = new core.Map(); | |
| 2984 var _uploadMedia = null; | |
| 2985 var _uploadOptions = null; | |
| 2986 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 2987 var _body = null; | |
| 2988 | |
| 2989 if (request != null) { | |
| 2990 _body = convert.JSON.encode((request).toJson()); | |
| 2991 } | |
| 2992 if (profileId == null) { | |
| 2993 throw new core.ArgumentError("Parameter profileId is required."); | |
| 2994 } | |
| 2995 if (id == null) { | |
| 2996 throw new core.ArgumentError("Parameter id is required."); | |
| 2997 } | |
| 2998 _queryParams["id"] = [id]; | |
| 2999 | |
| 3000 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/con
tentCategories'; | |
| 3001 | |
| 3002 var _response = _requester.request(_url, | |
| 3003 "PATCH", | |
| 3004 body: _body, | |
| 3005 queryParams: _queryParams, | |
| 3006 uploadOptions: _uploadOptions, | |
| 3007 uploadMedia: _uploadMedia, | |
| 3008 downloadOptions: _downloadOptions); | |
| 3009 return _response.then((data) => new ContentCategory.fromJson(data)); | |
| 3010 } | |
| 3011 | |
| 3012 /** | |
| 3013 * Updates an existing content category. | |
| 3014 * | |
| 3015 * [request] - The metadata request object. | |
| 3016 * | |
| 3017 * Request parameters: | |
| 3018 * | |
| 3019 * [profileId] - User profile ID associated with this request. | |
| 3020 * | |
| 3021 * Completes with a [ContentCategory]. | |
| 3022 * | |
| 3023 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 3024 * error. | |
| 3025 * | |
| 3026 * If the used [http.Client] completes with an error when making a REST call, | |
| 3027 * this method will complete with the same error. | |
| 3028 */ | |
| 3029 async.Future<ContentCategory> update(ContentCategory request, core.String prof
ileId) { | |
| 3030 var _url = null; | |
| 3031 var _queryParams = new core.Map(); | |
| 3032 var _uploadMedia = null; | |
| 3033 var _uploadOptions = null; | |
| 3034 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 3035 var _body = null; | |
| 3036 | |
| 3037 if (request != null) { | |
| 3038 _body = convert.JSON.encode((request).toJson()); | |
| 3039 } | |
| 3040 if (profileId == null) { | |
| 3041 throw new core.ArgumentError("Parameter profileId is required."); | |
| 3042 } | |
| 3043 | |
| 3044 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/con
tentCategories'; | |
| 3045 | |
| 3046 var _response = _requester.request(_url, | |
| 3047 "PUT", | |
| 3048 body: _body, | |
| 3049 queryParams: _queryParams, | |
| 3050 uploadOptions: _uploadOptions, | |
| 3051 uploadMedia: _uploadMedia, | |
| 3052 downloadOptions: _downloadOptions); | |
| 3053 return _response.then((data) => new ContentCategory.fromJson(data)); | |
| 3054 } | |
| 3055 | |
| 3056 } | |
| 3057 | |
| 3058 | |
| 3059 class CountriesResourceApi { | |
| 3060 final commons.ApiRequester _requester; | |
| 3061 | |
| 3062 CountriesResourceApi(commons.ApiRequester client) : | |
| 3063 _requester = client; | |
| 3064 | |
| 3065 /** | |
| 3066 * Gets one country by ID. | |
| 3067 * | |
| 3068 * Request parameters: | |
| 3069 * | |
| 3070 * [profileId] - User profile ID associated with this request. | |
| 3071 * | |
| 3072 * [dartId] - Country DART ID. | |
| 3073 * | |
| 3074 * Completes with a [Country]. | |
| 3075 * | |
| 3076 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 3077 * error. | |
| 3078 * | |
| 3079 * If the used [http.Client] completes with an error when making a REST call, | |
| 3080 * this method will complete with the same error. | |
| 3081 */ | |
| 3082 async.Future<Country> get(core.String profileId, core.String dartId) { | |
| 3083 var _url = null; | |
| 3084 var _queryParams = new core.Map(); | |
| 3085 var _uploadMedia = null; | |
| 3086 var _uploadOptions = null; | |
| 3087 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 3088 var _body = null; | |
| 3089 | |
| 3090 if (profileId == null) { | |
| 3091 throw new core.ArgumentError("Parameter profileId is required."); | |
| 3092 } | |
| 3093 if (dartId == null) { | |
| 3094 throw new core.ArgumentError("Parameter dartId is required."); | |
| 3095 } | |
| 3096 | |
| 3097 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cou
ntries/' + commons.Escaper.ecapeVariable('$dartId'); | |
| 3098 | |
| 3099 var _response = _requester.request(_url, | |
| 3100 "GET", | |
| 3101 body: _body, | |
| 3102 queryParams: _queryParams, | |
| 3103 uploadOptions: _uploadOptions, | |
| 3104 uploadMedia: _uploadMedia, | |
| 3105 downloadOptions: _downloadOptions); | |
| 3106 return _response.then((data) => new Country.fromJson(data)); | |
| 3107 } | |
| 3108 | |
| 3109 /** | |
| 3110 * Retrieves a list of countries. | |
| 3111 * | |
| 3112 * Request parameters: | |
| 3113 * | |
| 3114 * [profileId] - User profile ID associated with this request. | |
| 3115 * | |
| 3116 * Completes with a [CountriesListResponse]. | |
| 3117 * | |
| 3118 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 3119 * error. | |
| 3120 * | |
| 3121 * If the used [http.Client] completes with an error when making a REST call, | |
| 3122 * this method will complete with the same error. | |
| 3123 */ | |
| 3124 async.Future<CountriesListResponse> list(core.String profileId) { | |
| 3125 var _url = null; | |
| 3126 var _queryParams = new core.Map(); | |
| 3127 var _uploadMedia = null; | |
| 3128 var _uploadOptions = null; | |
| 3129 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 3130 var _body = null; | |
| 3131 | |
| 3132 if (profileId == null) { | |
| 3133 throw new core.ArgumentError("Parameter profileId is required."); | |
| 3134 } | |
| 3135 | |
| 3136 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cou
ntries'; | |
| 3137 | |
| 3138 var _response = _requester.request(_url, | |
| 3139 "GET", | |
| 3140 body: _body, | |
| 3141 queryParams: _queryParams, | |
| 3142 uploadOptions: _uploadOptions, | |
| 3143 uploadMedia: _uploadMedia, | |
| 3144 downloadOptions: _downloadOptions); | |
| 3145 return _response.then((data) => new CountriesListResponse.fromJson(data)); | |
| 3146 } | |
| 3147 | |
| 3148 } | |
| 3149 | |
| 3150 | |
| 3151 class CreativeAssetsResourceApi { | |
| 3152 final commons.ApiRequester _requester; | |
| 3153 | |
| 3154 CreativeAssetsResourceApi(commons.ApiRequester client) : | |
| 3155 _requester = client; | |
| 3156 | |
| 3157 /** | |
| 3158 * Inserts a new creative asset. | |
| 3159 * | |
| 3160 * [request] - The metadata request object. | |
| 3161 * | |
| 3162 * Request parameters: | |
| 3163 * | |
| 3164 * [profileId] - User profile ID associated with this request. | |
| 3165 * | |
| 3166 * [advertiserId] - Advertiser ID of this creative. This is a required field. | |
| 3167 * | |
| 3168 * [uploadMedia] - The media to upload. | |
| 3169 * | |
| 3170 * [uploadOptions] - Options for the media upload. Streaming Media without the | |
| 3171 * length being known ahead of time is only supported via resumable uploads. | |
| 3172 * | |
| 3173 * Completes with a [CreativeAssetMetadata]. | |
| 3174 * | |
| 3175 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 3176 * error. | |
| 3177 * | |
| 3178 * If the used [http.Client] completes with an error when making a REST call, | |
| 3179 * this method will complete with the same error. | |
| 3180 */ | |
| 3181 async.Future<CreativeAssetMetadata> insert(CreativeAssetMetadata request, core
.String profileId, core.String advertiserId, {commons.UploadOptions uploadOption
s : commons.UploadOptions.Default, commons.Media uploadMedia}) { | |
| 3182 var _url = null; | |
| 3183 var _queryParams = new core.Map(); | |
| 3184 var _uploadMedia = null; | |
| 3185 var _uploadOptions = null; | |
| 3186 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 3187 var _body = null; | |
| 3188 | |
| 3189 if (request != null) { | |
| 3190 _body = convert.JSON.encode((request).toJson()); | |
| 3191 } | |
| 3192 if (profileId == null) { | |
| 3193 throw new core.ArgumentError("Parameter profileId is required."); | |
| 3194 } | |
| 3195 if (advertiserId == null) { | |
| 3196 throw new core.ArgumentError("Parameter advertiserId is required."); | |
| 3197 } | |
| 3198 | |
| 3199 _uploadMedia = uploadMedia; | |
| 3200 _uploadOptions = uploadOptions; | |
| 3201 | |
| 3202 if (_uploadMedia == null) { | |
| 3203 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/c
reativeAssets/' + commons.Escaper.ecapeVariable('$advertiserId') + '/creativeAss
ets'; | |
| 3204 } else if (_uploadOptions is commons.ResumableUploadOptions) { | |
| 3205 _url = '/resumable/upload/dfareporting/v2.2/userprofiles/' + commons.Escap
er.ecapeVariable('$profileId') + '/creativeAssets/' + commons.Escaper.ecapeVaria
ble('$advertiserId') + '/creativeAssets'; | |
| 3206 } else { | |
| 3207 _url = '/upload/dfareporting/v2.2/userprofiles/' + commons.Escaper.ecapeVa
riable('$profileId') + '/creativeAssets/' + commons.Escaper.ecapeVariable('$adve
rtiserId') + '/creativeAssets'; | |
| 3208 } | |
| 3209 | |
| 3210 | |
| 3211 var _response = _requester.request(_url, | |
| 3212 "POST", | |
| 3213 body: _body, | |
| 3214 queryParams: _queryParams, | |
| 3215 uploadOptions: _uploadOptions, | |
| 3216 uploadMedia: _uploadMedia, | |
| 3217 downloadOptions: _downloadOptions); | |
| 3218 return _response.then((data) => new CreativeAssetMetadata.fromJson(data)); | |
| 3219 } | |
| 3220 | |
| 3221 } | |
| 3222 | |
| 3223 | |
| 3224 class CreativeFieldValuesResourceApi { | |
| 3225 final commons.ApiRequester _requester; | |
| 3226 | |
| 3227 CreativeFieldValuesResourceApi(commons.ApiRequester client) : | |
| 3228 _requester = client; | |
| 3229 | |
| 3230 /** | |
| 3231 * Deletes an existing creative field value. | |
| 3232 * | |
| 3233 * Request parameters: | |
| 3234 * | |
| 3235 * [profileId] - User profile ID associated with this request. | |
| 3236 * | |
| 3237 * [creativeFieldId] - Creative field ID for this creative field value. | |
| 3238 * | |
| 3239 * [id] - Creative Field Value ID | |
| 3240 * | |
| 3241 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 3242 * error. | |
| 3243 * | |
| 3244 * If the used [http.Client] completes with an error when making a REST call, | |
| 3245 * this method will complete with the same error. | |
| 3246 */ | |
| 3247 async.Future delete(core.String profileId, core.String creativeFieldId, core.S
tring id) { | |
| 3248 var _url = null; | |
| 3249 var _queryParams = new core.Map(); | |
| 3250 var _uploadMedia = null; | |
| 3251 var _uploadOptions = null; | |
| 3252 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 3253 var _body = null; | |
| 3254 | |
| 3255 if (profileId == null) { | |
| 3256 throw new core.ArgumentError("Parameter profileId is required."); | |
| 3257 } | |
| 3258 if (creativeFieldId == null) { | |
| 3259 throw new core.ArgumentError("Parameter creativeFieldId is required."); | |
| 3260 } | |
| 3261 if (id == null) { | |
| 3262 throw new core.ArgumentError("Parameter id is required."); | |
| 3263 } | |
| 3264 | |
| 3265 _downloadOptions = null; | |
| 3266 | |
| 3267 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre
ativeFields/' + commons.Escaper.ecapeVariable('$creativeFieldId') + '/creativeFi
eldValues/' + commons.Escaper.ecapeVariable('$id'); | |
| 3268 | |
| 3269 var _response = _requester.request(_url, | |
| 3270 "DELETE", | |
| 3271 body: _body, | |
| 3272 queryParams: _queryParams, | |
| 3273 uploadOptions: _uploadOptions, | |
| 3274 uploadMedia: _uploadMedia, | |
| 3275 downloadOptions: _downloadOptions); | |
| 3276 return _response.then((data) => null); | |
| 3277 } | |
| 3278 | |
| 3279 /** | |
| 3280 * Gets one creative field value by ID. | |
| 3281 * | |
| 3282 * Request parameters: | |
| 3283 * | |
| 3284 * [profileId] - User profile ID associated with this request. | |
| 3285 * | |
| 3286 * [creativeFieldId] - Creative field ID for this creative field value. | |
| 3287 * | |
| 3288 * [id] - Creative Field Value ID | |
| 3289 * | |
| 3290 * Completes with a [CreativeFieldValue]. | |
| 3291 * | |
| 3292 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 3293 * error. | |
| 3294 * | |
| 3295 * If the used [http.Client] completes with an error when making a REST call, | |
| 3296 * this method will complete with the same error. | |
| 3297 */ | |
| 3298 async.Future<CreativeFieldValue> get(core.String profileId, core.String creati
veFieldId, core.String id) { | |
| 3299 var _url = null; | |
| 3300 var _queryParams = new core.Map(); | |
| 3301 var _uploadMedia = null; | |
| 3302 var _uploadOptions = null; | |
| 3303 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 3304 var _body = null; | |
| 3305 | |
| 3306 if (profileId == null) { | |
| 3307 throw new core.ArgumentError("Parameter profileId is required."); | |
| 3308 } | |
| 3309 if (creativeFieldId == null) { | |
| 3310 throw new core.ArgumentError("Parameter creativeFieldId is required."); | |
| 3311 } | |
| 3312 if (id == null) { | |
| 3313 throw new core.ArgumentError("Parameter id is required."); | |
| 3314 } | |
| 3315 | |
| 3316 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre
ativeFields/' + commons.Escaper.ecapeVariable('$creativeFieldId') + '/creativeFi
eldValues/' + commons.Escaper.ecapeVariable('$id'); | |
| 3317 | |
| 3318 var _response = _requester.request(_url, | |
| 3319 "GET", | |
| 3320 body: _body, | |
| 3321 queryParams: _queryParams, | |
| 3322 uploadOptions: _uploadOptions, | |
| 3323 uploadMedia: _uploadMedia, | |
| 3324 downloadOptions: _downloadOptions); | |
| 3325 return _response.then((data) => new CreativeFieldValue.fromJson(data)); | |
| 3326 } | |
| 3327 | |
| 3328 /** | |
| 3329 * Inserts a new creative field value. | |
| 3330 * | |
| 3331 * [request] - The metadata request object. | |
| 3332 * | |
| 3333 * Request parameters: | |
| 3334 * | |
| 3335 * [profileId] - User profile ID associated with this request. | |
| 3336 * | |
| 3337 * [creativeFieldId] - Creative field ID for this creative field value. | |
| 3338 * | |
| 3339 * Completes with a [CreativeFieldValue]. | |
| 3340 * | |
| 3341 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 3342 * error. | |
| 3343 * | |
| 3344 * If the used [http.Client] completes with an error when making a REST call, | |
| 3345 * this method will complete with the same error. | |
| 3346 */ | |
| 3347 async.Future<CreativeFieldValue> insert(CreativeFieldValue request, core.Strin
g profileId, core.String creativeFieldId) { | |
| 3348 var _url = null; | |
| 3349 var _queryParams = new core.Map(); | |
| 3350 var _uploadMedia = null; | |
| 3351 var _uploadOptions = null; | |
| 3352 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 3353 var _body = null; | |
| 3354 | |
| 3355 if (request != null) { | |
| 3356 _body = convert.JSON.encode((request).toJson()); | |
| 3357 } | |
| 3358 if (profileId == null) { | |
| 3359 throw new core.ArgumentError("Parameter profileId is required."); | |
| 3360 } | |
| 3361 if (creativeFieldId == null) { | |
| 3362 throw new core.ArgumentError("Parameter creativeFieldId is required."); | |
| 3363 } | |
| 3364 | |
| 3365 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre
ativeFields/' + commons.Escaper.ecapeVariable('$creativeFieldId') + '/creativeFi
eldValues'; | |
| 3366 | |
| 3367 var _response = _requester.request(_url, | |
| 3368 "POST", | |
| 3369 body: _body, | |
| 3370 queryParams: _queryParams, | |
| 3371 uploadOptions: _uploadOptions, | |
| 3372 uploadMedia: _uploadMedia, | |
| 3373 downloadOptions: _downloadOptions); | |
| 3374 return _response.then((data) => new CreativeFieldValue.fromJson(data)); | |
| 3375 } | |
| 3376 | |
| 3377 /** | |
| 3378 * Retrieves a list of creative field values, possibly filtered. | |
| 3379 * | |
| 3380 * Request parameters: | |
| 3381 * | |
| 3382 * [profileId] - User profile ID associated with this request. | |
| 3383 * | |
| 3384 * [creativeFieldId] - Creative field ID for this creative field value. | |
| 3385 * | |
| 3386 * [ids] - Select only creative field values with these IDs. | |
| 3387 * | |
| 3388 * [maxResults] - Maximum number of results to return. | |
| 3389 * | |
| 3390 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 3391 * | |
| 3392 * [searchString] - Allows searching for creative field values by their | |
| 3393 * values. Wildcards (e.g. *) are not allowed. | |
| 3394 * | |
| 3395 * [sortField] - Field by which to sort the list. | |
| 3396 * Possible string values are: | |
| 3397 * - "ID" | |
| 3398 * - "VALUE" | |
| 3399 * | |
| 3400 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 3401 * Possible string values are: | |
| 3402 * - "ASCENDING" | |
| 3403 * - "DESCENDING" | |
| 3404 * | |
| 3405 * Completes with a [CreativeFieldValuesListResponse]. | |
| 3406 * | |
| 3407 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 3408 * error. | |
| 3409 * | |
| 3410 * If the used [http.Client] completes with an error when making a REST call, | |
| 3411 * this method will complete with the same error. | |
| 3412 */ | |
| 3413 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}) { | |
| 3414 var _url = null; | |
| 3415 var _queryParams = new core.Map(); | |
| 3416 var _uploadMedia = null; | |
| 3417 var _uploadOptions = null; | |
| 3418 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 3419 var _body = null; | |
| 3420 | |
| 3421 if (profileId == null) { | |
| 3422 throw new core.ArgumentError("Parameter profileId is required."); | |
| 3423 } | |
| 3424 if (creativeFieldId == null) { | |
| 3425 throw new core.ArgumentError("Parameter creativeFieldId is required."); | |
| 3426 } | |
| 3427 if (ids != null) { | |
| 3428 _queryParams["ids"] = ids; | |
| 3429 } | |
| 3430 if (maxResults != null) { | |
| 3431 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 3432 } | |
| 3433 if (pageToken != null) { | |
| 3434 _queryParams["pageToken"] = [pageToken]; | |
| 3435 } | |
| 3436 if (searchString != null) { | |
| 3437 _queryParams["searchString"] = [searchString]; | |
| 3438 } | |
| 3439 if (sortField != null) { | |
| 3440 _queryParams["sortField"] = [sortField]; | |
| 3441 } | |
| 3442 if (sortOrder != null) { | |
| 3443 _queryParams["sortOrder"] = [sortOrder]; | |
| 3444 } | |
| 3445 | |
| 3446 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre
ativeFields/' + commons.Escaper.ecapeVariable('$creativeFieldId') + '/creativeFi
eldValues'; | |
| 3447 | |
| 3448 var _response = _requester.request(_url, | |
| 3449 "GET", | |
| 3450 body: _body, | |
| 3451 queryParams: _queryParams, | |
| 3452 uploadOptions: _uploadOptions, | |
| 3453 uploadMedia: _uploadMedia, | |
| 3454 downloadOptions: _downloadOptions); | |
| 3455 return _response.then((data) => new CreativeFieldValuesListResponse.fromJson
(data)); | |
| 3456 } | |
| 3457 | |
| 3458 /** | |
| 3459 * Updates an existing creative field value. This method supports patch | |
| 3460 * semantics. | |
| 3461 * | |
| 3462 * [request] - The metadata request object. | |
| 3463 * | |
| 3464 * Request parameters: | |
| 3465 * | |
| 3466 * [profileId] - User profile ID associated with this request. | |
| 3467 * | |
| 3468 * [creativeFieldId] - Creative field ID for this creative field value. | |
| 3469 * | |
| 3470 * [id] - Creative Field Value ID | |
| 3471 * | |
| 3472 * Completes with a [CreativeFieldValue]. | |
| 3473 * | |
| 3474 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 3475 * error. | |
| 3476 * | |
| 3477 * If the used [http.Client] completes with an error when making a REST call, | |
| 3478 * this method will complete with the same error. | |
| 3479 */ | |
| 3480 async.Future<CreativeFieldValue> patch(CreativeFieldValue request, core.String
profileId, core.String creativeFieldId, core.String id) { | |
| 3481 var _url = null; | |
| 3482 var _queryParams = new core.Map(); | |
| 3483 var _uploadMedia = null; | |
| 3484 var _uploadOptions = null; | |
| 3485 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 3486 var _body = null; | |
| 3487 | |
| 3488 if (request != null) { | |
| 3489 _body = convert.JSON.encode((request).toJson()); | |
| 3490 } | |
| 3491 if (profileId == null) { | |
| 3492 throw new core.ArgumentError("Parameter profileId is required."); | |
| 3493 } | |
| 3494 if (creativeFieldId == null) { | |
| 3495 throw new core.ArgumentError("Parameter creativeFieldId is required."); | |
| 3496 } | |
| 3497 if (id == null) { | |
| 3498 throw new core.ArgumentError("Parameter id is required."); | |
| 3499 } | |
| 3500 _queryParams["id"] = [id]; | |
| 3501 | |
| 3502 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre
ativeFields/' + commons.Escaper.ecapeVariable('$creativeFieldId') + '/creativeFi
eldValues'; | |
| 3503 | |
| 3504 var _response = _requester.request(_url, | |
| 3505 "PATCH", | |
| 3506 body: _body, | |
| 3507 queryParams: _queryParams, | |
| 3508 uploadOptions: _uploadOptions, | |
| 3509 uploadMedia: _uploadMedia, | |
| 3510 downloadOptions: _downloadOptions); | |
| 3511 return _response.then((data) => new CreativeFieldValue.fromJson(data)); | |
| 3512 } | |
| 3513 | |
| 3514 /** | |
| 3515 * Updates an existing creative field value. | |
| 3516 * | |
| 3517 * [request] - The metadata request object. | |
| 3518 * | |
| 3519 * Request parameters: | |
| 3520 * | |
| 3521 * [profileId] - User profile ID associated with this request. | |
| 3522 * | |
| 3523 * [creativeFieldId] - Creative field ID for this creative field value. | |
| 3524 * | |
| 3525 * Completes with a [CreativeFieldValue]. | |
| 3526 * | |
| 3527 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 3528 * error. | |
| 3529 * | |
| 3530 * If the used [http.Client] completes with an error when making a REST call, | |
| 3531 * this method will complete with the same error. | |
| 3532 */ | |
| 3533 async.Future<CreativeFieldValue> update(CreativeFieldValue request, core.Strin
g profileId, core.String creativeFieldId) { | |
| 3534 var _url = null; | |
| 3535 var _queryParams = new core.Map(); | |
| 3536 var _uploadMedia = null; | |
| 3537 var _uploadOptions = null; | |
| 3538 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 3539 var _body = null; | |
| 3540 | |
| 3541 if (request != null) { | |
| 3542 _body = convert.JSON.encode((request).toJson()); | |
| 3543 } | |
| 3544 if (profileId == null) { | |
| 3545 throw new core.ArgumentError("Parameter profileId is required."); | |
| 3546 } | |
| 3547 if (creativeFieldId == null) { | |
| 3548 throw new core.ArgumentError("Parameter creativeFieldId is required."); | |
| 3549 } | |
| 3550 | |
| 3551 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre
ativeFields/' + commons.Escaper.ecapeVariable('$creativeFieldId') + '/creativeFi
eldValues'; | |
| 3552 | |
| 3553 var _response = _requester.request(_url, | |
| 3554 "PUT", | |
| 3555 body: _body, | |
| 3556 queryParams: _queryParams, | |
| 3557 uploadOptions: _uploadOptions, | |
| 3558 uploadMedia: _uploadMedia, | |
| 3559 downloadOptions: _downloadOptions); | |
| 3560 return _response.then((data) => new CreativeFieldValue.fromJson(data)); | |
| 3561 } | |
| 3562 | |
| 3563 } | |
| 3564 | |
| 3565 | |
| 3566 class CreativeFieldsResourceApi { | |
| 3567 final commons.ApiRequester _requester; | |
| 3568 | |
| 3569 CreativeFieldsResourceApi(commons.ApiRequester client) : | |
| 3570 _requester = client; | |
| 3571 | |
| 3572 /** | |
| 3573 * Deletes an existing creative field. | |
| 3574 * | |
| 3575 * Request parameters: | |
| 3576 * | |
| 3577 * [profileId] - User profile ID associated with this request. | |
| 3578 * | |
| 3579 * [id] - Creative Field ID | |
| 3580 * | |
| 3581 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 3582 * error. | |
| 3583 * | |
| 3584 * If the used [http.Client] completes with an error when making a REST call, | |
| 3585 * this method will complete with the same error. | |
| 3586 */ | |
| 3587 async.Future delete(core.String profileId, core.String id) { | |
| 3588 var _url = null; | |
| 3589 var _queryParams = new core.Map(); | |
| 3590 var _uploadMedia = null; | |
| 3591 var _uploadOptions = null; | |
| 3592 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 3593 var _body = null; | |
| 3594 | |
| 3595 if (profileId == null) { | |
| 3596 throw new core.ArgumentError("Parameter profileId is required."); | |
| 3597 } | |
| 3598 if (id == null) { | |
| 3599 throw new core.ArgumentError("Parameter id is required."); | |
| 3600 } | |
| 3601 | |
| 3602 _downloadOptions = null; | |
| 3603 | |
| 3604 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre
ativeFields/' + commons.Escaper.ecapeVariable('$id'); | |
| 3605 | |
| 3606 var _response = _requester.request(_url, | |
| 3607 "DELETE", | |
| 3608 body: _body, | |
| 3609 queryParams: _queryParams, | |
| 3610 uploadOptions: _uploadOptions, | |
| 3611 uploadMedia: _uploadMedia, | |
| 3612 downloadOptions: _downloadOptions); | |
| 3613 return _response.then((data) => null); | |
| 3614 } | |
| 3615 | |
| 3616 /** | |
| 3617 * Gets one creative field by ID. | |
| 3618 * | |
| 3619 * Request parameters: | |
| 3620 * | |
| 3621 * [profileId] - User profile ID associated with this request. | |
| 3622 * | |
| 3623 * [id] - Creative Field ID | |
| 3624 * | |
| 3625 * Completes with a [CreativeField]. | |
| 3626 * | |
| 3627 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 3628 * error. | |
| 3629 * | |
| 3630 * If the used [http.Client] completes with an error when making a REST call, | |
| 3631 * this method will complete with the same error. | |
| 3632 */ | |
| 3633 async.Future<CreativeField> get(core.String profileId, core.String id) { | |
| 3634 var _url = null; | |
| 3635 var _queryParams = new core.Map(); | |
| 3636 var _uploadMedia = null; | |
| 3637 var _uploadOptions = null; | |
| 3638 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 3639 var _body = null; | |
| 3640 | |
| 3641 if (profileId == null) { | |
| 3642 throw new core.ArgumentError("Parameter profileId is required."); | |
| 3643 } | |
| 3644 if (id == null) { | |
| 3645 throw new core.ArgumentError("Parameter id is required."); | |
| 3646 } | |
| 3647 | |
| 3648 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre
ativeFields/' + commons.Escaper.ecapeVariable('$id'); | |
| 3649 | |
| 3650 var _response = _requester.request(_url, | |
| 3651 "GET", | |
| 3652 body: _body, | |
| 3653 queryParams: _queryParams, | |
| 3654 uploadOptions: _uploadOptions, | |
| 3655 uploadMedia: _uploadMedia, | |
| 3656 downloadOptions: _downloadOptions); | |
| 3657 return _response.then((data) => new CreativeField.fromJson(data)); | |
| 3658 } | |
| 3659 | |
| 3660 /** | |
| 3661 * Inserts a new creative field. | |
| 3662 * | |
| 3663 * [request] - The metadata request object. | |
| 3664 * | |
| 3665 * Request parameters: | |
| 3666 * | |
| 3667 * [profileId] - User profile ID associated with this request. | |
| 3668 * | |
| 3669 * Completes with a [CreativeField]. | |
| 3670 * | |
| 3671 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 3672 * error. | |
| 3673 * | |
| 3674 * If the used [http.Client] completes with an error when making a REST call, | |
| 3675 * this method will complete with the same error. | |
| 3676 */ | |
| 3677 async.Future<CreativeField> insert(CreativeField request, core.String profileI
d) { | |
| 3678 var _url = null; | |
| 3679 var _queryParams = new core.Map(); | |
| 3680 var _uploadMedia = null; | |
| 3681 var _uploadOptions = null; | |
| 3682 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 3683 var _body = null; | |
| 3684 | |
| 3685 if (request != null) { | |
| 3686 _body = convert.JSON.encode((request).toJson()); | |
| 3687 } | |
| 3688 if (profileId == null) { | |
| 3689 throw new core.ArgumentError("Parameter profileId is required."); | |
| 3690 } | |
| 3691 | |
| 3692 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre
ativeFields'; | |
| 3693 | |
| 3694 var _response = _requester.request(_url, | |
| 3695 "POST", | |
| 3696 body: _body, | |
| 3697 queryParams: _queryParams, | |
| 3698 uploadOptions: _uploadOptions, | |
| 3699 uploadMedia: _uploadMedia, | |
| 3700 downloadOptions: _downloadOptions); | |
| 3701 return _response.then((data) => new CreativeField.fromJson(data)); | |
| 3702 } | |
| 3703 | |
| 3704 /** | |
| 3705 * Retrieves a list of creative fields, possibly filtered. | |
| 3706 * | |
| 3707 * Request parameters: | |
| 3708 * | |
| 3709 * [profileId] - User profile ID associated with this request. | |
| 3710 * | |
| 3711 * [advertiserIds] - Select only creative fields that belong to these | |
| 3712 * advertisers. | |
| 3713 * | |
| 3714 * [ids] - Select only creative fields with these IDs. | |
| 3715 * | |
| 3716 * [maxResults] - Maximum number of results to return. | |
| 3717 * | |
| 3718 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 3719 * | |
| 3720 * [searchString] - Allows searching for creative fields by name or ID. | |
| 3721 * Wildcards (*) are allowed. For example, "creativefield*2015" will return | |
| 3722 * creative fields with names like "creativefield June 2015", "creativefield | |
| 3723 * April 2015", or simply "creativefield 2015". Most of the searches also add | |
| 3724 * wild-cards implicitly at the start and the end of the search string. For | |
| 3725 * example, a search string of "creativefield" will match creative fields with | |
| 3726 * the name "my creativefield", "creativefield 2015", or simply | |
| 3727 * "creativefield". | |
| 3728 * | |
| 3729 * [sortField] - Field by which to sort the list. | |
| 3730 * Possible string values are: | |
| 3731 * - "ID" | |
| 3732 * - "NAME" | |
| 3733 * | |
| 3734 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 3735 * Possible string values are: | |
| 3736 * - "ASCENDING" | |
| 3737 * - "DESCENDING" | |
| 3738 * | |
| 3739 * Completes with a [CreativeFieldsListResponse]. | |
| 3740 * | |
| 3741 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 3742 * error. | |
| 3743 * | |
| 3744 * If the used [http.Client] completes with an error when making a REST call, | |
| 3745 * this method will complete with the same error. | |
| 3746 */ | |
| 3747 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}) { | |
| 3748 var _url = null; | |
| 3749 var _queryParams = new core.Map(); | |
| 3750 var _uploadMedia = null; | |
| 3751 var _uploadOptions = null; | |
| 3752 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 3753 var _body = null; | |
| 3754 | |
| 3755 if (profileId == null) { | |
| 3756 throw new core.ArgumentError("Parameter profileId is required."); | |
| 3757 } | |
| 3758 if (advertiserIds != null) { | |
| 3759 _queryParams["advertiserIds"] = advertiserIds; | |
| 3760 } | |
| 3761 if (ids != null) { | |
| 3762 _queryParams["ids"] = ids; | |
| 3763 } | |
| 3764 if (maxResults != null) { | |
| 3765 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 3766 } | |
| 3767 if (pageToken != null) { | |
| 3768 _queryParams["pageToken"] = [pageToken]; | |
| 3769 } | |
| 3770 if (searchString != null) { | |
| 3771 _queryParams["searchString"] = [searchString]; | |
| 3772 } | |
| 3773 if (sortField != null) { | |
| 3774 _queryParams["sortField"] = [sortField]; | |
| 3775 } | |
| 3776 if (sortOrder != null) { | |
| 3777 _queryParams["sortOrder"] = [sortOrder]; | |
| 3778 } | |
| 3779 | |
| 3780 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre
ativeFields'; | |
| 3781 | |
| 3782 var _response = _requester.request(_url, | |
| 3783 "GET", | |
| 3784 body: _body, | |
| 3785 queryParams: _queryParams, | |
| 3786 uploadOptions: _uploadOptions, | |
| 3787 uploadMedia: _uploadMedia, | |
| 3788 downloadOptions: _downloadOptions); | |
| 3789 return _response.then((data) => new CreativeFieldsListResponse.fromJson(data
)); | |
| 3790 } | |
| 3791 | |
| 3792 /** | |
| 3793 * Updates an existing creative field. This method supports patch semantics. | |
| 3794 * | |
| 3795 * [request] - The metadata request object. | |
| 3796 * | |
| 3797 * Request parameters: | |
| 3798 * | |
| 3799 * [profileId] - User profile ID associated with this request. | |
| 3800 * | |
| 3801 * [id] - Creative Field ID | |
| 3802 * | |
| 3803 * Completes with a [CreativeField]. | |
| 3804 * | |
| 3805 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 3806 * error. | |
| 3807 * | |
| 3808 * If the used [http.Client] completes with an error when making a REST call, | |
| 3809 * this method will complete with the same error. | |
| 3810 */ | |
| 3811 async.Future<CreativeField> patch(CreativeField request, core.String profileId
, core.String id) { | |
| 3812 var _url = null; | |
| 3813 var _queryParams = new core.Map(); | |
| 3814 var _uploadMedia = null; | |
| 3815 var _uploadOptions = null; | |
| 3816 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 3817 var _body = null; | |
| 3818 | |
| 3819 if (request != null) { | |
| 3820 _body = convert.JSON.encode((request).toJson()); | |
| 3821 } | |
| 3822 if (profileId == null) { | |
| 3823 throw new core.ArgumentError("Parameter profileId is required."); | |
| 3824 } | |
| 3825 if (id == null) { | |
| 3826 throw new core.ArgumentError("Parameter id is required."); | |
| 3827 } | |
| 3828 _queryParams["id"] = [id]; | |
| 3829 | |
| 3830 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre
ativeFields'; | |
| 3831 | |
| 3832 var _response = _requester.request(_url, | |
| 3833 "PATCH", | |
| 3834 body: _body, | |
| 3835 queryParams: _queryParams, | |
| 3836 uploadOptions: _uploadOptions, | |
| 3837 uploadMedia: _uploadMedia, | |
| 3838 downloadOptions: _downloadOptions); | |
| 3839 return _response.then((data) => new CreativeField.fromJson(data)); | |
| 3840 } | |
| 3841 | |
| 3842 /** | |
| 3843 * Updates an existing creative field. | |
| 3844 * | |
| 3845 * [request] - The metadata request object. | |
| 3846 * | |
| 3847 * Request parameters: | |
| 3848 * | |
| 3849 * [profileId] - User profile ID associated with this request. | |
| 3850 * | |
| 3851 * Completes with a [CreativeField]. | |
| 3852 * | |
| 3853 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 3854 * error. | |
| 3855 * | |
| 3856 * If the used [http.Client] completes with an error when making a REST call, | |
| 3857 * this method will complete with the same error. | |
| 3858 */ | |
| 3859 async.Future<CreativeField> update(CreativeField request, core.String profileI
d) { | |
| 3860 var _url = null; | |
| 3861 var _queryParams = new core.Map(); | |
| 3862 var _uploadMedia = null; | |
| 3863 var _uploadOptions = null; | |
| 3864 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 3865 var _body = null; | |
| 3866 | |
| 3867 if (request != null) { | |
| 3868 _body = convert.JSON.encode((request).toJson()); | |
| 3869 } | |
| 3870 if (profileId == null) { | |
| 3871 throw new core.ArgumentError("Parameter profileId is required."); | |
| 3872 } | |
| 3873 | |
| 3874 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre
ativeFields'; | |
| 3875 | |
| 3876 var _response = _requester.request(_url, | |
| 3877 "PUT", | |
| 3878 body: _body, | |
| 3879 queryParams: _queryParams, | |
| 3880 uploadOptions: _uploadOptions, | |
| 3881 uploadMedia: _uploadMedia, | |
| 3882 downloadOptions: _downloadOptions); | |
| 3883 return _response.then((data) => new CreativeField.fromJson(data)); | |
| 3884 } | |
| 3885 | |
| 3886 } | |
| 3887 | |
| 3888 | |
| 3889 class CreativeGroupsResourceApi { | |
| 3890 final commons.ApiRequester _requester; | |
| 3891 | |
| 3892 CreativeGroupsResourceApi(commons.ApiRequester client) : | |
| 3893 _requester = client; | |
| 3894 | |
| 3895 /** | |
| 3896 * Gets one creative group by ID. | |
| 3897 * | |
| 3898 * Request parameters: | |
| 3899 * | |
| 3900 * [profileId] - User profile ID associated with this request. | |
| 3901 * | |
| 3902 * [id] - Creative group ID. | |
| 3903 * | |
| 3904 * Completes with a [CreativeGroup]. | |
| 3905 * | |
| 3906 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 3907 * error. | |
| 3908 * | |
| 3909 * If the used [http.Client] completes with an error when making a REST call, | |
| 3910 * this method will complete with the same error. | |
| 3911 */ | |
| 3912 async.Future<CreativeGroup> get(core.String profileId, core.String id) { | |
| 3913 var _url = null; | |
| 3914 var _queryParams = new core.Map(); | |
| 3915 var _uploadMedia = null; | |
| 3916 var _uploadOptions = null; | |
| 3917 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 3918 var _body = null; | |
| 3919 | |
| 3920 if (profileId == null) { | |
| 3921 throw new core.ArgumentError("Parameter profileId is required."); | |
| 3922 } | |
| 3923 if (id == null) { | |
| 3924 throw new core.ArgumentError("Parameter id is required."); | |
| 3925 } | |
| 3926 | |
| 3927 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre
ativeGroups/' + commons.Escaper.ecapeVariable('$id'); | |
| 3928 | |
| 3929 var _response = _requester.request(_url, | |
| 3930 "GET", | |
| 3931 body: _body, | |
| 3932 queryParams: _queryParams, | |
| 3933 uploadOptions: _uploadOptions, | |
| 3934 uploadMedia: _uploadMedia, | |
| 3935 downloadOptions: _downloadOptions); | |
| 3936 return _response.then((data) => new CreativeGroup.fromJson(data)); | |
| 3937 } | |
| 3938 | |
| 3939 /** | |
| 3940 * Inserts a new creative group. | |
| 3941 * | |
| 3942 * [request] - The metadata request object. | |
| 3943 * | |
| 3944 * Request parameters: | |
| 3945 * | |
| 3946 * [profileId] - User profile ID associated with this request. | |
| 3947 * | |
| 3948 * Completes with a [CreativeGroup]. | |
| 3949 * | |
| 3950 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 3951 * error. | |
| 3952 * | |
| 3953 * If the used [http.Client] completes with an error when making a REST call, | |
| 3954 * this method will complete with the same error. | |
| 3955 */ | |
| 3956 async.Future<CreativeGroup> insert(CreativeGroup request, core.String profileI
d) { | |
| 3957 var _url = null; | |
| 3958 var _queryParams = new core.Map(); | |
| 3959 var _uploadMedia = null; | |
| 3960 var _uploadOptions = null; | |
| 3961 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 3962 var _body = null; | |
| 3963 | |
| 3964 if (request != null) { | |
| 3965 _body = convert.JSON.encode((request).toJson()); | |
| 3966 } | |
| 3967 if (profileId == null) { | |
| 3968 throw new core.ArgumentError("Parameter profileId is required."); | |
| 3969 } | |
| 3970 | |
| 3971 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre
ativeGroups'; | |
| 3972 | |
| 3973 var _response = _requester.request(_url, | |
| 3974 "POST", | |
| 3975 body: _body, | |
| 3976 queryParams: _queryParams, | |
| 3977 uploadOptions: _uploadOptions, | |
| 3978 uploadMedia: _uploadMedia, | |
| 3979 downloadOptions: _downloadOptions); | |
| 3980 return _response.then((data) => new CreativeGroup.fromJson(data)); | |
| 3981 } | |
| 3982 | |
| 3983 /** | |
| 3984 * Retrieves a list of creative groups, possibly filtered. | |
| 3985 * | |
| 3986 * Request parameters: | |
| 3987 * | |
| 3988 * [profileId] - User profile ID associated with this request. | |
| 3989 * | |
| 3990 * [advertiserIds] - Select only creative groups that belong to these | |
| 3991 * advertisers. | |
| 3992 * | |
| 3993 * [groupNumber] - Select only creative groups that belong to this subgroup. | |
| 3994 * | |
| 3995 * [ids] - Select only creative groups with these IDs. | |
| 3996 * | |
| 3997 * [maxResults] - Maximum number of results to return. | |
| 3998 * | |
| 3999 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 4000 * | |
| 4001 * [searchString] - Allows searching for creative groups by name or ID. | |
| 4002 * Wildcards (*) are allowed. For example, "creativegroup*2015" will return | |
| 4003 * creative groups with names like "creativegroup June 2015", "creativegroup | |
| 4004 * April 2015", or simply "creativegroup 2015". Most of the searches also add | |
| 4005 * wild-cards implicitly at the start and the end of the search string. For | |
| 4006 * example, a search string of "creativegroup" will match creative groups with | |
| 4007 * the name "my creativegroup", "creativegroup 2015", or simply | |
| 4008 * "creativegroup". | |
| 4009 * | |
| 4010 * [sortField] - Field by which to sort the list. | |
| 4011 * Possible string values are: | |
| 4012 * - "ID" | |
| 4013 * - "NAME" | |
| 4014 * | |
| 4015 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 4016 * Possible string values are: | |
| 4017 * - "ASCENDING" | |
| 4018 * - "DESCENDING" | |
| 4019 * | |
| 4020 * Completes with a [CreativeGroupsListResponse]. | |
| 4021 * | |
| 4022 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 4023 * error. | |
| 4024 * | |
| 4025 * If the used [http.Client] completes with an error when making a REST call, | |
| 4026 * this method will complete with the same error. | |
| 4027 */ | |
| 4028 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}) { | |
| 4029 var _url = null; | |
| 4030 var _queryParams = new core.Map(); | |
| 4031 var _uploadMedia = null; | |
| 4032 var _uploadOptions = null; | |
| 4033 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 4034 var _body = null; | |
| 4035 | |
| 4036 if (profileId == null) { | |
| 4037 throw new core.ArgumentError("Parameter profileId is required."); | |
| 4038 } | |
| 4039 if (advertiserIds != null) { | |
| 4040 _queryParams["advertiserIds"] = advertiserIds; | |
| 4041 } | |
| 4042 if (groupNumber != null) { | |
| 4043 _queryParams["groupNumber"] = ["${groupNumber}"]; | |
| 4044 } | |
| 4045 if (ids != null) { | |
| 4046 _queryParams["ids"] = ids; | |
| 4047 } | |
| 4048 if (maxResults != null) { | |
| 4049 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 4050 } | |
| 4051 if (pageToken != null) { | |
| 4052 _queryParams["pageToken"] = [pageToken]; | |
| 4053 } | |
| 4054 if (searchString != null) { | |
| 4055 _queryParams["searchString"] = [searchString]; | |
| 4056 } | |
| 4057 if (sortField != null) { | |
| 4058 _queryParams["sortField"] = [sortField]; | |
| 4059 } | |
| 4060 if (sortOrder != null) { | |
| 4061 _queryParams["sortOrder"] = [sortOrder]; | |
| 4062 } | |
| 4063 | |
| 4064 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre
ativeGroups'; | |
| 4065 | |
| 4066 var _response = _requester.request(_url, | |
| 4067 "GET", | |
| 4068 body: _body, | |
| 4069 queryParams: _queryParams, | |
| 4070 uploadOptions: _uploadOptions, | |
| 4071 uploadMedia: _uploadMedia, | |
| 4072 downloadOptions: _downloadOptions); | |
| 4073 return _response.then((data) => new CreativeGroupsListResponse.fromJson(data
)); | |
| 4074 } | |
| 4075 | |
| 4076 /** | |
| 4077 * Updates an existing creative group. This method supports patch semantics. | |
| 4078 * | |
| 4079 * [request] - The metadata request object. | |
| 4080 * | |
| 4081 * Request parameters: | |
| 4082 * | |
| 4083 * [profileId] - User profile ID associated with this request. | |
| 4084 * | |
| 4085 * [id] - Creative group ID. | |
| 4086 * | |
| 4087 * Completes with a [CreativeGroup]. | |
| 4088 * | |
| 4089 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 4090 * error. | |
| 4091 * | |
| 4092 * If the used [http.Client] completes with an error when making a REST call, | |
| 4093 * this method will complete with the same error. | |
| 4094 */ | |
| 4095 async.Future<CreativeGroup> patch(CreativeGroup request, core.String profileId
, core.String id) { | |
| 4096 var _url = null; | |
| 4097 var _queryParams = new core.Map(); | |
| 4098 var _uploadMedia = null; | |
| 4099 var _uploadOptions = null; | |
| 4100 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 4101 var _body = null; | |
| 4102 | |
| 4103 if (request != null) { | |
| 4104 _body = convert.JSON.encode((request).toJson()); | |
| 4105 } | |
| 4106 if (profileId == null) { | |
| 4107 throw new core.ArgumentError("Parameter profileId is required."); | |
| 4108 } | |
| 4109 if (id == null) { | |
| 4110 throw new core.ArgumentError("Parameter id is required."); | |
| 4111 } | |
| 4112 _queryParams["id"] = [id]; | |
| 4113 | |
| 4114 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre
ativeGroups'; | |
| 4115 | |
| 4116 var _response = _requester.request(_url, | |
| 4117 "PATCH", | |
| 4118 body: _body, | |
| 4119 queryParams: _queryParams, | |
| 4120 uploadOptions: _uploadOptions, | |
| 4121 uploadMedia: _uploadMedia, | |
| 4122 downloadOptions: _downloadOptions); | |
| 4123 return _response.then((data) => new CreativeGroup.fromJson(data)); | |
| 4124 } | |
| 4125 | |
| 4126 /** | |
| 4127 * Updates an existing creative group. | |
| 4128 * | |
| 4129 * [request] - The metadata request object. | |
| 4130 * | |
| 4131 * Request parameters: | |
| 4132 * | |
| 4133 * [profileId] - User profile ID associated with this request. | |
| 4134 * | |
| 4135 * Completes with a [CreativeGroup]. | |
| 4136 * | |
| 4137 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 4138 * error. | |
| 4139 * | |
| 4140 * If the used [http.Client] completes with an error when making a REST call, | |
| 4141 * this method will complete with the same error. | |
| 4142 */ | |
| 4143 async.Future<CreativeGroup> update(CreativeGroup request, core.String profileI
d) { | |
| 4144 var _url = null; | |
| 4145 var _queryParams = new core.Map(); | |
| 4146 var _uploadMedia = null; | |
| 4147 var _uploadOptions = null; | |
| 4148 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 4149 var _body = null; | |
| 4150 | |
| 4151 if (request != null) { | |
| 4152 _body = convert.JSON.encode((request).toJson()); | |
| 4153 } | |
| 4154 if (profileId == null) { | |
| 4155 throw new core.ArgumentError("Parameter profileId is required."); | |
| 4156 } | |
| 4157 | |
| 4158 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre
ativeGroups'; | |
| 4159 | |
| 4160 var _response = _requester.request(_url, | |
| 4161 "PUT", | |
| 4162 body: _body, | |
| 4163 queryParams: _queryParams, | |
| 4164 uploadOptions: _uploadOptions, | |
| 4165 uploadMedia: _uploadMedia, | |
| 4166 downloadOptions: _downloadOptions); | |
| 4167 return _response.then((data) => new CreativeGroup.fromJson(data)); | |
| 4168 } | |
| 4169 | |
| 4170 } | |
| 4171 | |
| 4172 | |
| 4173 class CreativesResourceApi { | |
| 4174 final commons.ApiRequester _requester; | |
| 4175 | |
| 4176 CreativesResourceApi(commons.ApiRequester client) : | |
| 4177 _requester = client; | |
| 4178 | |
| 4179 /** | |
| 4180 * Gets one creative by ID. | |
| 4181 * | |
| 4182 * Request parameters: | |
| 4183 * | |
| 4184 * [profileId] - User profile ID associated with this request. | |
| 4185 * | |
| 4186 * [id] - Creative ID. | |
| 4187 * | |
| 4188 * Completes with a [Creative]. | |
| 4189 * | |
| 4190 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 4191 * error. | |
| 4192 * | |
| 4193 * If the used [http.Client] completes with an error when making a REST call, | |
| 4194 * this method will complete with the same error. | |
| 4195 */ | |
| 4196 async.Future<Creative> get(core.String profileId, core.String id) { | |
| 4197 var _url = null; | |
| 4198 var _queryParams = new core.Map(); | |
| 4199 var _uploadMedia = null; | |
| 4200 var _uploadOptions = null; | |
| 4201 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 4202 var _body = null; | |
| 4203 | |
| 4204 if (profileId == null) { | |
| 4205 throw new core.ArgumentError("Parameter profileId is required."); | |
| 4206 } | |
| 4207 if (id == null) { | |
| 4208 throw new core.ArgumentError("Parameter id is required."); | |
| 4209 } | |
| 4210 | |
| 4211 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre
atives/' + commons.Escaper.ecapeVariable('$id'); | |
| 4212 | |
| 4213 var _response = _requester.request(_url, | |
| 4214 "GET", | |
| 4215 body: _body, | |
| 4216 queryParams: _queryParams, | |
| 4217 uploadOptions: _uploadOptions, | |
| 4218 uploadMedia: _uploadMedia, | |
| 4219 downloadOptions: _downloadOptions); | |
| 4220 return _response.then((data) => new Creative.fromJson(data)); | |
| 4221 } | |
| 4222 | |
| 4223 /** | |
| 4224 * Inserts a new creative. | |
| 4225 * | |
| 4226 * [request] - The metadata request object. | |
| 4227 * | |
| 4228 * Request parameters: | |
| 4229 * | |
| 4230 * [profileId] - User profile ID associated with this request. | |
| 4231 * | |
| 4232 * Completes with a [Creative]. | |
| 4233 * | |
| 4234 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 4235 * error. | |
| 4236 * | |
| 4237 * If the used [http.Client] completes with an error when making a REST call, | |
| 4238 * this method will complete with the same error. | |
| 4239 */ | |
| 4240 async.Future<Creative> insert(Creative request, core.String profileId) { | |
| 4241 var _url = null; | |
| 4242 var _queryParams = new core.Map(); | |
| 4243 var _uploadMedia = null; | |
| 4244 var _uploadOptions = null; | |
| 4245 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 4246 var _body = null; | |
| 4247 | |
| 4248 if (request != null) { | |
| 4249 _body = convert.JSON.encode((request).toJson()); | |
| 4250 } | |
| 4251 if (profileId == null) { | |
| 4252 throw new core.ArgumentError("Parameter profileId is required."); | |
| 4253 } | |
| 4254 | |
| 4255 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre
atives'; | |
| 4256 | |
| 4257 var _response = _requester.request(_url, | |
| 4258 "POST", | |
| 4259 body: _body, | |
| 4260 queryParams: _queryParams, | |
| 4261 uploadOptions: _uploadOptions, | |
| 4262 uploadMedia: _uploadMedia, | |
| 4263 downloadOptions: _downloadOptions); | |
| 4264 return _response.then((data) => new Creative.fromJson(data)); | |
| 4265 } | |
| 4266 | |
| 4267 /** | |
| 4268 * Retrieves a list of creatives, possibly filtered. | |
| 4269 * | |
| 4270 * Request parameters: | |
| 4271 * | |
| 4272 * [profileId] - User profile ID associated with this request. | |
| 4273 * | |
| 4274 * [active] - Select only active creatives. Leave blank to select active and | |
| 4275 * inactive creatives. | |
| 4276 * | |
| 4277 * [advertiserId] - Select only creatives with this advertiser ID. | |
| 4278 * | |
| 4279 * [archived] - Select only archived creatives. Leave blank to select archived | |
| 4280 * and unarchived creatives. | |
| 4281 * | |
| 4282 * [campaignId] - Select only creatives with this campaign ID. | |
| 4283 * | |
| 4284 * [companionCreativeIds] - Select only in-stream video creatives with these | |
| 4285 * companion IDs. | |
| 4286 * | |
| 4287 * [creativeFieldIds] - Select only creatives with these creative field IDs. | |
| 4288 * | |
| 4289 * [ids] - Select only creatives with these IDs. | |
| 4290 * | |
| 4291 * [maxResults] - Maximum number of results to return. | |
| 4292 * | |
| 4293 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 4294 * | |
| 4295 * [renderingIds] - Select only creatives with these rendering IDs. | |
| 4296 * | |
| 4297 * [searchString] - Allows searching for objects by name or ID. Wildcards (*) | |
| 4298 * are allowed. For example, "creative*2015" will return objects with names | |
| 4299 * like "creative June 2015", "creative April 2015", or simply "creative | |
| 4300 * 2015". Most of the searches also add wildcards implicitly at the start and | |
| 4301 * the end of the search string. For example, a search string of "creative" | |
| 4302 * will match objects with name "my creative", "creative 2015", or simply | |
| 4303 * "creative". | |
| 4304 * | |
| 4305 * [sizeIds] - Select only creatives with these size IDs. | |
| 4306 * | |
| 4307 * [sortField] - Field by which to sort the list. | |
| 4308 * Possible string values are: | |
| 4309 * - "ID" | |
| 4310 * - "NAME" | |
| 4311 * | |
| 4312 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 4313 * Possible string values are: | |
| 4314 * - "ASCENDING" | |
| 4315 * - "DESCENDING" | |
| 4316 * | |
| 4317 * [studioCreativeId] - Select only creatives corresponding to this Studio | |
| 4318 * creative ID. | |
| 4319 * | |
| 4320 * [types] - Select only creatives with these creative types. | |
| 4321 * | |
| 4322 * Completes with a [CreativesListResponse]. | |
| 4323 * | |
| 4324 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 4325 * error. | |
| 4326 * | |
| 4327 * If the used [http.Client] completes with an error when making a REST call, | |
| 4328 * this method will complete with the same error. | |
| 4329 */ | |
| 4330 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}) { | |
| 4331 var _url = null; | |
| 4332 var _queryParams = new core.Map(); | |
| 4333 var _uploadMedia = null; | |
| 4334 var _uploadOptions = null; | |
| 4335 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 4336 var _body = null; | |
| 4337 | |
| 4338 if (profileId == null) { | |
| 4339 throw new core.ArgumentError("Parameter profileId is required."); | |
| 4340 } | |
| 4341 if (active != null) { | |
| 4342 _queryParams["active"] = ["${active}"]; | |
| 4343 } | |
| 4344 if (advertiserId != null) { | |
| 4345 _queryParams["advertiserId"] = [advertiserId]; | |
| 4346 } | |
| 4347 if (archived != null) { | |
| 4348 _queryParams["archived"] = ["${archived}"]; | |
| 4349 } | |
| 4350 if (campaignId != null) { | |
| 4351 _queryParams["campaignId"] = [campaignId]; | |
| 4352 } | |
| 4353 if (companionCreativeIds != null) { | |
| 4354 _queryParams["companionCreativeIds"] = companionCreativeIds; | |
| 4355 } | |
| 4356 if (creativeFieldIds != null) { | |
| 4357 _queryParams["creativeFieldIds"] = creativeFieldIds; | |
| 4358 } | |
| 4359 if (ids != null) { | |
| 4360 _queryParams["ids"] = ids; | |
| 4361 } | |
| 4362 if (maxResults != null) { | |
| 4363 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 4364 } | |
| 4365 if (pageToken != null) { | |
| 4366 _queryParams["pageToken"] = [pageToken]; | |
| 4367 } | |
| 4368 if (renderingIds != null) { | |
| 4369 _queryParams["renderingIds"] = renderingIds; | |
| 4370 } | |
| 4371 if (searchString != null) { | |
| 4372 _queryParams["searchString"] = [searchString]; | |
| 4373 } | |
| 4374 if (sizeIds != null) { | |
| 4375 _queryParams["sizeIds"] = sizeIds; | |
| 4376 } | |
| 4377 if (sortField != null) { | |
| 4378 _queryParams["sortField"] = [sortField]; | |
| 4379 } | |
| 4380 if (sortOrder != null) { | |
| 4381 _queryParams["sortOrder"] = [sortOrder]; | |
| 4382 } | |
| 4383 if (studioCreativeId != null) { | |
| 4384 _queryParams["studioCreativeId"] = [studioCreativeId]; | |
| 4385 } | |
| 4386 if (types != null) { | |
| 4387 _queryParams["types"] = types; | |
| 4388 } | |
| 4389 | |
| 4390 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre
atives'; | |
| 4391 | |
| 4392 var _response = _requester.request(_url, | |
| 4393 "GET", | |
| 4394 body: _body, | |
| 4395 queryParams: _queryParams, | |
| 4396 uploadOptions: _uploadOptions, | |
| 4397 uploadMedia: _uploadMedia, | |
| 4398 downloadOptions: _downloadOptions); | |
| 4399 return _response.then((data) => new CreativesListResponse.fromJson(data)); | |
| 4400 } | |
| 4401 | |
| 4402 /** | |
| 4403 * Updates an existing creative. This method supports patch semantics. | |
| 4404 * | |
| 4405 * [request] - The metadata request object. | |
| 4406 * | |
| 4407 * Request parameters: | |
| 4408 * | |
| 4409 * [profileId] - User profile ID associated with this request. | |
| 4410 * | |
| 4411 * [id] - Creative ID. | |
| 4412 * | |
| 4413 * Completes with a [Creative]. | |
| 4414 * | |
| 4415 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 4416 * error. | |
| 4417 * | |
| 4418 * If the used [http.Client] completes with an error when making a REST call, | |
| 4419 * this method will complete with the same error. | |
| 4420 */ | |
| 4421 async.Future<Creative> patch(Creative request, core.String profileId, core.Str
ing id) { | |
| 4422 var _url = null; | |
| 4423 var _queryParams = new core.Map(); | |
| 4424 var _uploadMedia = null; | |
| 4425 var _uploadOptions = null; | |
| 4426 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 4427 var _body = null; | |
| 4428 | |
| 4429 if (request != null) { | |
| 4430 _body = convert.JSON.encode((request).toJson()); | |
| 4431 } | |
| 4432 if (profileId == null) { | |
| 4433 throw new core.ArgumentError("Parameter profileId is required."); | |
| 4434 } | |
| 4435 if (id == null) { | |
| 4436 throw new core.ArgumentError("Parameter id is required."); | |
| 4437 } | |
| 4438 _queryParams["id"] = [id]; | |
| 4439 | |
| 4440 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre
atives'; | |
| 4441 | |
| 4442 var _response = _requester.request(_url, | |
| 4443 "PATCH", | |
| 4444 body: _body, | |
| 4445 queryParams: _queryParams, | |
| 4446 uploadOptions: _uploadOptions, | |
| 4447 uploadMedia: _uploadMedia, | |
| 4448 downloadOptions: _downloadOptions); | |
| 4449 return _response.then((data) => new Creative.fromJson(data)); | |
| 4450 } | |
| 4451 | |
| 4452 /** | |
| 4453 * Updates an existing creative. | |
| 4454 * | |
| 4455 * [request] - The metadata request object. | |
| 4456 * | |
| 4457 * Request parameters: | |
| 4458 * | |
| 4459 * [profileId] - User profile ID associated with this request. | |
| 4460 * | |
| 4461 * Completes with a [Creative]. | |
| 4462 * | |
| 4463 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 4464 * error. | |
| 4465 * | |
| 4466 * If the used [http.Client] completes with an error when making a REST call, | |
| 4467 * this method will complete with the same error. | |
| 4468 */ | |
| 4469 async.Future<Creative> update(Creative request, core.String profileId) { | |
| 4470 var _url = null; | |
| 4471 var _queryParams = new core.Map(); | |
| 4472 var _uploadMedia = null; | |
| 4473 var _uploadOptions = null; | |
| 4474 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 4475 var _body = null; | |
| 4476 | |
| 4477 if (request != null) { | |
| 4478 _body = convert.JSON.encode((request).toJson()); | |
| 4479 } | |
| 4480 if (profileId == null) { | |
| 4481 throw new core.ArgumentError("Parameter profileId is required."); | |
| 4482 } | |
| 4483 | |
| 4484 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre
atives'; | |
| 4485 | |
| 4486 var _response = _requester.request(_url, | |
| 4487 "PUT", | |
| 4488 body: _body, | |
| 4489 queryParams: _queryParams, | |
| 4490 uploadOptions: _uploadOptions, | |
| 4491 uploadMedia: _uploadMedia, | |
| 4492 downloadOptions: _downloadOptions); | |
| 4493 return _response.then((data) => new Creative.fromJson(data)); | |
| 4494 } | |
| 4495 | |
| 4496 } | |
| 4497 | |
| 4498 | |
| 4499 class DimensionValuesResourceApi { | |
| 4500 final commons.ApiRequester _requester; | |
| 4501 | |
| 4502 DimensionValuesResourceApi(commons.ApiRequester client) : | |
| 4503 _requester = client; | |
| 4504 | |
| 4505 /** | |
| 4506 * Retrieves list of report dimension values for a list of filters. | |
| 4507 * | |
| 4508 * [request] - The metadata request object. | |
| 4509 * | |
| 4510 * Request parameters: | |
| 4511 * | |
| 4512 * [profileId] - The DFA user profile ID. | |
| 4513 * | |
| 4514 * [maxResults] - Maximum number of results to return. | |
| 4515 * Value must be between "0" and "100". | |
| 4516 * | |
| 4517 * [pageToken] - The value of the nextToken from the previous result page. | |
| 4518 * | |
| 4519 * Completes with a [DimensionValueList]. | |
| 4520 * | |
| 4521 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 4522 * error. | |
| 4523 * | |
| 4524 * If the used [http.Client] completes with an error when making a REST call, | |
| 4525 * this method will complete with the same error. | |
| 4526 */ | |
| 4527 async.Future<DimensionValueList> query(DimensionValueRequest request, core.Str
ing profileId, {core.int maxResults, core.String pageToken}) { | |
| 4528 var _url = null; | |
| 4529 var _queryParams = new core.Map(); | |
| 4530 var _uploadMedia = null; | |
| 4531 var _uploadOptions = null; | |
| 4532 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 4533 var _body = null; | |
| 4534 | |
| 4535 if (request != null) { | |
| 4536 _body = convert.JSON.encode((request).toJson()); | |
| 4537 } | |
| 4538 if (profileId == null) { | |
| 4539 throw new core.ArgumentError("Parameter profileId is required."); | |
| 4540 } | |
| 4541 if (maxResults != null) { | |
| 4542 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 4543 } | |
| 4544 if (pageToken != null) { | |
| 4545 _queryParams["pageToken"] = [pageToken]; | |
| 4546 } | |
| 4547 | |
| 4548 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/dim
ensionvalues/query'; | |
| 4549 | |
| 4550 var _response = _requester.request(_url, | |
| 4551 "POST", | |
| 4552 body: _body, | |
| 4553 queryParams: _queryParams, | |
| 4554 uploadOptions: _uploadOptions, | |
| 4555 uploadMedia: _uploadMedia, | |
| 4556 downloadOptions: _downloadOptions); | |
| 4557 return _response.then((data) => new DimensionValueList.fromJson(data)); | |
| 4558 } | |
| 4559 | |
| 4560 } | |
| 4561 | |
| 4562 | |
| 4563 class DirectorySiteContactsResourceApi { | |
| 4564 final commons.ApiRequester _requester; | |
| 4565 | |
| 4566 DirectorySiteContactsResourceApi(commons.ApiRequester client) : | |
| 4567 _requester = client; | |
| 4568 | |
| 4569 /** | |
| 4570 * Gets one directory site contact by ID. | |
| 4571 * | |
| 4572 * Request parameters: | |
| 4573 * | |
| 4574 * [profileId] - User profile ID associated with this request. | |
| 4575 * | |
| 4576 * [id] - Directory site contact ID. | |
| 4577 * | |
| 4578 * Completes with a [DirectorySiteContact]. | |
| 4579 * | |
| 4580 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 4581 * error. | |
| 4582 * | |
| 4583 * If the used [http.Client] completes with an error when making a REST call, | |
| 4584 * this method will complete with the same error. | |
| 4585 */ | |
| 4586 async.Future<DirectorySiteContact> get(core.String profileId, core.String id)
{ | |
| 4587 var _url = null; | |
| 4588 var _queryParams = new core.Map(); | |
| 4589 var _uploadMedia = null; | |
| 4590 var _uploadOptions = null; | |
| 4591 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 4592 var _body = null; | |
| 4593 | |
| 4594 if (profileId == null) { | |
| 4595 throw new core.ArgumentError("Parameter profileId is required."); | |
| 4596 } | |
| 4597 if (id == null) { | |
| 4598 throw new core.ArgumentError("Parameter id is required."); | |
| 4599 } | |
| 4600 | |
| 4601 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/dir
ectorySiteContacts/' + commons.Escaper.ecapeVariable('$id'); | |
| 4602 | |
| 4603 var _response = _requester.request(_url, | |
| 4604 "GET", | |
| 4605 body: _body, | |
| 4606 queryParams: _queryParams, | |
| 4607 uploadOptions: _uploadOptions, | |
| 4608 uploadMedia: _uploadMedia, | |
| 4609 downloadOptions: _downloadOptions); | |
| 4610 return _response.then((data) => new DirectorySiteContact.fromJson(data)); | |
| 4611 } | |
| 4612 | |
| 4613 /** | |
| 4614 * Retrieves a list of directory site contacts, possibly filtered. | |
| 4615 * | |
| 4616 * Request parameters: | |
| 4617 * | |
| 4618 * [profileId] - User profile ID associated with this request. | |
| 4619 * | |
| 4620 * [directorySiteIds] - Select only directory site contacts with these | |
| 4621 * directory site IDs. This is a required field. | |
| 4622 * | |
| 4623 * [ids] - Select only directory site contacts with these IDs. | |
| 4624 * | |
| 4625 * [maxResults] - Maximum number of results to return. | |
| 4626 * | |
| 4627 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 4628 * | |
| 4629 * [searchString] - Allows searching for objects by name, ID or email. | |
| 4630 * Wildcards (*) are allowed. For example, "directory site contact*2015" will | |
| 4631 * return objects with names like "directory site contact June 2015", | |
| 4632 * "directory site contact April 2015", or simply "directory site contact | |
| 4633 * 2015". Most of the searches also add wildcards implicitly at the start and | |
| 4634 * the end of the search string. For example, a search string of "directory | |
| 4635 * site contact" will match objects with name "my directory site contact", | |
| 4636 * "directory site contact 2015", or simply "directory site contact". | |
| 4637 * | |
| 4638 * [sortField] - Field by which to sort the list. | |
| 4639 * Possible string values are: | |
| 4640 * - "ID" | |
| 4641 * - "NAME" | |
| 4642 * | |
| 4643 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 4644 * Possible string values are: | |
| 4645 * - "ASCENDING" | |
| 4646 * - "DESCENDING" | |
| 4647 * | |
| 4648 * Completes with a [DirectorySiteContactsListResponse]. | |
| 4649 * | |
| 4650 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 4651 * error. | |
| 4652 * | |
| 4653 * If the used [http.Client] completes with an error when making a REST call, | |
| 4654 * this method will complete with the same error. | |
| 4655 */ | |
| 4656 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}) { | |
| 4657 var _url = null; | |
| 4658 var _queryParams = new core.Map(); | |
| 4659 var _uploadMedia = null; | |
| 4660 var _uploadOptions = null; | |
| 4661 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 4662 var _body = null; | |
| 4663 | |
| 4664 if (profileId == null) { | |
| 4665 throw new core.ArgumentError("Parameter profileId is required."); | |
| 4666 } | |
| 4667 if (directorySiteIds != null) { | |
| 4668 _queryParams["directorySiteIds"] = directorySiteIds; | |
| 4669 } | |
| 4670 if (ids != null) { | |
| 4671 _queryParams["ids"] = ids; | |
| 4672 } | |
| 4673 if (maxResults != null) { | |
| 4674 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 4675 } | |
| 4676 if (pageToken != null) { | |
| 4677 _queryParams["pageToken"] = [pageToken]; | |
| 4678 } | |
| 4679 if (searchString != null) { | |
| 4680 _queryParams["searchString"] = [searchString]; | |
| 4681 } | |
| 4682 if (sortField != null) { | |
| 4683 _queryParams["sortField"] = [sortField]; | |
| 4684 } | |
| 4685 if (sortOrder != null) { | |
| 4686 _queryParams["sortOrder"] = [sortOrder]; | |
| 4687 } | |
| 4688 | |
| 4689 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/dir
ectorySiteContacts'; | |
| 4690 | |
| 4691 var _response = _requester.request(_url, | |
| 4692 "GET", | |
| 4693 body: _body, | |
| 4694 queryParams: _queryParams, | |
| 4695 uploadOptions: _uploadOptions, | |
| 4696 uploadMedia: _uploadMedia, | |
| 4697 downloadOptions: _downloadOptions); | |
| 4698 return _response.then((data) => new DirectorySiteContactsListResponse.fromJs
on(data)); | |
| 4699 } | |
| 4700 | |
| 4701 } | |
| 4702 | |
| 4703 | |
| 4704 class DirectorySitesResourceApi { | |
| 4705 final commons.ApiRequester _requester; | |
| 4706 | |
| 4707 DirectorySitesResourceApi(commons.ApiRequester client) : | |
| 4708 _requester = client; | |
| 4709 | |
| 4710 /** | |
| 4711 * Gets one directory site by ID. | |
| 4712 * | |
| 4713 * Request parameters: | |
| 4714 * | |
| 4715 * [profileId] - User profile ID associated with this request. | |
| 4716 * | |
| 4717 * [id] - Directory site ID. | |
| 4718 * | |
| 4719 * Completes with a [DirectorySite]. | |
| 4720 * | |
| 4721 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 4722 * error. | |
| 4723 * | |
| 4724 * If the used [http.Client] completes with an error when making a REST call, | |
| 4725 * this method will complete with the same error. | |
| 4726 */ | |
| 4727 async.Future<DirectorySite> get(core.String profileId, core.String id) { | |
| 4728 var _url = null; | |
| 4729 var _queryParams = new core.Map(); | |
| 4730 var _uploadMedia = null; | |
| 4731 var _uploadOptions = null; | |
| 4732 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 4733 var _body = null; | |
| 4734 | |
| 4735 if (profileId == null) { | |
| 4736 throw new core.ArgumentError("Parameter profileId is required."); | |
| 4737 } | |
| 4738 if (id == null) { | |
| 4739 throw new core.ArgumentError("Parameter id is required."); | |
| 4740 } | |
| 4741 | |
| 4742 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/dir
ectorySites/' + commons.Escaper.ecapeVariable('$id'); | |
| 4743 | |
| 4744 var _response = _requester.request(_url, | |
| 4745 "GET", | |
| 4746 body: _body, | |
| 4747 queryParams: _queryParams, | |
| 4748 uploadOptions: _uploadOptions, | |
| 4749 uploadMedia: _uploadMedia, | |
| 4750 downloadOptions: _downloadOptions); | |
| 4751 return _response.then((data) => new DirectorySite.fromJson(data)); | |
| 4752 } | |
| 4753 | |
| 4754 /** | |
| 4755 * Inserts a new directory site. | |
| 4756 * | |
| 4757 * [request] - The metadata request object. | |
| 4758 * | |
| 4759 * Request parameters: | |
| 4760 * | |
| 4761 * [profileId] - User profile ID associated with this request. | |
| 4762 * | |
| 4763 * Completes with a [DirectorySite]. | |
| 4764 * | |
| 4765 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 4766 * error. | |
| 4767 * | |
| 4768 * If the used [http.Client] completes with an error when making a REST call, | |
| 4769 * this method will complete with the same error. | |
| 4770 */ | |
| 4771 async.Future<DirectorySite> insert(DirectorySite request, core.String profileI
d) { | |
| 4772 var _url = null; | |
| 4773 var _queryParams = new core.Map(); | |
| 4774 var _uploadMedia = null; | |
| 4775 var _uploadOptions = null; | |
| 4776 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 4777 var _body = null; | |
| 4778 | |
| 4779 if (request != null) { | |
| 4780 _body = convert.JSON.encode((request).toJson()); | |
| 4781 } | |
| 4782 if (profileId == null) { | |
| 4783 throw new core.ArgumentError("Parameter profileId is required."); | |
| 4784 } | |
| 4785 | |
| 4786 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/dir
ectorySites'; | |
| 4787 | |
| 4788 var _response = _requester.request(_url, | |
| 4789 "POST", | |
| 4790 body: _body, | |
| 4791 queryParams: _queryParams, | |
| 4792 uploadOptions: _uploadOptions, | |
| 4793 uploadMedia: _uploadMedia, | |
| 4794 downloadOptions: _downloadOptions); | |
| 4795 return _response.then((data) => new DirectorySite.fromJson(data)); | |
| 4796 } | |
| 4797 | |
| 4798 /** | |
| 4799 * Retrieves a list of directory sites, possibly filtered. | |
| 4800 * | |
| 4801 * Request parameters: | |
| 4802 * | |
| 4803 * [profileId] - User profile ID associated with this request. | |
| 4804 * | |
| 4805 * [acceptsInStreamVideoPlacements] - This search filter is no longer | |
| 4806 * supported and will have no effect on the results returned. | |
| 4807 * | |
| 4808 * [acceptsInterstitialPlacements] - This search filter is no longer supported | |
| 4809 * and will have no effect on the results returned. | |
| 4810 * | |
| 4811 * [acceptsPublisherPaidPlacements] - Select only directory sites that accept | |
| 4812 * publisher paid placements. This field can be left blank. | |
| 4813 * | |
| 4814 * [active] - Select only active directory sites. Leave blank to retrieve both | |
| 4815 * active and inactive directory sites. | |
| 4816 * | |
| 4817 * [countryId] - Select only directory sites with this country ID. | |
| 4818 * | |
| 4819 * [dfpNetworkCode] - Select only directory sites with this DFP network code. | |
| 4820 * | |
| 4821 * [ids] - Select only directory sites with these IDs. | |
| 4822 * | |
| 4823 * [maxResults] - Maximum number of results to return. | |
| 4824 * | |
| 4825 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 4826 * | |
| 4827 * [parentId] - Select only directory sites with this parent ID. | |
| 4828 * | |
| 4829 * [searchString] - Allows searching for objects by name, ID or URL. Wildcards | |
| 4830 * (*) are allowed. For example, "directory site*2015" will return objects | |
| 4831 * with names like "directory site June 2015", "directory site April 2015", or | |
| 4832 * simply "directory site 2015". Most of the searches also add wildcards | |
| 4833 * implicitly at the start and the end of the search string. For example, a | |
| 4834 * search string of "directory site" will match objects with name "my | |
| 4835 * directory site", "directory site 2015" or simply, "directory site". | |
| 4836 * | |
| 4837 * [sortField] - Field by which to sort the list. | |
| 4838 * Possible string values are: | |
| 4839 * - "ID" | |
| 4840 * - "NAME" | |
| 4841 * | |
| 4842 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 4843 * Possible string values are: | |
| 4844 * - "ASCENDING" | |
| 4845 * - "DESCENDING" | |
| 4846 * | |
| 4847 * Completes with a [DirectorySitesListResponse]. | |
| 4848 * | |
| 4849 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 4850 * error. | |
| 4851 * | |
| 4852 * If the used [http.Client] completes with an error when making a REST call, | |
| 4853 * this method will complete with the same error. | |
| 4854 */ | |
| 4855 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}) { | |
| 4856 var _url = null; | |
| 4857 var _queryParams = new core.Map(); | |
| 4858 var _uploadMedia = null; | |
| 4859 var _uploadOptions = null; | |
| 4860 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 4861 var _body = null; | |
| 4862 | |
| 4863 if (profileId == null) { | |
| 4864 throw new core.ArgumentError("Parameter profileId is required."); | |
| 4865 } | |
| 4866 if (acceptsInStreamVideoPlacements != null) { | |
| 4867 _queryParams["acceptsInStreamVideoPlacements"] = ["${acceptsInStreamVideoP
lacements}"]; | |
| 4868 } | |
| 4869 if (acceptsInterstitialPlacements != null) { | |
| 4870 _queryParams["acceptsInterstitialPlacements"] = ["${acceptsInterstitialPla
cements}"]; | |
| 4871 } | |
| 4872 if (acceptsPublisherPaidPlacements != null) { | |
| 4873 _queryParams["acceptsPublisherPaidPlacements"] = ["${acceptsPublisherPaidP
lacements}"]; | |
| 4874 } | |
| 4875 if (active != null) { | |
| 4876 _queryParams["active"] = ["${active}"]; | |
| 4877 } | |
| 4878 if (countryId != null) { | |
| 4879 _queryParams["countryId"] = [countryId]; | |
| 4880 } | |
| 4881 if (dfpNetworkCode != null) { | |
| 4882 _queryParams["dfp_network_code"] = [dfpNetworkCode]; | |
| 4883 } | |
| 4884 if (ids != null) { | |
| 4885 _queryParams["ids"] = ids; | |
| 4886 } | |
| 4887 if (maxResults != null) { | |
| 4888 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 4889 } | |
| 4890 if (pageToken != null) { | |
| 4891 _queryParams["pageToken"] = [pageToken]; | |
| 4892 } | |
| 4893 if (parentId != null) { | |
| 4894 _queryParams["parentId"] = [parentId]; | |
| 4895 } | |
| 4896 if (searchString != null) { | |
| 4897 _queryParams["searchString"] = [searchString]; | |
| 4898 } | |
| 4899 if (sortField != null) { | |
| 4900 _queryParams["sortField"] = [sortField]; | |
| 4901 } | |
| 4902 if (sortOrder != null) { | |
| 4903 _queryParams["sortOrder"] = [sortOrder]; | |
| 4904 } | |
| 4905 | |
| 4906 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/dir
ectorySites'; | |
| 4907 | |
| 4908 var _response = _requester.request(_url, | |
| 4909 "GET", | |
| 4910 body: _body, | |
| 4911 queryParams: _queryParams, | |
| 4912 uploadOptions: _uploadOptions, | |
| 4913 uploadMedia: _uploadMedia, | |
| 4914 downloadOptions: _downloadOptions); | |
| 4915 return _response.then((data) => new DirectorySitesListResponse.fromJson(data
)); | |
| 4916 } | |
| 4917 | |
| 4918 } | |
| 4919 | |
| 4920 | |
| 4921 class EventTagsResourceApi { | |
| 4922 final commons.ApiRequester _requester; | |
| 4923 | |
| 4924 EventTagsResourceApi(commons.ApiRequester client) : | |
| 4925 _requester = client; | |
| 4926 | |
| 4927 /** | |
| 4928 * Deletes an existing event tag. | |
| 4929 * | |
| 4930 * Request parameters: | |
| 4931 * | |
| 4932 * [profileId] - User profile ID associated with this request. | |
| 4933 * | |
| 4934 * [id] - Event tag ID. | |
| 4935 * | |
| 4936 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 4937 * error. | |
| 4938 * | |
| 4939 * If the used [http.Client] completes with an error when making a REST call, | |
| 4940 * this method will complete with the same error. | |
| 4941 */ | |
| 4942 async.Future delete(core.String profileId, core.String id) { | |
| 4943 var _url = null; | |
| 4944 var _queryParams = new core.Map(); | |
| 4945 var _uploadMedia = null; | |
| 4946 var _uploadOptions = null; | |
| 4947 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 4948 var _body = null; | |
| 4949 | |
| 4950 if (profileId == null) { | |
| 4951 throw new core.ArgumentError("Parameter profileId is required."); | |
| 4952 } | |
| 4953 if (id == null) { | |
| 4954 throw new core.ArgumentError("Parameter id is required."); | |
| 4955 } | |
| 4956 | |
| 4957 _downloadOptions = null; | |
| 4958 | |
| 4959 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/eve
ntTags/' + commons.Escaper.ecapeVariable('$id'); | |
| 4960 | |
| 4961 var _response = _requester.request(_url, | |
| 4962 "DELETE", | |
| 4963 body: _body, | |
| 4964 queryParams: _queryParams, | |
| 4965 uploadOptions: _uploadOptions, | |
| 4966 uploadMedia: _uploadMedia, | |
| 4967 downloadOptions: _downloadOptions); | |
| 4968 return _response.then((data) => null); | |
| 4969 } | |
| 4970 | |
| 4971 /** | |
| 4972 * Gets one event tag by ID. | |
| 4973 * | |
| 4974 * Request parameters: | |
| 4975 * | |
| 4976 * [profileId] - User profile ID associated with this request. | |
| 4977 * | |
| 4978 * [id] - Event tag ID. | |
| 4979 * | |
| 4980 * Completes with a [EventTag]. | |
| 4981 * | |
| 4982 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 4983 * error. | |
| 4984 * | |
| 4985 * If the used [http.Client] completes with an error when making a REST call, | |
| 4986 * this method will complete with the same error. | |
| 4987 */ | |
| 4988 async.Future<EventTag> get(core.String profileId, core.String id) { | |
| 4989 var _url = null; | |
| 4990 var _queryParams = new core.Map(); | |
| 4991 var _uploadMedia = null; | |
| 4992 var _uploadOptions = null; | |
| 4993 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 4994 var _body = null; | |
| 4995 | |
| 4996 if (profileId == null) { | |
| 4997 throw new core.ArgumentError("Parameter profileId is required."); | |
| 4998 } | |
| 4999 if (id == null) { | |
| 5000 throw new core.ArgumentError("Parameter id is required."); | |
| 5001 } | |
| 5002 | |
| 5003 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/eve
ntTags/' + commons.Escaper.ecapeVariable('$id'); | |
| 5004 | |
| 5005 var _response = _requester.request(_url, | |
| 5006 "GET", | |
| 5007 body: _body, | |
| 5008 queryParams: _queryParams, | |
| 5009 uploadOptions: _uploadOptions, | |
| 5010 uploadMedia: _uploadMedia, | |
| 5011 downloadOptions: _downloadOptions); | |
| 5012 return _response.then((data) => new EventTag.fromJson(data)); | |
| 5013 } | |
| 5014 | |
| 5015 /** | |
| 5016 * Inserts a new event tag. | |
| 5017 * | |
| 5018 * [request] - The metadata request object. | |
| 5019 * | |
| 5020 * Request parameters: | |
| 5021 * | |
| 5022 * [profileId] - User profile ID associated with this request. | |
| 5023 * | |
| 5024 * Completes with a [EventTag]. | |
| 5025 * | |
| 5026 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 5027 * error. | |
| 5028 * | |
| 5029 * If the used [http.Client] completes with an error when making a REST call, | |
| 5030 * this method will complete with the same error. | |
| 5031 */ | |
| 5032 async.Future<EventTag> insert(EventTag request, core.String profileId) { | |
| 5033 var _url = null; | |
| 5034 var _queryParams = new core.Map(); | |
| 5035 var _uploadMedia = null; | |
| 5036 var _uploadOptions = null; | |
| 5037 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 5038 var _body = null; | |
| 5039 | |
| 5040 if (request != null) { | |
| 5041 _body = convert.JSON.encode((request).toJson()); | |
| 5042 } | |
| 5043 if (profileId == null) { | |
| 5044 throw new core.ArgumentError("Parameter profileId is required."); | |
| 5045 } | |
| 5046 | |
| 5047 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/eve
ntTags'; | |
| 5048 | |
| 5049 var _response = _requester.request(_url, | |
| 5050 "POST", | |
| 5051 body: _body, | |
| 5052 queryParams: _queryParams, | |
| 5053 uploadOptions: _uploadOptions, | |
| 5054 uploadMedia: _uploadMedia, | |
| 5055 downloadOptions: _downloadOptions); | |
| 5056 return _response.then((data) => new EventTag.fromJson(data)); | |
| 5057 } | |
| 5058 | |
| 5059 /** | |
| 5060 * Retrieves a list of event tags, possibly filtered. | |
| 5061 * | |
| 5062 * Request parameters: | |
| 5063 * | |
| 5064 * [profileId] - User profile ID associated with this request. | |
| 5065 * | |
| 5066 * [adId] - Select only event tags that belong to this ad. | |
| 5067 * | |
| 5068 * [advertiserId] - Select only event tags that belong to this advertiser. | |
| 5069 * | |
| 5070 * [campaignId] - Select only event tags that belong to this campaign. | |
| 5071 * | |
| 5072 * [definitionsOnly] - Examine only the specified campaign or advertiser's | |
| 5073 * event tags for matching selector criteria. When set to false, the parent | |
| 5074 * advertiser and parent campaign of the specified ad or campaign is examined | |
| 5075 * as well. In addition, when set to false, the status field is examined as | |
| 5076 * well, along with the enabledByDefault field. This parameter can not be set | |
| 5077 * to true when adId is specified as ads do not define their own even tags. | |
| 5078 * | |
| 5079 * [enabled] - Select only enabled event tags. What is considered enabled or | |
| 5080 * disabled depends on the definitionsOnly parameter. When definitionsOnly is | |
| 5081 * set to true, only the specified advertiser or campaign's event tags' | |
| 5082 * enabledByDefault field is examined. When definitionsOnly is set to false, | |
| 5083 * the specified ad or specified campaign's parent advertiser's or parent | |
| 5084 * campaign's event tags' enabledByDefault and status fields are examined as | |
| 5085 * well. | |
| 5086 * | |
| 5087 * [eventTagTypes] - Select only event tags with the specified event tag | |
| 5088 * types. Event tag types can be used to specify whether to use a third-party | |
| 5089 * pixel, a third-party JavaScript URL, or a third-party click-through URL for | |
| 5090 * either impression or click tracking. | |
| 5091 * | |
| 5092 * [ids] - Select only event tags with these IDs. | |
| 5093 * | |
| 5094 * [searchString] - Allows searching for objects by name or ID. Wildcards (*) | |
| 5095 * are allowed. For example, "eventtag*2015" will return objects with names | |
| 5096 * like "eventtag June 2015", "eventtag April 2015", or simply "eventtag | |
| 5097 * 2015". Most of the searches also add wildcards implicitly at the start and | |
| 5098 * the end of the search string. For example, a search string of "eventtag" | |
| 5099 * will match objects with name "my eventtag", "eventtag 2015", or simply | |
| 5100 * "eventtag". | |
| 5101 * | |
| 5102 * [sortField] - Field by which to sort the list. | |
| 5103 * Possible string values are: | |
| 5104 * - "ID" | |
| 5105 * - "NAME" | |
| 5106 * | |
| 5107 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 5108 * Possible string values are: | |
| 5109 * - "ASCENDING" | |
| 5110 * - "DESCENDING" | |
| 5111 * | |
| 5112 * Completes with a [EventTagsListResponse]. | |
| 5113 * | |
| 5114 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 5115 * error. | |
| 5116 * | |
| 5117 * If the used [http.Client] completes with an error when making a REST call, | |
| 5118 * this method will complete with the same error. | |
| 5119 */ | |
| 5120 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})
{ | |
| 5121 var _url = null; | |
| 5122 var _queryParams = new core.Map(); | |
| 5123 var _uploadMedia = null; | |
| 5124 var _uploadOptions = null; | |
| 5125 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 5126 var _body = null; | |
| 5127 | |
| 5128 if (profileId == null) { | |
| 5129 throw new core.ArgumentError("Parameter profileId is required."); | |
| 5130 } | |
| 5131 if (adId != null) { | |
| 5132 _queryParams["adId"] = [adId]; | |
| 5133 } | |
| 5134 if (advertiserId != null) { | |
| 5135 _queryParams["advertiserId"] = [advertiserId]; | |
| 5136 } | |
| 5137 if (campaignId != null) { | |
| 5138 _queryParams["campaignId"] = [campaignId]; | |
| 5139 } | |
| 5140 if (definitionsOnly != null) { | |
| 5141 _queryParams["definitionsOnly"] = ["${definitionsOnly}"]; | |
| 5142 } | |
| 5143 if (enabled != null) { | |
| 5144 _queryParams["enabled"] = ["${enabled}"]; | |
| 5145 } | |
| 5146 if (eventTagTypes != null) { | |
| 5147 _queryParams["eventTagTypes"] = eventTagTypes; | |
| 5148 } | |
| 5149 if (ids != null) { | |
| 5150 _queryParams["ids"] = ids; | |
| 5151 } | |
| 5152 if (searchString != null) { | |
| 5153 _queryParams["searchString"] = [searchString]; | |
| 5154 } | |
| 5155 if (sortField != null) { | |
| 5156 _queryParams["sortField"] = [sortField]; | |
| 5157 } | |
| 5158 if (sortOrder != null) { | |
| 5159 _queryParams["sortOrder"] = [sortOrder]; | |
| 5160 } | |
| 5161 | |
| 5162 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/eve
ntTags'; | |
| 5163 | |
| 5164 var _response = _requester.request(_url, | |
| 5165 "GET", | |
| 5166 body: _body, | |
| 5167 queryParams: _queryParams, | |
| 5168 uploadOptions: _uploadOptions, | |
| 5169 uploadMedia: _uploadMedia, | |
| 5170 downloadOptions: _downloadOptions); | |
| 5171 return _response.then((data) => new EventTagsListResponse.fromJson(data)); | |
| 5172 } | |
| 5173 | |
| 5174 /** | |
| 5175 * Updates an existing event tag. This method supports patch semantics. | |
| 5176 * | |
| 5177 * [request] - The metadata request object. | |
| 5178 * | |
| 5179 * Request parameters: | |
| 5180 * | |
| 5181 * [profileId] - User profile ID associated with this request. | |
| 5182 * | |
| 5183 * [id] - Event tag ID. | |
| 5184 * | |
| 5185 * Completes with a [EventTag]. | |
| 5186 * | |
| 5187 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 5188 * error. | |
| 5189 * | |
| 5190 * If the used [http.Client] completes with an error when making a REST call, | |
| 5191 * this method will complete with the same error. | |
| 5192 */ | |
| 5193 async.Future<EventTag> patch(EventTag request, core.String profileId, core.Str
ing id) { | |
| 5194 var _url = null; | |
| 5195 var _queryParams = new core.Map(); | |
| 5196 var _uploadMedia = null; | |
| 5197 var _uploadOptions = null; | |
| 5198 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 5199 var _body = null; | |
| 5200 | |
| 5201 if (request != null) { | |
| 5202 _body = convert.JSON.encode((request).toJson()); | |
| 5203 } | |
| 5204 if (profileId == null) { | |
| 5205 throw new core.ArgumentError("Parameter profileId is required."); | |
| 5206 } | |
| 5207 if (id == null) { | |
| 5208 throw new core.ArgumentError("Parameter id is required."); | |
| 5209 } | |
| 5210 _queryParams["id"] = [id]; | |
| 5211 | |
| 5212 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/eve
ntTags'; | |
| 5213 | |
| 5214 var _response = _requester.request(_url, | |
| 5215 "PATCH", | |
| 5216 body: _body, | |
| 5217 queryParams: _queryParams, | |
| 5218 uploadOptions: _uploadOptions, | |
| 5219 uploadMedia: _uploadMedia, | |
| 5220 downloadOptions: _downloadOptions); | |
| 5221 return _response.then((data) => new EventTag.fromJson(data)); | |
| 5222 } | |
| 5223 | |
| 5224 /** | |
| 5225 * Updates an existing event tag. | |
| 5226 * | |
| 5227 * [request] - The metadata request object. | |
| 5228 * | |
| 5229 * Request parameters: | |
| 5230 * | |
| 5231 * [profileId] - User profile ID associated with this request. | |
| 5232 * | |
| 5233 * Completes with a [EventTag]. | |
| 5234 * | |
| 5235 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 5236 * error. | |
| 5237 * | |
| 5238 * If the used [http.Client] completes with an error when making a REST call, | |
| 5239 * this method will complete with the same error. | |
| 5240 */ | |
| 5241 async.Future<EventTag> update(EventTag request, core.String profileId) { | |
| 5242 var _url = null; | |
| 5243 var _queryParams = new core.Map(); | |
| 5244 var _uploadMedia = null; | |
| 5245 var _uploadOptions = null; | |
| 5246 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 5247 var _body = null; | |
| 5248 | |
| 5249 if (request != null) { | |
| 5250 _body = convert.JSON.encode((request).toJson()); | |
| 5251 } | |
| 5252 if (profileId == null) { | |
| 5253 throw new core.ArgumentError("Parameter profileId is required."); | |
| 5254 } | |
| 5255 | |
| 5256 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/eve
ntTags'; | |
| 5257 | |
| 5258 var _response = _requester.request(_url, | |
| 5259 "PUT", | |
| 5260 body: _body, | |
| 5261 queryParams: _queryParams, | |
| 5262 uploadOptions: _uploadOptions, | |
| 5263 uploadMedia: _uploadMedia, | |
| 5264 downloadOptions: _downloadOptions); | |
| 5265 return _response.then((data) => new EventTag.fromJson(data)); | |
| 5266 } | |
| 5267 | |
| 5268 } | |
| 5269 | |
| 5270 | |
| 5271 class FilesResourceApi { | |
| 5272 final commons.ApiRequester _requester; | |
| 5273 | |
| 5274 FilesResourceApi(commons.ApiRequester client) : | |
| 5275 _requester = client; | |
| 5276 | |
| 5277 /** | |
| 5278 * Retrieves a report file by its report ID and file ID. | |
| 5279 * | |
| 5280 * Request parameters: | |
| 5281 * | |
| 5282 * [reportId] - The ID of the report. | |
| 5283 * | |
| 5284 * [fileId] - The ID of the report file. | |
| 5285 * | |
| 5286 * [downloadOptions] - Options for downloading. A download can be either a | |
| 5287 * Metadata (default) or Media download. Partial Media downloads are possible | |
| 5288 * as well. | |
| 5289 * | |
| 5290 * Completes with a | |
| 5291 * | |
| 5292 * - [File] for Metadata downloads (see [downloadOptions]). | |
| 5293 * | |
| 5294 * - [commons.Media] for Media downloads (see [downloadOptions]). | |
| 5295 * | |
| 5296 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 5297 * error. | |
| 5298 * | |
| 5299 * If the used [http.Client] completes with an error when making a REST call, | |
| 5300 * this method will complete with the same error. | |
| 5301 */ | |
| 5302 async.Future get(core.String reportId, core.String fileId, {commons.DownloadOp
tions downloadOptions: commons.DownloadOptions.Metadata}) { | |
| 5303 var _url = null; | |
| 5304 var _queryParams = new core.Map(); | |
| 5305 var _uploadMedia = null; | |
| 5306 var _uploadOptions = null; | |
| 5307 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 5308 var _body = null; | |
| 5309 | |
| 5310 if (reportId == null) { | |
| 5311 throw new core.ArgumentError("Parameter reportId is required."); | |
| 5312 } | |
| 5313 if (fileId == null) { | |
| 5314 throw new core.ArgumentError("Parameter fileId is required."); | |
| 5315 } | |
| 5316 | |
| 5317 _downloadOptions = downloadOptions; | |
| 5318 | |
| 5319 _url = 'reports/' + commons.Escaper.ecapeVariable('$reportId') + '/files/' +
commons.Escaper.ecapeVariable('$fileId'); | |
| 5320 | |
| 5321 var _response = _requester.request(_url, | |
| 5322 "GET", | |
| 5323 body: _body, | |
| 5324 queryParams: _queryParams, | |
| 5325 uploadOptions: _uploadOptions, | |
| 5326 uploadMedia: _uploadMedia, | |
| 5327 downloadOptions: _downloadOptions); | |
| 5328 if (_downloadOptions == null || | |
| 5329 _downloadOptions == commons.DownloadOptions.Metadata) { | |
| 5330 return _response.then((data) => new File.fromJson(data)); | |
| 5331 } else { | |
| 5332 return _response; | |
| 5333 } | |
| 5334 } | |
| 5335 | |
| 5336 /** | |
| 5337 * Lists files for a user profile. | |
| 5338 * | |
| 5339 * Request parameters: | |
| 5340 * | |
| 5341 * [profileId] - The DFA profile ID. | |
| 5342 * | |
| 5343 * [maxResults] - Maximum number of results to return. | |
| 5344 * Value must be between "0" and "10". | |
| 5345 * | |
| 5346 * [pageToken] - The value of the nextToken from the previous result page. | |
| 5347 * | |
| 5348 * [scope] - The scope that defines which results are returned, default is | |
| 5349 * 'MINE'. | |
| 5350 * Possible string values are: | |
| 5351 * - "ALL" : All files in account. | |
| 5352 * - "MINE" : My files. | |
| 5353 * - "SHARED_WITH_ME" : Files shared with me. | |
| 5354 * | |
| 5355 * [sortField] - The field by which to sort the list. | |
| 5356 * Possible string values are: | |
| 5357 * - "ID" : Sort by file ID. | |
| 5358 * - "LAST_MODIFIED_TIME" : Sort by 'lastmodifiedAt' field. | |
| 5359 * | |
| 5360 * [sortOrder] - Order of sorted results, default is 'DESCENDING'. | |
| 5361 * Possible string values are: | |
| 5362 * - "ASCENDING" : Ascending order. | |
| 5363 * - "DESCENDING" : Descending order. | |
| 5364 * | |
| 5365 * Completes with a [FileList]. | |
| 5366 * | |
| 5367 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 5368 * error. | |
| 5369 * | |
| 5370 * If the used [http.Client] completes with an error when making a REST call, | |
| 5371 * this method will complete with the same error. | |
| 5372 */ | |
| 5373 async.Future<FileList> list(core.String profileId, {core.int maxResults, core.
String pageToken, core.String scope, core.String sortField, core.String sortOrde
r}) { | |
| 5374 var _url = null; | |
| 5375 var _queryParams = new core.Map(); | |
| 5376 var _uploadMedia = null; | |
| 5377 var _uploadOptions = null; | |
| 5378 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 5379 var _body = null; | |
| 5380 | |
| 5381 if (profileId == null) { | |
| 5382 throw new core.ArgumentError("Parameter profileId is required."); | |
| 5383 } | |
| 5384 if (maxResults != null) { | |
| 5385 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 5386 } | |
| 5387 if (pageToken != null) { | |
| 5388 _queryParams["pageToken"] = [pageToken]; | |
| 5389 } | |
| 5390 if (scope != null) { | |
| 5391 _queryParams["scope"] = [scope]; | |
| 5392 } | |
| 5393 if (sortField != null) { | |
| 5394 _queryParams["sortField"] = [sortField]; | |
| 5395 } | |
| 5396 if (sortOrder != null) { | |
| 5397 _queryParams["sortOrder"] = [sortOrder]; | |
| 5398 } | |
| 5399 | |
| 5400 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/fil
es'; | |
| 5401 | |
| 5402 var _response = _requester.request(_url, | |
| 5403 "GET", | |
| 5404 body: _body, | |
| 5405 queryParams: _queryParams, | |
| 5406 uploadOptions: _uploadOptions, | |
| 5407 uploadMedia: _uploadMedia, | |
| 5408 downloadOptions: _downloadOptions); | |
| 5409 return _response.then((data) => new FileList.fromJson(data)); | |
| 5410 } | |
| 5411 | |
| 5412 } | |
| 5413 | |
| 5414 | |
| 5415 class FloodlightActivitiesResourceApi { | |
| 5416 final commons.ApiRequester _requester; | |
| 5417 | |
| 5418 FloodlightActivitiesResourceApi(commons.ApiRequester client) : | |
| 5419 _requester = client; | |
| 5420 | |
| 5421 /** | |
| 5422 * Deletes an existing floodlight activity. | |
| 5423 * | |
| 5424 * Request parameters: | |
| 5425 * | |
| 5426 * [profileId] - User profile ID associated with this request. | |
| 5427 * | |
| 5428 * [id] - Floodlight activity ID. | |
| 5429 * | |
| 5430 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 5431 * error. | |
| 5432 * | |
| 5433 * If the used [http.Client] completes with an error when making a REST call, | |
| 5434 * this method will complete with the same error. | |
| 5435 */ | |
| 5436 async.Future delete(core.String profileId, core.String id) { | |
| 5437 var _url = null; | |
| 5438 var _queryParams = new core.Map(); | |
| 5439 var _uploadMedia = null; | |
| 5440 var _uploadOptions = null; | |
| 5441 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 5442 var _body = null; | |
| 5443 | |
| 5444 if (profileId == null) { | |
| 5445 throw new core.ArgumentError("Parameter profileId is required."); | |
| 5446 } | |
| 5447 if (id == null) { | |
| 5448 throw new core.ArgumentError("Parameter id is required."); | |
| 5449 } | |
| 5450 | |
| 5451 _downloadOptions = null; | |
| 5452 | |
| 5453 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo
odlightActivities/' + commons.Escaper.ecapeVariable('$id'); | |
| 5454 | |
| 5455 var _response = _requester.request(_url, | |
| 5456 "DELETE", | |
| 5457 body: _body, | |
| 5458 queryParams: _queryParams, | |
| 5459 uploadOptions: _uploadOptions, | |
| 5460 uploadMedia: _uploadMedia, | |
| 5461 downloadOptions: _downloadOptions); | |
| 5462 return _response.then((data) => null); | |
| 5463 } | |
| 5464 | |
| 5465 /** | |
| 5466 * Generates a tag for a floodlight activity. | |
| 5467 * | |
| 5468 * Request parameters: | |
| 5469 * | |
| 5470 * [profileId] - User profile ID associated with this request. | |
| 5471 * | |
| 5472 * [floodlightActivityId] - Floodlight activity ID for which we want to | |
| 5473 * generate a tag. | |
| 5474 * | |
| 5475 * Completes with a [FloodlightActivitiesGenerateTagResponse]. | |
| 5476 * | |
| 5477 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 5478 * error. | |
| 5479 * | |
| 5480 * If the used [http.Client] completes with an error when making a REST call, | |
| 5481 * this method will complete with the same error. | |
| 5482 */ | |
| 5483 async.Future<FloodlightActivitiesGenerateTagResponse> generatetag(core.String
profileId, {core.String floodlightActivityId}) { | |
| 5484 var _url = null; | |
| 5485 var _queryParams = new core.Map(); | |
| 5486 var _uploadMedia = null; | |
| 5487 var _uploadOptions = null; | |
| 5488 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 5489 var _body = null; | |
| 5490 | |
| 5491 if (profileId == null) { | |
| 5492 throw new core.ArgumentError("Parameter profileId is required."); | |
| 5493 } | |
| 5494 if (floodlightActivityId != null) { | |
| 5495 _queryParams["floodlightActivityId"] = [floodlightActivityId]; | |
| 5496 } | |
| 5497 | |
| 5498 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo
odlightActivities/generatetag'; | |
| 5499 | |
| 5500 var _response = _requester.request(_url, | |
| 5501 "POST", | |
| 5502 body: _body, | |
| 5503 queryParams: _queryParams, | |
| 5504 uploadOptions: _uploadOptions, | |
| 5505 uploadMedia: _uploadMedia, | |
| 5506 downloadOptions: _downloadOptions); | |
| 5507 return _response.then((data) => new FloodlightActivitiesGenerateTagResponse.
fromJson(data)); | |
| 5508 } | |
| 5509 | |
| 5510 /** | |
| 5511 * Gets one floodlight activity by ID. | |
| 5512 * | |
| 5513 * Request parameters: | |
| 5514 * | |
| 5515 * [profileId] - User profile ID associated with this request. | |
| 5516 * | |
| 5517 * [id] - Floodlight activity ID. | |
| 5518 * | |
| 5519 * Completes with a [FloodlightActivity]. | |
| 5520 * | |
| 5521 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 5522 * error. | |
| 5523 * | |
| 5524 * If the used [http.Client] completes with an error when making a REST call, | |
| 5525 * this method will complete with the same error. | |
| 5526 */ | |
| 5527 async.Future<FloodlightActivity> get(core.String profileId, core.String id) { | |
| 5528 var _url = null; | |
| 5529 var _queryParams = new core.Map(); | |
| 5530 var _uploadMedia = null; | |
| 5531 var _uploadOptions = null; | |
| 5532 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 5533 var _body = null; | |
| 5534 | |
| 5535 if (profileId == null) { | |
| 5536 throw new core.ArgumentError("Parameter profileId is required."); | |
| 5537 } | |
| 5538 if (id == null) { | |
| 5539 throw new core.ArgumentError("Parameter id is required."); | |
| 5540 } | |
| 5541 | |
| 5542 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo
odlightActivities/' + commons.Escaper.ecapeVariable('$id'); | |
| 5543 | |
| 5544 var _response = _requester.request(_url, | |
| 5545 "GET", | |
| 5546 body: _body, | |
| 5547 queryParams: _queryParams, | |
| 5548 uploadOptions: _uploadOptions, | |
| 5549 uploadMedia: _uploadMedia, | |
| 5550 downloadOptions: _downloadOptions); | |
| 5551 return _response.then((data) => new FloodlightActivity.fromJson(data)); | |
| 5552 } | |
| 5553 | |
| 5554 /** | |
| 5555 * Inserts a new floodlight activity. | |
| 5556 * | |
| 5557 * [request] - The metadata request object. | |
| 5558 * | |
| 5559 * Request parameters: | |
| 5560 * | |
| 5561 * [profileId] - User profile ID associated with this request. | |
| 5562 * | |
| 5563 * Completes with a [FloodlightActivity]. | |
| 5564 * | |
| 5565 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 5566 * error. | |
| 5567 * | |
| 5568 * If the used [http.Client] completes with an error when making a REST call, | |
| 5569 * this method will complete with the same error. | |
| 5570 */ | |
| 5571 async.Future<FloodlightActivity> insert(FloodlightActivity request, core.Strin
g profileId) { | |
| 5572 var _url = null; | |
| 5573 var _queryParams = new core.Map(); | |
| 5574 var _uploadMedia = null; | |
| 5575 var _uploadOptions = null; | |
| 5576 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 5577 var _body = null; | |
| 5578 | |
| 5579 if (request != null) { | |
| 5580 _body = convert.JSON.encode((request).toJson()); | |
| 5581 } | |
| 5582 if (profileId == null) { | |
| 5583 throw new core.ArgumentError("Parameter profileId is required."); | |
| 5584 } | |
| 5585 | |
| 5586 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo
odlightActivities'; | |
| 5587 | |
| 5588 var _response = _requester.request(_url, | |
| 5589 "POST", | |
| 5590 body: _body, | |
| 5591 queryParams: _queryParams, | |
| 5592 uploadOptions: _uploadOptions, | |
| 5593 uploadMedia: _uploadMedia, | |
| 5594 downloadOptions: _downloadOptions); | |
| 5595 return _response.then((data) => new FloodlightActivity.fromJson(data)); | |
| 5596 } | |
| 5597 | |
| 5598 /** | |
| 5599 * Retrieves a list of floodlight activities, possibly filtered. | |
| 5600 * | |
| 5601 * Request parameters: | |
| 5602 * | |
| 5603 * [profileId] - User profile ID associated with this request. | |
| 5604 * | |
| 5605 * [advertiserId] - Select only floodlight activities for the specified | |
| 5606 * advertiser ID. Must specify either ids, advertiserId, or | |
| 5607 * floodlightConfigurationId for a non-empty result. | |
| 5608 * | |
| 5609 * [floodlightActivityGroupIds] - Select only floodlight activities with the | |
| 5610 * specified floodlight activity group IDs. | |
| 5611 * | |
| 5612 * [floodlightActivityGroupName] - Select only floodlight activities with the | |
| 5613 * specified floodlight activity group name. | |
| 5614 * | |
| 5615 * [floodlightActivityGroupTagString] - Select only floodlight activities with | |
| 5616 * the specified floodlight activity group tag string. | |
| 5617 * | |
| 5618 * [floodlightActivityGroupType] - Select only floodlight activities with the | |
| 5619 * specified floodlight activity group type. | |
| 5620 * Possible string values are: | |
| 5621 * - "COUNTER" | |
| 5622 * - "SALE" | |
| 5623 * | |
| 5624 * [floodlightConfigurationId] - Select only floodlight activities for the | |
| 5625 * specified floodlight configuration ID. Must specify either ids, | |
| 5626 * advertiserId, or floodlightConfigurationId for a non-empty result. | |
| 5627 * | |
| 5628 * [ids] - Select only floodlight activities with the specified IDs. Must | |
| 5629 * specify either ids, advertiserId, or floodlightConfigurationId for a | |
| 5630 * non-empty result. | |
| 5631 * | |
| 5632 * [maxResults] - Maximum number of results to return. | |
| 5633 * | |
| 5634 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 5635 * | |
| 5636 * [searchString] - Allows searching for objects by name or ID. Wildcards (*) | |
| 5637 * are allowed. For example, "floodlightactivity*2015" will return objects | |
| 5638 * with names like "floodlightactivity June 2015", "floodlightactivity April | |
| 5639 * 2015", or simply "floodlightactivity 2015". Most of the searches also add | |
| 5640 * wildcards implicitly at the start and the end of the search string. For | |
| 5641 * example, a search string of "floodlightactivity" will match objects with | |
| 5642 * name "my floodlightactivity activity", "floodlightactivity 2015", or simply | |
| 5643 * "floodlightactivity". | |
| 5644 * | |
| 5645 * [sortField] - Field by which to sort the list. | |
| 5646 * Possible string values are: | |
| 5647 * - "ID" | |
| 5648 * - "NAME" | |
| 5649 * | |
| 5650 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 5651 * Possible string values are: | |
| 5652 * - "ASCENDING" | |
| 5653 * - "DESCENDING" | |
| 5654 * | |
| 5655 * [tagString] - Select only floodlight activities with the specified tag | |
| 5656 * string. | |
| 5657 * | |
| 5658 * Completes with a [FloodlightActivitiesListResponse]. | |
| 5659 * | |
| 5660 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 5661 * error. | |
| 5662 * | |
| 5663 * If the used [http.Client] completes with an error when making a REST call, | |
| 5664 * this method will complete with the same error. | |
| 5665 */ | |
| 5666 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}) { | |
| 5667 var _url = null; | |
| 5668 var _queryParams = new core.Map(); | |
| 5669 var _uploadMedia = null; | |
| 5670 var _uploadOptions = null; | |
| 5671 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 5672 var _body = null; | |
| 5673 | |
| 5674 if (profileId == null) { | |
| 5675 throw new core.ArgumentError("Parameter profileId is required."); | |
| 5676 } | |
| 5677 if (advertiserId != null) { | |
| 5678 _queryParams["advertiserId"] = [advertiserId]; | |
| 5679 } | |
| 5680 if (floodlightActivityGroupIds != null) { | |
| 5681 _queryParams["floodlightActivityGroupIds"] = floodlightActivityGroupIds; | |
| 5682 } | |
| 5683 if (floodlightActivityGroupName != null) { | |
| 5684 _queryParams["floodlightActivityGroupName"] = [floodlightActivityGroupName
]; | |
| 5685 } | |
| 5686 if (floodlightActivityGroupTagString != null) { | |
| 5687 _queryParams["floodlightActivityGroupTagString"] = [floodlightActivityGrou
pTagString]; | |
| 5688 } | |
| 5689 if (floodlightActivityGroupType != null) { | |
| 5690 _queryParams["floodlightActivityGroupType"] = [floodlightActivityGroupType
]; | |
| 5691 } | |
| 5692 if (floodlightConfigurationId != null) { | |
| 5693 _queryParams["floodlightConfigurationId"] = [floodlightConfigurationId]; | |
| 5694 } | |
| 5695 if (ids != null) { | |
| 5696 _queryParams["ids"] = ids; | |
| 5697 } | |
| 5698 if (maxResults != null) { | |
| 5699 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 5700 } | |
| 5701 if (pageToken != null) { | |
| 5702 _queryParams["pageToken"] = [pageToken]; | |
| 5703 } | |
| 5704 if (searchString != null) { | |
| 5705 _queryParams["searchString"] = [searchString]; | |
| 5706 } | |
| 5707 if (sortField != null) { | |
| 5708 _queryParams["sortField"] = [sortField]; | |
| 5709 } | |
| 5710 if (sortOrder != null) { | |
| 5711 _queryParams["sortOrder"] = [sortOrder]; | |
| 5712 } | |
| 5713 if (tagString != null) { | |
| 5714 _queryParams["tagString"] = [tagString]; | |
| 5715 } | |
| 5716 | |
| 5717 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo
odlightActivities'; | |
| 5718 | |
| 5719 var _response = _requester.request(_url, | |
| 5720 "GET", | |
| 5721 body: _body, | |
| 5722 queryParams: _queryParams, | |
| 5723 uploadOptions: _uploadOptions, | |
| 5724 uploadMedia: _uploadMedia, | |
| 5725 downloadOptions: _downloadOptions); | |
| 5726 return _response.then((data) => new FloodlightActivitiesListResponse.fromJso
n(data)); | |
| 5727 } | |
| 5728 | |
| 5729 /** | |
| 5730 * Updates an existing floodlight activity. This method supports patch | |
| 5731 * semantics. | |
| 5732 * | |
| 5733 * [request] - The metadata request object. | |
| 5734 * | |
| 5735 * Request parameters: | |
| 5736 * | |
| 5737 * [profileId] - User profile ID associated with this request. | |
| 5738 * | |
| 5739 * [id] - Floodlight activity ID. | |
| 5740 * | |
| 5741 * Completes with a [FloodlightActivity]. | |
| 5742 * | |
| 5743 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 5744 * error. | |
| 5745 * | |
| 5746 * If the used [http.Client] completes with an error when making a REST call, | |
| 5747 * this method will complete with the same error. | |
| 5748 */ | |
| 5749 async.Future<FloodlightActivity> patch(FloodlightActivity request, core.String
profileId, core.String id) { | |
| 5750 var _url = null; | |
| 5751 var _queryParams = new core.Map(); | |
| 5752 var _uploadMedia = null; | |
| 5753 var _uploadOptions = null; | |
| 5754 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 5755 var _body = null; | |
| 5756 | |
| 5757 if (request != null) { | |
| 5758 _body = convert.JSON.encode((request).toJson()); | |
| 5759 } | |
| 5760 if (profileId == null) { | |
| 5761 throw new core.ArgumentError("Parameter profileId is required."); | |
| 5762 } | |
| 5763 if (id == null) { | |
| 5764 throw new core.ArgumentError("Parameter id is required."); | |
| 5765 } | |
| 5766 _queryParams["id"] = [id]; | |
| 5767 | |
| 5768 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo
odlightActivities'; | |
| 5769 | |
| 5770 var _response = _requester.request(_url, | |
| 5771 "PATCH", | |
| 5772 body: _body, | |
| 5773 queryParams: _queryParams, | |
| 5774 uploadOptions: _uploadOptions, | |
| 5775 uploadMedia: _uploadMedia, | |
| 5776 downloadOptions: _downloadOptions); | |
| 5777 return _response.then((data) => new FloodlightActivity.fromJson(data)); | |
| 5778 } | |
| 5779 | |
| 5780 /** | |
| 5781 * Updates an existing floodlight activity. | |
| 5782 * | |
| 5783 * [request] - The metadata request object. | |
| 5784 * | |
| 5785 * Request parameters: | |
| 5786 * | |
| 5787 * [profileId] - User profile ID associated with this request. | |
| 5788 * | |
| 5789 * Completes with a [FloodlightActivity]. | |
| 5790 * | |
| 5791 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 5792 * error. | |
| 5793 * | |
| 5794 * If the used [http.Client] completes with an error when making a REST call, | |
| 5795 * this method will complete with the same error. | |
| 5796 */ | |
| 5797 async.Future<FloodlightActivity> update(FloodlightActivity request, core.Strin
g profileId) { | |
| 5798 var _url = null; | |
| 5799 var _queryParams = new core.Map(); | |
| 5800 var _uploadMedia = null; | |
| 5801 var _uploadOptions = null; | |
| 5802 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 5803 var _body = null; | |
| 5804 | |
| 5805 if (request != null) { | |
| 5806 _body = convert.JSON.encode((request).toJson()); | |
| 5807 } | |
| 5808 if (profileId == null) { | |
| 5809 throw new core.ArgumentError("Parameter profileId is required."); | |
| 5810 } | |
| 5811 | |
| 5812 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo
odlightActivities'; | |
| 5813 | |
| 5814 var _response = _requester.request(_url, | |
| 5815 "PUT", | |
| 5816 body: _body, | |
| 5817 queryParams: _queryParams, | |
| 5818 uploadOptions: _uploadOptions, | |
| 5819 uploadMedia: _uploadMedia, | |
| 5820 downloadOptions: _downloadOptions); | |
| 5821 return _response.then((data) => new FloodlightActivity.fromJson(data)); | |
| 5822 } | |
| 5823 | |
| 5824 } | |
| 5825 | |
| 5826 | |
| 5827 class FloodlightActivityGroupsResourceApi { | |
| 5828 final commons.ApiRequester _requester; | |
| 5829 | |
| 5830 FloodlightActivityGroupsResourceApi(commons.ApiRequester client) : | |
| 5831 _requester = client; | |
| 5832 | |
| 5833 /** | |
| 5834 * Deletes an existing floodlight activity group. | |
| 5835 * | |
| 5836 * Request parameters: | |
| 5837 * | |
| 5838 * [profileId] - User profile ID associated with this request. | |
| 5839 * | |
| 5840 * [id] - Floodlight activity Group ID. | |
| 5841 * | |
| 5842 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 5843 * error. | |
| 5844 * | |
| 5845 * If the used [http.Client] completes with an error when making a REST call, | |
| 5846 * this method will complete with the same error. | |
| 5847 */ | |
| 5848 async.Future delete(core.String profileId, core.String id) { | |
| 5849 var _url = null; | |
| 5850 var _queryParams = new core.Map(); | |
| 5851 var _uploadMedia = null; | |
| 5852 var _uploadOptions = null; | |
| 5853 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 5854 var _body = null; | |
| 5855 | |
| 5856 if (profileId == null) { | |
| 5857 throw new core.ArgumentError("Parameter profileId is required."); | |
| 5858 } | |
| 5859 if (id == null) { | |
| 5860 throw new core.ArgumentError("Parameter id is required."); | |
| 5861 } | |
| 5862 | |
| 5863 _downloadOptions = null; | |
| 5864 | |
| 5865 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo
odlightActivityGroups/' + commons.Escaper.ecapeVariable('$id'); | |
| 5866 | |
| 5867 var _response = _requester.request(_url, | |
| 5868 "DELETE", | |
| 5869 body: _body, | |
| 5870 queryParams: _queryParams, | |
| 5871 uploadOptions: _uploadOptions, | |
| 5872 uploadMedia: _uploadMedia, | |
| 5873 downloadOptions: _downloadOptions); | |
| 5874 return _response.then((data) => null); | |
| 5875 } | |
| 5876 | |
| 5877 /** | |
| 5878 * Gets one floodlight activity group by ID. | |
| 5879 * | |
| 5880 * Request parameters: | |
| 5881 * | |
| 5882 * [profileId] - User profile ID associated with this request. | |
| 5883 * | |
| 5884 * [id] - Floodlight activity Group ID. | |
| 5885 * | |
| 5886 * Completes with a [FloodlightActivityGroup]. | |
| 5887 * | |
| 5888 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 5889 * error. | |
| 5890 * | |
| 5891 * If the used [http.Client] completes with an error when making a REST call, | |
| 5892 * this method will complete with the same error. | |
| 5893 */ | |
| 5894 async.Future<FloodlightActivityGroup> get(core.String profileId, core.String i
d) { | |
| 5895 var _url = null; | |
| 5896 var _queryParams = new core.Map(); | |
| 5897 var _uploadMedia = null; | |
| 5898 var _uploadOptions = null; | |
| 5899 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 5900 var _body = null; | |
| 5901 | |
| 5902 if (profileId == null) { | |
| 5903 throw new core.ArgumentError("Parameter profileId is required."); | |
| 5904 } | |
| 5905 if (id == null) { | |
| 5906 throw new core.ArgumentError("Parameter id is required."); | |
| 5907 } | |
| 5908 | |
| 5909 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo
odlightActivityGroups/' + commons.Escaper.ecapeVariable('$id'); | |
| 5910 | |
| 5911 var _response = _requester.request(_url, | |
| 5912 "GET", | |
| 5913 body: _body, | |
| 5914 queryParams: _queryParams, | |
| 5915 uploadOptions: _uploadOptions, | |
| 5916 uploadMedia: _uploadMedia, | |
| 5917 downloadOptions: _downloadOptions); | |
| 5918 return _response.then((data) => new FloodlightActivityGroup.fromJson(data)); | |
| 5919 } | |
| 5920 | |
| 5921 /** | |
| 5922 * Inserts a new floodlight activity group. | |
| 5923 * | |
| 5924 * [request] - The metadata request object. | |
| 5925 * | |
| 5926 * Request parameters: | |
| 5927 * | |
| 5928 * [profileId] - User profile ID associated with this request. | |
| 5929 * | |
| 5930 * Completes with a [FloodlightActivityGroup]. | |
| 5931 * | |
| 5932 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 5933 * error. | |
| 5934 * | |
| 5935 * If the used [http.Client] completes with an error when making a REST call, | |
| 5936 * this method will complete with the same error. | |
| 5937 */ | |
| 5938 async.Future<FloodlightActivityGroup> insert(FloodlightActivityGroup request,
core.String profileId) { | |
| 5939 var _url = null; | |
| 5940 var _queryParams = new core.Map(); | |
| 5941 var _uploadMedia = null; | |
| 5942 var _uploadOptions = null; | |
| 5943 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 5944 var _body = null; | |
| 5945 | |
| 5946 if (request != null) { | |
| 5947 _body = convert.JSON.encode((request).toJson()); | |
| 5948 } | |
| 5949 if (profileId == null) { | |
| 5950 throw new core.ArgumentError("Parameter profileId is required."); | |
| 5951 } | |
| 5952 | |
| 5953 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo
odlightActivityGroups'; | |
| 5954 | |
| 5955 var _response = _requester.request(_url, | |
| 5956 "POST", | |
| 5957 body: _body, | |
| 5958 queryParams: _queryParams, | |
| 5959 uploadOptions: _uploadOptions, | |
| 5960 uploadMedia: _uploadMedia, | |
| 5961 downloadOptions: _downloadOptions); | |
| 5962 return _response.then((data) => new FloodlightActivityGroup.fromJson(data)); | |
| 5963 } | |
| 5964 | |
| 5965 /** | |
| 5966 * Retrieves a list of floodlight activity groups, possibly filtered. | |
| 5967 * | |
| 5968 * Request parameters: | |
| 5969 * | |
| 5970 * [profileId] - User profile ID associated with this request. | |
| 5971 * | |
| 5972 * [advertiserId] - Select only floodlight activity groups with the specified | |
| 5973 * advertiser ID. Must specify either advertiserId or | |
| 5974 * floodlightConfigurationId for a non-empty result. | |
| 5975 * | |
| 5976 * [floodlightConfigurationId] - Select only floodlight activity groups with | |
| 5977 * the specified floodlight configuration ID. Must specify either | |
| 5978 * advertiserId, or floodlightConfigurationId for a non-empty result. | |
| 5979 * | |
| 5980 * [ids] - Select only floodlight activity groups with the specified IDs. Must | |
| 5981 * specify either advertiserId or floodlightConfigurationId for a non-empty | |
| 5982 * result. | |
| 5983 * | |
| 5984 * [maxResults] - Maximum number of results to return. | |
| 5985 * | |
| 5986 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 5987 * | |
| 5988 * [searchString] - Allows searching for objects by name or ID. Wildcards (*) | |
| 5989 * are allowed. For example, "floodlightactivitygroup*2015" will return | |
| 5990 * objects with names like "floodlightactivitygroup June 2015", | |
| 5991 * "floodlightactivitygroup April 2015", or simply "floodlightactivitygroup | |
| 5992 * 2015". Most of the searches also add wildcards implicitly at the start and | |
| 5993 * the end of the search string. For example, a search string of | |
| 5994 * "floodlightactivitygroup" will match objects with name "my | |
| 5995 * floodlightactivitygroup activity", "floodlightactivitygroup 2015", or | |
| 5996 * simply "floodlightactivitygroup". | |
| 5997 * | |
| 5998 * [sortField] - Field by which to sort the list. | |
| 5999 * Possible string values are: | |
| 6000 * - "ID" | |
| 6001 * - "NAME" | |
| 6002 * | |
| 6003 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 6004 * Possible string values are: | |
| 6005 * - "ASCENDING" | |
| 6006 * - "DESCENDING" | |
| 6007 * | |
| 6008 * [type] - Select only floodlight activity groups with the specified | |
| 6009 * floodlight activity group type. | |
| 6010 * Possible string values are: | |
| 6011 * - "COUNTER" | |
| 6012 * - "SALE" | |
| 6013 * | |
| 6014 * Completes with a [FloodlightActivityGroupsListResponse]. | |
| 6015 * | |
| 6016 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 6017 * error. | |
| 6018 * | |
| 6019 * If the used [http.Client] completes with an error when making a REST call, | |
| 6020 * this method will complete with the same error. | |
| 6021 */ | |
| 6022 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}) { | |
| 6023 var _url = null; | |
| 6024 var _queryParams = new core.Map(); | |
| 6025 var _uploadMedia = null; | |
| 6026 var _uploadOptions = null; | |
| 6027 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 6028 var _body = null; | |
| 6029 | |
| 6030 if (profileId == null) { | |
| 6031 throw new core.ArgumentError("Parameter profileId is required."); | |
| 6032 } | |
| 6033 if (advertiserId != null) { | |
| 6034 _queryParams["advertiserId"] = [advertiserId]; | |
| 6035 } | |
| 6036 if (floodlightConfigurationId != null) { | |
| 6037 _queryParams["floodlightConfigurationId"] = [floodlightConfigurationId]; | |
| 6038 } | |
| 6039 if (ids != null) { | |
| 6040 _queryParams["ids"] = ids; | |
| 6041 } | |
| 6042 if (maxResults != null) { | |
| 6043 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 6044 } | |
| 6045 if (pageToken != null) { | |
| 6046 _queryParams["pageToken"] = [pageToken]; | |
| 6047 } | |
| 6048 if (searchString != null) { | |
| 6049 _queryParams["searchString"] = [searchString]; | |
| 6050 } | |
| 6051 if (sortField != null) { | |
| 6052 _queryParams["sortField"] = [sortField]; | |
| 6053 } | |
| 6054 if (sortOrder != null) { | |
| 6055 _queryParams["sortOrder"] = [sortOrder]; | |
| 6056 } | |
| 6057 if (type != null) { | |
| 6058 _queryParams["type"] = [type]; | |
| 6059 } | |
| 6060 | |
| 6061 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo
odlightActivityGroups'; | |
| 6062 | |
| 6063 var _response = _requester.request(_url, | |
| 6064 "GET", | |
| 6065 body: _body, | |
| 6066 queryParams: _queryParams, | |
| 6067 uploadOptions: _uploadOptions, | |
| 6068 uploadMedia: _uploadMedia, | |
| 6069 downloadOptions: _downloadOptions); | |
| 6070 return _response.then((data) => new FloodlightActivityGroupsListResponse.fro
mJson(data)); | |
| 6071 } | |
| 6072 | |
| 6073 /** | |
| 6074 * Updates an existing floodlight activity group. This method supports patch | |
| 6075 * semantics. | |
| 6076 * | |
| 6077 * [request] - The metadata request object. | |
| 6078 * | |
| 6079 * Request parameters: | |
| 6080 * | |
| 6081 * [profileId] - User profile ID associated with this request. | |
| 6082 * | |
| 6083 * [id] - Floodlight activity Group ID. | |
| 6084 * | |
| 6085 * Completes with a [FloodlightActivityGroup]. | |
| 6086 * | |
| 6087 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 6088 * error. | |
| 6089 * | |
| 6090 * If the used [http.Client] completes with an error when making a REST call, | |
| 6091 * this method will complete with the same error. | |
| 6092 */ | |
| 6093 async.Future<FloodlightActivityGroup> patch(FloodlightActivityGroup request, c
ore.String profileId, core.String id) { | |
| 6094 var _url = null; | |
| 6095 var _queryParams = new core.Map(); | |
| 6096 var _uploadMedia = null; | |
| 6097 var _uploadOptions = null; | |
| 6098 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 6099 var _body = null; | |
| 6100 | |
| 6101 if (request != null) { | |
| 6102 _body = convert.JSON.encode((request).toJson()); | |
| 6103 } | |
| 6104 if (profileId == null) { | |
| 6105 throw new core.ArgumentError("Parameter profileId is required."); | |
| 6106 } | |
| 6107 if (id == null) { | |
| 6108 throw new core.ArgumentError("Parameter id is required."); | |
| 6109 } | |
| 6110 _queryParams["id"] = [id]; | |
| 6111 | |
| 6112 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo
odlightActivityGroups'; | |
| 6113 | |
| 6114 var _response = _requester.request(_url, | |
| 6115 "PATCH", | |
| 6116 body: _body, | |
| 6117 queryParams: _queryParams, | |
| 6118 uploadOptions: _uploadOptions, | |
| 6119 uploadMedia: _uploadMedia, | |
| 6120 downloadOptions: _downloadOptions); | |
| 6121 return _response.then((data) => new FloodlightActivityGroup.fromJson(data)); | |
| 6122 } | |
| 6123 | |
| 6124 /** | |
| 6125 * Updates an existing floodlight activity group. | |
| 6126 * | |
| 6127 * [request] - The metadata request object. | |
| 6128 * | |
| 6129 * Request parameters: | |
| 6130 * | |
| 6131 * [profileId] - User profile ID associated with this request. | |
| 6132 * | |
| 6133 * Completes with a [FloodlightActivityGroup]. | |
| 6134 * | |
| 6135 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 6136 * error. | |
| 6137 * | |
| 6138 * If the used [http.Client] completes with an error when making a REST call, | |
| 6139 * this method will complete with the same error. | |
| 6140 */ | |
| 6141 async.Future<FloodlightActivityGroup> update(FloodlightActivityGroup request,
core.String profileId) { | |
| 6142 var _url = null; | |
| 6143 var _queryParams = new core.Map(); | |
| 6144 var _uploadMedia = null; | |
| 6145 var _uploadOptions = null; | |
| 6146 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 6147 var _body = null; | |
| 6148 | |
| 6149 if (request != null) { | |
| 6150 _body = convert.JSON.encode((request).toJson()); | |
| 6151 } | |
| 6152 if (profileId == null) { | |
| 6153 throw new core.ArgumentError("Parameter profileId is required."); | |
| 6154 } | |
| 6155 | |
| 6156 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo
odlightActivityGroups'; | |
| 6157 | |
| 6158 var _response = _requester.request(_url, | |
| 6159 "PUT", | |
| 6160 body: _body, | |
| 6161 queryParams: _queryParams, | |
| 6162 uploadOptions: _uploadOptions, | |
| 6163 uploadMedia: _uploadMedia, | |
| 6164 downloadOptions: _downloadOptions); | |
| 6165 return _response.then((data) => new FloodlightActivityGroup.fromJson(data)); | |
| 6166 } | |
| 6167 | |
| 6168 } | |
| 6169 | |
| 6170 | |
| 6171 class FloodlightConfigurationsResourceApi { | |
| 6172 final commons.ApiRequester _requester; | |
| 6173 | |
| 6174 FloodlightConfigurationsResourceApi(commons.ApiRequester client) : | |
| 6175 _requester = client; | |
| 6176 | |
| 6177 /** | |
| 6178 * Gets one floodlight configuration by ID. | |
| 6179 * | |
| 6180 * Request parameters: | |
| 6181 * | |
| 6182 * [profileId] - User profile ID associated with this request. | |
| 6183 * | |
| 6184 * [id] - Floodlight configuration ID. | |
| 6185 * | |
| 6186 * Completes with a [FloodlightConfiguration]. | |
| 6187 * | |
| 6188 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 6189 * error. | |
| 6190 * | |
| 6191 * If the used [http.Client] completes with an error when making a REST call, | |
| 6192 * this method will complete with the same error. | |
| 6193 */ | |
| 6194 async.Future<FloodlightConfiguration> get(core.String profileId, core.String i
d) { | |
| 6195 var _url = null; | |
| 6196 var _queryParams = new core.Map(); | |
| 6197 var _uploadMedia = null; | |
| 6198 var _uploadOptions = null; | |
| 6199 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 6200 var _body = null; | |
| 6201 | |
| 6202 if (profileId == null) { | |
| 6203 throw new core.ArgumentError("Parameter profileId is required."); | |
| 6204 } | |
| 6205 if (id == null) { | |
| 6206 throw new core.ArgumentError("Parameter id is required."); | |
| 6207 } | |
| 6208 | |
| 6209 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo
odlightConfigurations/' + commons.Escaper.ecapeVariable('$id'); | |
| 6210 | |
| 6211 var _response = _requester.request(_url, | |
| 6212 "GET", | |
| 6213 body: _body, | |
| 6214 queryParams: _queryParams, | |
| 6215 uploadOptions: _uploadOptions, | |
| 6216 uploadMedia: _uploadMedia, | |
| 6217 downloadOptions: _downloadOptions); | |
| 6218 return _response.then((data) => new FloodlightConfiguration.fromJson(data)); | |
| 6219 } | |
| 6220 | |
| 6221 /** | |
| 6222 * Retrieves a list of floodlight configurations, possibly filtered. | |
| 6223 * | |
| 6224 * Request parameters: | |
| 6225 * | |
| 6226 * [profileId] - User profile ID associated with this request. | |
| 6227 * | |
| 6228 * [ids] - Set of IDs of floodlight configurations to retrieve. Required | |
| 6229 * field; otherwise an empty list will be returned. | |
| 6230 * | |
| 6231 * Completes with a [FloodlightConfigurationsListResponse]. | |
| 6232 * | |
| 6233 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 6234 * error. | |
| 6235 * | |
| 6236 * If the used [http.Client] completes with an error when making a REST call, | |
| 6237 * this method will complete with the same error. | |
| 6238 */ | |
| 6239 async.Future<FloodlightConfigurationsListResponse> list(core.String profileId,
{core.List<core.String> ids}) { | |
| 6240 var _url = null; | |
| 6241 var _queryParams = new core.Map(); | |
| 6242 var _uploadMedia = null; | |
| 6243 var _uploadOptions = null; | |
| 6244 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 6245 var _body = null; | |
| 6246 | |
| 6247 if (profileId == null) { | |
| 6248 throw new core.ArgumentError("Parameter profileId is required."); | |
| 6249 } | |
| 6250 if (ids != null) { | |
| 6251 _queryParams["ids"] = ids; | |
| 6252 } | |
| 6253 | |
| 6254 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo
odlightConfigurations'; | |
| 6255 | |
| 6256 var _response = _requester.request(_url, | |
| 6257 "GET", | |
| 6258 body: _body, | |
| 6259 queryParams: _queryParams, | |
| 6260 uploadOptions: _uploadOptions, | |
| 6261 uploadMedia: _uploadMedia, | |
| 6262 downloadOptions: _downloadOptions); | |
| 6263 return _response.then((data) => new FloodlightConfigurationsListResponse.fro
mJson(data)); | |
| 6264 } | |
| 6265 | |
| 6266 /** | |
| 6267 * Updates an existing floodlight configuration. This method supports patch | |
| 6268 * semantics. | |
| 6269 * | |
| 6270 * [request] - The metadata request object. | |
| 6271 * | |
| 6272 * Request parameters: | |
| 6273 * | |
| 6274 * [profileId] - User profile ID associated with this request. | |
| 6275 * | |
| 6276 * [id] - Floodlight configuration ID. | |
| 6277 * | |
| 6278 * Completes with a [FloodlightConfiguration]. | |
| 6279 * | |
| 6280 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 6281 * error. | |
| 6282 * | |
| 6283 * If the used [http.Client] completes with an error when making a REST call, | |
| 6284 * this method will complete with the same error. | |
| 6285 */ | |
| 6286 async.Future<FloodlightConfiguration> patch(FloodlightConfiguration request, c
ore.String profileId, core.String id) { | |
| 6287 var _url = null; | |
| 6288 var _queryParams = new core.Map(); | |
| 6289 var _uploadMedia = null; | |
| 6290 var _uploadOptions = null; | |
| 6291 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 6292 var _body = null; | |
| 6293 | |
| 6294 if (request != null) { | |
| 6295 _body = convert.JSON.encode((request).toJson()); | |
| 6296 } | |
| 6297 if (profileId == null) { | |
| 6298 throw new core.ArgumentError("Parameter profileId is required."); | |
| 6299 } | |
| 6300 if (id == null) { | |
| 6301 throw new core.ArgumentError("Parameter id is required."); | |
| 6302 } | |
| 6303 _queryParams["id"] = [id]; | |
| 6304 | |
| 6305 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo
odlightConfigurations'; | |
| 6306 | |
| 6307 var _response = _requester.request(_url, | |
| 6308 "PATCH", | |
| 6309 body: _body, | |
| 6310 queryParams: _queryParams, | |
| 6311 uploadOptions: _uploadOptions, | |
| 6312 uploadMedia: _uploadMedia, | |
| 6313 downloadOptions: _downloadOptions); | |
| 6314 return _response.then((data) => new FloodlightConfiguration.fromJson(data)); | |
| 6315 } | |
| 6316 | |
| 6317 /** | |
| 6318 * Updates an existing floodlight configuration. | |
| 6319 * | |
| 6320 * [request] - The metadata request object. | |
| 6321 * | |
| 6322 * Request parameters: | |
| 6323 * | |
| 6324 * [profileId] - User profile ID associated with this request. | |
| 6325 * | |
| 6326 * Completes with a [FloodlightConfiguration]. | |
| 6327 * | |
| 6328 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 6329 * error. | |
| 6330 * | |
| 6331 * If the used [http.Client] completes with an error when making a REST call, | |
| 6332 * this method will complete with the same error. | |
| 6333 */ | |
| 6334 async.Future<FloodlightConfiguration> update(FloodlightConfiguration request,
core.String profileId) { | |
| 6335 var _url = null; | |
| 6336 var _queryParams = new core.Map(); | |
| 6337 var _uploadMedia = null; | |
| 6338 var _uploadOptions = null; | |
| 6339 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 6340 var _body = null; | |
| 6341 | |
| 6342 if (request != null) { | |
| 6343 _body = convert.JSON.encode((request).toJson()); | |
| 6344 } | |
| 6345 if (profileId == null) { | |
| 6346 throw new core.ArgumentError("Parameter profileId is required."); | |
| 6347 } | |
| 6348 | |
| 6349 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo
odlightConfigurations'; | |
| 6350 | |
| 6351 var _response = _requester.request(_url, | |
| 6352 "PUT", | |
| 6353 body: _body, | |
| 6354 queryParams: _queryParams, | |
| 6355 uploadOptions: _uploadOptions, | |
| 6356 uploadMedia: _uploadMedia, | |
| 6357 downloadOptions: _downloadOptions); | |
| 6358 return _response.then((data) => new FloodlightConfiguration.fromJson(data)); | |
| 6359 } | |
| 6360 | |
| 6361 } | |
| 6362 | |
| 6363 | |
| 6364 class InventoryItemsResourceApi { | |
| 6365 final commons.ApiRequester _requester; | |
| 6366 | |
| 6367 InventoryItemsResourceApi(commons.ApiRequester client) : | |
| 6368 _requester = client; | |
| 6369 | |
| 6370 /** | |
| 6371 * Gets one inventory item by ID. | |
| 6372 * | |
| 6373 * Request parameters: | |
| 6374 * | |
| 6375 * [profileId] - User profile ID associated with this request. | |
| 6376 * | |
| 6377 * [projectId] - Project ID for order documents. | |
| 6378 * | |
| 6379 * [id] - Inventory item ID. | |
| 6380 * | |
| 6381 * Completes with a [InventoryItem]. | |
| 6382 * | |
| 6383 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 6384 * error. | |
| 6385 * | |
| 6386 * If the used [http.Client] completes with an error when making a REST call, | |
| 6387 * this method will complete with the same error. | |
| 6388 */ | |
| 6389 async.Future<InventoryItem> get(core.String profileId, core.String projectId,
core.String id) { | |
| 6390 var _url = null; | |
| 6391 var _queryParams = new core.Map(); | |
| 6392 var _uploadMedia = null; | |
| 6393 var _uploadOptions = null; | |
| 6394 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 6395 var _body = null; | |
| 6396 | |
| 6397 if (profileId == null) { | |
| 6398 throw new core.ArgumentError("Parameter profileId is required."); | |
| 6399 } | |
| 6400 if (projectId == null) { | |
| 6401 throw new core.ArgumentError("Parameter projectId is required."); | |
| 6402 } | |
| 6403 if (id == null) { | |
| 6404 throw new core.ArgumentError("Parameter id is required."); | |
| 6405 } | |
| 6406 | |
| 6407 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pro
jects/' + commons.Escaper.ecapeVariable('$projectId') + '/inventoryItems/' + com
mons.Escaper.ecapeVariable('$id'); | |
| 6408 | |
| 6409 var _response = _requester.request(_url, | |
| 6410 "GET", | |
| 6411 body: _body, | |
| 6412 queryParams: _queryParams, | |
| 6413 uploadOptions: _uploadOptions, | |
| 6414 uploadMedia: _uploadMedia, | |
| 6415 downloadOptions: _downloadOptions); | |
| 6416 return _response.then((data) => new InventoryItem.fromJson(data)); | |
| 6417 } | |
| 6418 | |
| 6419 /** | |
| 6420 * Retrieves a list of inventory items, possibly filtered. | |
| 6421 * | |
| 6422 * Request parameters: | |
| 6423 * | |
| 6424 * [profileId] - User profile ID associated with this request. | |
| 6425 * | |
| 6426 * [projectId] - Project ID for order documents. | |
| 6427 * | |
| 6428 * [ids] - Select only inventory items with these IDs. | |
| 6429 * | |
| 6430 * [inPlan] - Select only inventory items that are in plan. | |
| 6431 * | |
| 6432 * [maxResults] - Maximum number of results to return. | |
| 6433 * | |
| 6434 * [orderId] - Select only inventory items that belong to specified orders. | |
| 6435 * | |
| 6436 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 6437 * | |
| 6438 * [siteId] - Select only inventory items that are associated with these | |
| 6439 * sites. | |
| 6440 * | |
| 6441 * [sortField] - Field by which to sort the list. | |
| 6442 * Possible string values are: | |
| 6443 * - "ID" | |
| 6444 * - "NAME" | |
| 6445 * | |
| 6446 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 6447 * Possible string values are: | |
| 6448 * - "ASCENDING" | |
| 6449 * - "DESCENDING" | |
| 6450 * | |
| 6451 * Completes with a [InventoryItemsListResponse]. | |
| 6452 * | |
| 6453 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 6454 * error. | |
| 6455 * | |
| 6456 * If the used [http.Client] completes with an error when making a REST call, | |
| 6457 * this method will complete with the same error. | |
| 6458 */ | |
| 6459 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}) { | |
| 6460 var _url = null; | |
| 6461 var _queryParams = new core.Map(); | |
| 6462 var _uploadMedia = null; | |
| 6463 var _uploadOptions = null; | |
| 6464 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 6465 var _body = null; | |
| 6466 | |
| 6467 if (profileId == null) { | |
| 6468 throw new core.ArgumentError("Parameter profileId is required."); | |
| 6469 } | |
| 6470 if (projectId == null) { | |
| 6471 throw new core.ArgumentError("Parameter projectId is required."); | |
| 6472 } | |
| 6473 if (ids != null) { | |
| 6474 _queryParams["ids"] = ids; | |
| 6475 } | |
| 6476 if (inPlan != null) { | |
| 6477 _queryParams["inPlan"] = ["${inPlan}"]; | |
| 6478 } | |
| 6479 if (maxResults != null) { | |
| 6480 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 6481 } | |
| 6482 if (orderId != null) { | |
| 6483 _queryParams["orderId"] = orderId; | |
| 6484 } | |
| 6485 if (pageToken != null) { | |
| 6486 _queryParams["pageToken"] = [pageToken]; | |
| 6487 } | |
| 6488 if (siteId != null) { | |
| 6489 _queryParams["siteId"] = siteId; | |
| 6490 } | |
| 6491 if (sortField != null) { | |
| 6492 _queryParams["sortField"] = [sortField]; | |
| 6493 } | |
| 6494 if (sortOrder != null) { | |
| 6495 _queryParams["sortOrder"] = [sortOrder]; | |
| 6496 } | |
| 6497 | |
| 6498 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pro
jects/' + commons.Escaper.ecapeVariable('$projectId') + '/inventoryItems'; | |
| 6499 | |
| 6500 var _response = _requester.request(_url, | |
| 6501 "GET", | |
| 6502 body: _body, | |
| 6503 queryParams: _queryParams, | |
| 6504 uploadOptions: _uploadOptions, | |
| 6505 uploadMedia: _uploadMedia, | |
| 6506 downloadOptions: _downloadOptions); | |
| 6507 return _response.then((data) => new InventoryItemsListResponse.fromJson(data
)); | |
| 6508 } | |
| 6509 | |
| 6510 } | |
| 6511 | |
| 6512 | |
| 6513 class LandingPagesResourceApi { | |
| 6514 final commons.ApiRequester _requester; | |
| 6515 | |
| 6516 LandingPagesResourceApi(commons.ApiRequester client) : | |
| 6517 _requester = client; | |
| 6518 | |
| 6519 /** | |
| 6520 * Deletes an existing campaign landing page. | |
| 6521 * | |
| 6522 * Request parameters: | |
| 6523 * | |
| 6524 * [profileId] - User profile ID associated with this request. | |
| 6525 * | |
| 6526 * [campaignId] - Landing page campaign ID. | |
| 6527 * | |
| 6528 * [id] - Landing page ID. | |
| 6529 * | |
| 6530 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 6531 * error. | |
| 6532 * | |
| 6533 * If the used [http.Client] completes with an error when making a REST call, | |
| 6534 * this method will complete with the same error. | |
| 6535 */ | |
| 6536 async.Future delete(core.String profileId, core.String campaignId, core.String
id) { | |
| 6537 var _url = null; | |
| 6538 var _queryParams = new core.Map(); | |
| 6539 var _uploadMedia = null; | |
| 6540 var _uploadOptions = null; | |
| 6541 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 6542 var _body = null; | |
| 6543 | |
| 6544 if (profileId == null) { | |
| 6545 throw new core.ArgumentError("Parameter profileId is required."); | |
| 6546 } | |
| 6547 if (campaignId == null) { | |
| 6548 throw new core.ArgumentError("Parameter campaignId is required."); | |
| 6549 } | |
| 6550 if (id == null) { | |
| 6551 throw new core.ArgumentError("Parameter id is required."); | |
| 6552 } | |
| 6553 | |
| 6554 _downloadOptions = null; | |
| 6555 | |
| 6556 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam
paigns/' + commons.Escaper.ecapeVariable('$campaignId') + '/landingPages/' + com
mons.Escaper.ecapeVariable('$id'); | |
| 6557 | |
| 6558 var _response = _requester.request(_url, | |
| 6559 "DELETE", | |
| 6560 body: _body, | |
| 6561 queryParams: _queryParams, | |
| 6562 uploadOptions: _uploadOptions, | |
| 6563 uploadMedia: _uploadMedia, | |
| 6564 downloadOptions: _downloadOptions); | |
| 6565 return _response.then((data) => null); | |
| 6566 } | |
| 6567 | |
| 6568 /** | |
| 6569 * Gets one campaign landing page by ID. | |
| 6570 * | |
| 6571 * Request parameters: | |
| 6572 * | |
| 6573 * [profileId] - User profile ID associated with this request. | |
| 6574 * | |
| 6575 * [campaignId] - Landing page campaign ID. | |
| 6576 * | |
| 6577 * [id] - Landing page ID. | |
| 6578 * | |
| 6579 * Completes with a [LandingPage]. | |
| 6580 * | |
| 6581 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 6582 * error. | |
| 6583 * | |
| 6584 * If the used [http.Client] completes with an error when making a REST call, | |
| 6585 * this method will complete with the same error. | |
| 6586 */ | |
| 6587 async.Future<LandingPage> get(core.String profileId, core.String campaignId, c
ore.String id) { | |
| 6588 var _url = null; | |
| 6589 var _queryParams = new core.Map(); | |
| 6590 var _uploadMedia = null; | |
| 6591 var _uploadOptions = null; | |
| 6592 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 6593 var _body = null; | |
| 6594 | |
| 6595 if (profileId == null) { | |
| 6596 throw new core.ArgumentError("Parameter profileId is required."); | |
| 6597 } | |
| 6598 if (campaignId == null) { | |
| 6599 throw new core.ArgumentError("Parameter campaignId is required."); | |
| 6600 } | |
| 6601 if (id == null) { | |
| 6602 throw new core.ArgumentError("Parameter id is required."); | |
| 6603 } | |
| 6604 | |
| 6605 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam
paigns/' + commons.Escaper.ecapeVariable('$campaignId') + '/landingPages/' + com
mons.Escaper.ecapeVariable('$id'); | |
| 6606 | |
| 6607 var _response = _requester.request(_url, | |
| 6608 "GET", | |
| 6609 body: _body, | |
| 6610 queryParams: _queryParams, | |
| 6611 uploadOptions: _uploadOptions, | |
| 6612 uploadMedia: _uploadMedia, | |
| 6613 downloadOptions: _downloadOptions); | |
| 6614 return _response.then((data) => new LandingPage.fromJson(data)); | |
| 6615 } | |
| 6616 | |
| 6617 /** | |
| 6618 * Inserts a new landing page for the specified campaign. | |
| 6619 * | |
| 6620 * [request] - The metadata request object. | |
| 6621 * | |
| 6622 * Request parameters: | |
| 6623 * | |
| 6624 * [profileId] - User profile ID associated with this request. | |
| 6625 * | |
| 6626 * [campaignId] - Landing page campaign ID. | |
| 6627 * | |
| 6628 * Completes with a [LandingPage]. | |
| 6629 * | |
| 6630 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 6631 * error. | |
| 6632 * | |
| 6633 * If the used [http.Client] completes with an error when making a REST call, | |
| 6634 * this method will complete with the same error. | |
| 6635 */ | |
| 6636 async.Future<LandingPage> insert(LandingPage request, core.String profileId, c
ore.String campaignId) { | |
| 6637 var _url = null; | |
| 6638 var _queryParams = new core.Map(); | |
| 6639 var _uploadMedia = null; | |
| 6640 var _uploadOptions = null; | |
| 6641 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 6642 var _body = null; | |
| 6643 | |
| 6644 if (request != null) { | |
| 6645 _body = convert.JSON.encode((request).toJson()); | |
| 6646 } | |
| 6647 if (profileId == null) { | |
| 6648 throw new core.ArgumentError("Parameter profileId is required."); | |
| 6649 } | |
| 6650 if (campaignId == null) { | |
| 6651 throw new core.ArgumentError("Parameter campaignId is required."); | |
| 6652 } | |
| 6653 | |
| 6654 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam
paigns/' + commons.Escaper.ecapeVariable('$campaignId') + '/landingPages'; | |
| 6655 | |
| 6656 var _response = _requester.request(_url, | |
| 6657 "POST", | |
| 6658 body: _body, | |
| 6659 queryParams: _queryParams, | |
| 6660 uploadOptions: _uploadOptions, | |
| 6661 uploadMedia: _uploadMedia, | |
| 6662 downloadOptions: _downloadOptions); | |
| 6663 return _response.then((data) => new LandingPage.fromJson(data)); | |
| 6664 } | |
| 6665 | |
| 6666 /** | |
| 6667 * Retrieves the list of landing pages for the specified campaign. | |
| 6668 * | |
| 6669 * Request parameters: | |
| 6670 * | |
| 6671 * [profileId] - User profile ID associated with this request. | |
| 6672 * | |
| 6673 * [campaignId] - Landing page campaign ID. | |
| 6674 * | |
| 6675 * Completes with a [LandingPagesListResponse]. | |
| 6676 * | |
| 6677 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 6678 * error. | |
| 6679 * | |
| 6680 * If the used [http.Client] completes with an error when making a REST call, | |
| 6681 * this method will complete with the same error. | |
| 6682 */ | |
| 6683 async.Future<LandingPagesListResponse> list(core.String profileId, core.String
campaignId) { | |
| 6684 var _url = null; | |
| 6685 var _queryParams = new core.Map(); | |
| 6686 var _uploadMedia = null; | |
| 6687 var _uploadOptions = null; | |
| 6688 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 6689 var _body = null; | |
| 6690 | |
| 6691 if (profileId == null) { | |
| 6692 throw new core.ArgumentError("Parameter profileId is required."); | |
| 6693 } | |
| 6694 if (campaignId == null) { | |
| 6695 throw new core.ArgumentError("Parameter campaignId is required."); | |
| 6696 } | |
| 6697 | |
| 6698 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam
paigns/' + commons.Escaper.ecapeVariable('$campaignId') + '/landingPages'; | |
| 6699 | |
| 6700 var _response = _requester.request(_url, | |
| 6701 "GET", | |
| 6702 body: _body, | |
| 6703 queryParams: _queryParams, | |
| 6704 uploadOptions: _uploadOptions, | |
| 6705 uploadMedia: _uploadMedia, | |
| 6706 downloadOptions: _downloadOptions); | |
| 6707 return _response.then((data) => new LandingPagesListResponse.fromJson(data))
; | |
| 6708 } | |
| 6709 | |
| 6710 /** | |
| 6711 * Updates an existing campaign landing page. This method supports patch | |
| 6712 * semantics. | |
| 6713 * | |
| 6714 * [request] - The metadata request object. | |
| 6715 * | |
| 6716 * Request parameters: | |
| 6717 * | |
| 6718 * [profileId] - User profile ID associated with this request. | |
| 6719 * | |
| 6720 * [campaignId] - Landing page campaign ID. | |
| 6721 * | |
| 6722 * [id] - Landing page ID. | |
| 6723 * | |
| 6724 * Completes with a [LandingPage]. | |
| 6725 * | |
| 6726 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 6727 * error. | |
| 6728 * | |
| 6729 * If the used [http.Client] completes with an error when making a REST call, | |
| 6730 * this method will complete with the same error. | |
| 6731 */ | |
| 6732 async.Future<LandingPage> patch(LandingPage request, core.String profileId, co
re.String campaignId, core.String id) { | |
| 6733 var _url = null; | |
| 6734 var _queryParams = new core.Map(); | |
| 6735 var _uploadMedia = null; | |
| 6736 var _uploadOptions = null; | |
| 6737 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 6738 var _body = null; | |
| 6739 | |
| 6740 if (request != null) { | |
| 6741 _body = convert.JSON.encode((request).toJson()); | |
| 6742 } | |
| 6743 if (profileId == null) { | |
| 6744 throw new core.ArgumentError("Parameter profileId is required."); | |
| 6745 } | |
| 6746 if (campaignId == null) { | |
| 6747 throw new core.ArgumentError("Parameter campaignId is required."); | |
| 6748 } | |
| 6749 if (id == null) { | |
| 6750 throw new core.ArgumentError("Parameter id is required."); | |
| 6751 } | |
| 6752 _queryParams["id"] = [id]; | |
| 6753 | |
| 6754 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam
paigns/' + commons.Escaper.ecapeVariable('$campaignId') + '/landingPages'; | |
| 6755 | |
| 6756 var _response = _requester.request(_url, | |
| 6757 "PATCH", | |
| 6758 body: _body, | |
| 6759 queryParams: _queryParams, | |
| 6760 uploadOptions: _uploadOptions, | |
| 6761 uploadMedia: _uploadMedia, | |
| 6762 downloadOptions: _downloadOptions); | |
| 6763 return _response.then((data) => new LandingPage.fromJson(data)); | |
| 6764 } | |
| 6765 | |
| 6766 /** | |
| 6767 * Updates an existing campaign landing page. | |
| 6768 * | |
| 6769 * [request] - The metadata request object. | |
| 6770 * | |
| 6771 * Request parameters: | |
| 6772 * | |
| 6773 * [profileId] - User profile ID associated with this request. | |
| 6774 * | |
| 6775 * [campaignId] - Landing page campaign ID. | |
| 6776 * | |
| 6777 * Completes with a [LandingPage]. | |
| 6778 * | |
| 6779 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 6780 * error. | |
| 6781 * | |
| 6782 * If the used [http.Client] completes with an error when making a REST call, | |
| 6783 * this method will complete with the same error. | |
| 6784 */ | |
| 6785 async.Future<LandingPage> update(LandingPage request, core.String profileId, c
ore.String campaignId) { | |
| 6786 var _url = null; | |
| 6787 var _queryParams = new core.Map(); | |
| 6788 var _uploadMedia = null; | |
| 6789 var _uploadOptions = null; | |
| 6790 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 6791 var _body = null; | |
| 6792 | |
| 6793 if (request != null) { | |
| 6794 _body = convert.JSON.encode((request).toJson()); | |
| 6795 } | |
| 6796 if (profileId == null) { | |
| 6797 throw new core.ArgumentError("Parameter profileId is required."); | |
| 6798 } | |
| 6799 if (campaignId == null) { | |
| 6800 throw new core.ArgumentError("Parameter campaignId is required."); | |
| 6801 } | |
| 6802 | |
| 6803 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam
paigns/' + commons.Escaper.ecapeVariable('$campaignId') + '/landingPages'; | |
| 6804 | |
| 6805 var _response = _requester.request(_url, | |
| 6806 "PUT", | |
| 6807 body: _body, | |
| 6808 queryParams: _queryParams, | |
| 6809 uploadOptions: _uploadOptions, | |
| 6810 uploadMedia: _uploadMedia, | |
| 6811 downloadOptions: _downloadOptions); | |
| 6812 return _response.then((data) => new LandingPage.fromJson(data)); | |
| 6813 } | |
| 6814 | |
| 6815 } | |
| 6816 | |
| 6817 | |
| 6818 class MetrosResourceApi { | |
| 6819 final commons.ApiRequester _requester; | |
| 6820 | |
| 6821 MetrosResourceApi(commons.ApiRequester client) : | |
| 6822 _requester = client; | |
| 6823 | |
| 6824 /** | |
| 6825 * Retrieves a list of metros. | |
| 6826 * | |
| 6827 * Request parameters: | |
| 6828 * | |
| 6829 * [profileId] - User profile ID associated with this request. | |
| 6830 * | |
| 6831 * Completes with a [MetrosListResponse]. | |
| 6832 * | |
| 6833 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 6834 * error. | |
| 6835 * | |
| 6836 * If the used [http.Client] completes with an error when making a REST call, | |
| 6837 * this method will complete with the same error. | |
| 6838 */ | |
| 6839 async.Future<MetrosListResponse> list(core.String profileId) { | |
| 6840 var _url = null; | |
| 6841 var _queryParams = new core.Map(); | |
| 6842 var _uploadMedia = null; | |
| 6843 var _uploadOptions = null; | |
| 6844 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 6845 var _body = null; | |
| 6846 | |
| 6847 if (profileId == null) { | |
| 6848 throw new core.ArgumentError("Parameter profileId is required."); | |
| 6849 } | |
| 6850 | |
| 6851 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/met
ros'; | |
| 6852 | |
| 6853 var _response = _requester.request(_url, | |
| 6854 "GET", | |
| 6855 body: _body, | |
| 6856 queryParams: _queryParams, | |
| 6857 uploadOptions: _uploadOptions, | |
| 6858 uploadMedia: _uploadMedia, | |
| 6859 downloadOptions: _downloadOptions); | |
| 6860 return _response.then((data) => new MetrosListResponse.fromJson(data)); | |
| 6861 } | |
| 6862 | |
| 6863 } | |
| 6864 | |
| 6865 | |
| 6866 class MobileCarriersResourceApi { | |
| 6867 final commons.ApiRequester _requester; | |
| 6868 | |
| 6869 MobileCarriersResourceApi(commons.ApiRequester client) : | |
| 6870 _requester = client; | |
| 6871 | |
| 6872 /** | |
| 6873 * Gets one mobile carrier by ID. | |
| 6874 * | |
| 6875 * Request parameters: | |
| 6876 * | |
| 6877 * [profileId] - User profile ID associated with this request. | |
| 6878 * | |
| 6879 * [id] - Mobile carrier ID. | |
| 6880 * | |
| 6881 * Completes with a [MobileCarrier]. | |
| 6882 * | |
| 6883 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 6884 * error. | |
| 6885 * | |
| 6886 * If the used [http.Client] completes with an error when making a REST call, | |
| 6887 * this method will complete with the same error. | |
| 6888 */ | |
| 6889 async.Future<MobileCarrier> get(core.String profileId, core.String id) { | |
| 6890 var _url = null; | |
| 6891 var _queryParams = new core.Map(); | |
| 6892 var _uploadMedia = null; | |
| 6893 var _uploadOptions = null; | |
| 6894 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 6895 var _body = null; | |
| 6896 | |
| 6897 if (profileId == null) { | |
| 6898 throw new core.ArgumentError("Parameter profileId is required."); | |
| 6899 } | |
| 6900 if (id == null) { | |
| 6901 throw new core.ArgumentError("Parameter id is required."); | |
| 6902 } | |
| 6903 | |
| 6904 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/mob
ileCarriers/' + commons.Escaper.ecapeVariable('$id'); | |
| 6905 | |
| 6906 var _response = _requester.request(_url, | |
| 6907 "GET", | |
| 6908 body: _body, | |
| 6909 queryParams: _queryParams, | |
| 6910 uploadOptions: _uploadOptions, | |
| 6911 uploadMedia: _uploadMedia, | |
| 6912 downloadOptions: _downloadOptions); | |
| 6913 return _response.then((data) => new MobileCarrier.fromJson(data)); | |
| 6914 } | |
| 6915 | |
| 6916 /** | |
| 6917 * Retrieves a list of mobile carriers. | |
| 6918 * | |
| 6919 * Request parameters: | |
| 6920 * | |
| 6921 * [profileId] - User profile ID associated with this request. | |
| 6922 * | |
| 6923 * Completes with a [MobileCarriersListResponse]. | |
| 6924 * | |
| 6925 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 6926 * error. | |
| 6927 * | |
| 6928 * If the used [http.Client] completes with an error when making a REST call, | |
| 6929 * this method will complete with the same error. | |
| 6930 */ | |
| 6931 async.Future<MobileCarriersListResponse> list(core.String profileId) { | |
| 6932 var _url = null; | |
| 6933 var _queryParams = new core.Map(); | |
| 6934 var _uploadMedia = null; | |
| 6935 var _uploadOptions = null; | |
| 6936 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 6937 var _body = null; | |
| 6938 | |
| 6939 if (profileId == null) { | |
| 6940 throw new core.ArgumentError("Parameter profileId is required."); | |
| 6941 } | |
| 6942 | |
| 6943 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/mob
ileCarriers'; | |
| 6944 | |
| 6945 var _response = _requester.request(_url, | |
| 6946 "GET", | |
| 6947 body: _body, | |
| 6948 queryParams: _queryParams, | |
| 6949 uploadOptions: _uploadOptions, | |
| 6950 uploadMedia: _uploadMedia, | |
| 6951 downloadOptions: _downloadOptions); | |
| 6952 return _response.then((data) => new MobileCarriersListResponse.fromJson(data
)); | |
| 6953 } | |
| 6954 | |
| 6955 } | |
| 6956 | |
| 6957 | |
| 6958 class OperatingSystemVersionsResourceApi { | |
| 6959 final commons.ApiRequester _requester; | |
| 6960 | |
| 6961 OperatingSystemVersionsResourceApi(commons.ApiRequester client) : | |
| 6962 _requester = client; | |
| 6963 | |
| 6964 /** | |
| 6965 * Gets one operating system version by ID. | |
| 6966 * | |
| 6967 * Request parameters: | |
| 6968 * | |
| 6969 * [profileId] - User profile ID associated with this request. | |
| 6970 * | |
| 6971 * [id] - Operating system version ID. | |
| 6972 * | |
| 6973 * Completes with a [OperatingSystemVersion]. | |
| 6974 * | |
| 6975 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 6976 * error. | |
| 6977 * | |
| 6978 * If the used [http.Client] completes with an error when making a REST call, | |
| 6979 * this method will complete with the same error. | |
| 6980 */ | |
| 6981 async.Future<OperatingSystemVersion> get(core.String profileId, core.String id
) { | |
| 6982 var _url = null; | |
| 6983 var _queryParams = new core.Map(); | |
| 6984 var _uploadMedia = null; | |
| 6985 var _uploadOptions = null; | |
| 6986 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 6987 var _body = null; | |
| 6988 | |
| 6989 if (profileId == null) { | |
| 6990 throw new core.ArgumentError("Parameter profileId is required."); | |
| 6991 } | |
| 6992 if (id == null) { | |
| 6993 throw new core.ArgumentError("Parameter id is required."); | |
| 6994 } | |
| 6995 | |
| 6996 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/ope
ratingSystemVersions/' + commons.Escaper.ecapeVariable('$id'); | |
| 6997 | |
| 6998 var _response = _requester.request(_url, | |
| 6999 "GET", | |
| 7000 body: _body, | |
| 7001 queryParams: _queryParams, | |
| 7002 uploadOptions: _uploadOptions, | |
| 7003 uploadMedia: _uploadMedia, | |
| 7004 downloadOptions: _downloadOptions); | |
| 7005 return _response.then((data) => new OperatingSystemVersion.fromJson(data)); | |
| 7006 } | |
| 7007 | |
| 7008 /** | |
| 7009 * Retrieves a list of operating system versions. | |
| 7010 * | |
| 7011 * Request parameters: | |
| 7012 * | |
| 7013 * [profileId] - User profile ID associated with this request. | |
| 7014 * | |
| 7015 * Completes with a [OperatingSystemVersionsListResponse]. | |
| 7016 * | |
| 7017 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 7018 * error. | |
| 7019 * | |
| 7020 * If the used [http.Client] completes with an error when making a REST call, | |
| 7021 * this method will complete with the same error. | |
| 7022 */ | |
| 7023 async.Future<OperatingSystemVersionsListResponse> list(core.String profileId)
{ | |
| 7024 var _url = null; | |
| 7025 var _queryParams = new core.Map(); | |
| 7026 var _uploadMedia = null; | |
| 7027 var _uploadOptions = null; | |
| 7028 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 7029 var _body = null; | |
| 7030 | |
| 7031 if (profileId == null) { | |
| 7032 throw new core.ArgumentError("Parameter profileId is required."); | |
| 7033 } | |
| 7034 | |
| 7035 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/ope
ratingSystemVersions'; | |
| 7036 | |
| 7037 var _response = _requester.request(_url, | |
| 7038 "GET", | |
| 7039 body: _body, | |
| 7040 queryParams: _queryParams, | |
| 7041 uploadOptions: _uploadOptions, | |
| 7042 uploadMedia: _uploadMedia, | |
| 7043 downloadOptions: _downloadOptions); | |
| 7044 return _response.then((data) => new OperatingSystemVersionsListResponse.from
Json(data)); | |
| 7045 } | |
| 7046 | |
| 7047 } | |
| 7048 | |
| 7049 | |
| 7050 class OperatingSystemsResourceApi { | |
| 7051 final commons.ApiRequester _requester; | |
| 7052 | |
| 7053 OperatingSystemsResourceApi(commons.ApiRequester client) : | |
| 7054 _requester = client; | |
| 7055 | |
| 7056 /** | |
| 7057 * Gets one operating system by DART ID. | |
| 7058 * | |
| 7059 * Request parameters: | |
| 7060 * | |
| 7061 * [profileId] - User profile ID associated with this request. | |
| 7062 * | |
| 7063 * [dartId] - Operating system DART ID. | |
| 7064 * | |
| 7065 * Completes with a [OperatingSystem]. | |
| 7066 * | |
| 7067 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 7068 * error. | |
| 7069 * | |
| 7070 * If the used [http.Client] completes with an error when making a REST call, | |
| 7071 * this method will complete with the same error. | |
| 7072 */ | |
| 7073 async.Future<OperatingSystem> get(core.String profileId, core.String dartId) { | |
| 7074 var _url = null; | |
| 7075 var _queryParams = new core.Map(); | |
| 7076 var _uploadMedia = null; | |
| 7077 var _uploadOptions = null; | |
| 7078 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 7079 var _body = null; | |
| 7080 | |
| 7081 if (profileId == null) { | |
| 7082 throw new core.ArgumentError("Parameter profileId is required."); | |
| 7083 } | |
| 7084 if (dartId == null) { | |
| 7085 throw new core.ArgumentError("Parameter dartId is required."); | |
| 7086 } | |
| 7087 | |
| 7088 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/ope
ratingSystems/' + commons.Escaper.ecapeVariable('$dartId'); | |
| 7089 | |
| 7090 var _response = _requester.request(_url, | |
| 7091 "GET", | |
| 7092 body: _body, | |
| 7093 queryParams: _queryParams, | |
| 7094 uploadOptions: _uploadOptions, | |
| 7095 uploadMedia: _uploadMedia, | |
| 7096 downloadOptions: _downloadOptions); | |
| 7097 return _response.then((data) => new OperatingSystem.fromJson(data)); | |
| 7098 } | |
| 7099 | |
| 7100 /** | |
| 7101 * Retrieves a list of operating systems. | |
| 7102 * | |
| 7103 * Request parameters: | |
| 7104 * | |
| 7105 * [profileId] - User profile ID associated with this request. | |
| 7106 * | |
| 7107 * Completes with a [OperatingSystemsListResponse]. | |
| 7108 * | |
| 7109 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 7110 * error. | |
| 7111 * | |
| 7112 * If the used [http.Client] completes with an error when making a REST call, | |
| 7113 * this method will complete with the same error. | |
| 7114 */ | |
| 7115 async.Future<OperatingSystemsListResponse> list(core.String profileId) { | |
| 7116 var _url = null; | |
| 7117 var _queryParams = new core.Map(); | |
| 7118 var _uploadMedia = null; | |
| 7119 var _uploadOptions = null; | |
| 7120 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 7121 var _body = null; | |
| 7122 | |
| 7123 if (profileId == null) { | |
| 7124 throw new core.ArgumentError("Parameter profileId is required."); | |
| 7125 } | |
| 7126 | |
| 7127 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/ope
ratingSystems'; | |
| 7128 | |
| 7129 var _response = _requester.request(_url, | |
| 7130 "GET", | |
| 7131 body: _body, | |
| 7132 queryParams: _queryParams, | |
| 7133 uploadOptions: _uploadOptions, | |
| 7134 uploadMedia: _uploadMedia, | |
| 7135 downloadOptions: _downloadOptions); | |
| 7136 return _response.then((data) => new OperatingSystemsListResponse.fromJson(da
ta)); | |
| 7137 } | |
| 7138 | |
| 7139 } | |
| 7140 | |
| 7141 | |
| 7142 class OrderDocumentsResourceApi { | |
| 7143 final commons.ApiRequester _requester; | |
| 7144 | |
| 7145 OrderDocumentsResourceApi(commons.ApiRequester client) : | |
| 7146 _requester = client; | |
| 7147 | |
| 7148 /** | |
| 7149 * Gets one order document by ID. | |
| 7150 * | |
| 7151 * Request parameters: | |
| 7152 * | |
| 7153 * [profileId] - User profile ID associated with this request. | |
| 7154 * | |
| 7155 * [projectId] - Project ID for order documents. | |
| 7156 * | |
| 7157 * [id] - Order document ID. | |
| 7158 * | |
| 7159 * Completes with a [OrderDocument]. | |
| 7160 * | |
| 7161 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 7162 * error. | |
| 7163 * | |
| 7164 * If the used [http.Client] completes with an error when making a REST call, | |
| 7165 * this method will complete with the same error. | |
| 7166 */ | |
| 7167 async.Future<OrderDocument> get(core.String profileId, core.String projectId,
core.String id) { | |
| 7168 var _url = null; | |
| 7169 var _queryParams = new core.Map(); | |
| 7170 var _uploadMedia = null; | |
| 7171 var _uploadOptions = null; | |
| 7172 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 7173 var _body = null; | |
| 7174 | |
| 7175 if (profileId == null) { | |
| 7176 throw new core.ArgumentError("Parameter profileId is required."); | |
| 7177 } | |
| 7178 if (projectId == null) { | |
| 7179 throw new core.ArgumentError("Parameter projectId is required."); | |
| 7180 } | |
| 7181 if (id == null) { | |
| 7182 throw new core.ArgumentError("Parameter id is required."); | |
| 7183 } | |
| 7184 | |
| 7185 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pro
jects/' + commons.Escaper.ecapeVariable('$projectId') + '/orderDocuments/' + com
mons.Escaper.ecapeVariable('$id'); | |
| 7186 | |
| 7187 var _response = _requester.request(_url, | |
| 7188 "GET", | |
| 7189 body: _body, | |
| 7190 queryParams: _queryParams, | |
| 7191 uploadOptions: _uploadOptions, | |
| 7192 uploadMedia: _uploadMedia, | |
| 7193 downloadOptions: _downloadOptions); | |
| 7194 return _response.then((data) => new OrderDocument.fromJson(data)); | |
| 7195 } | |
| 7196 | |
| 7197 /** | |
| 7198 * Retrieves a list of order documents, possibly filtered. | |
| 7199 * | |
| 7200 * Request parameters: | |
| 7201 * | |
| 7202 * [profileId] - User profile ID associated with this request. | |
| 7203 * | |
| 7204 * [projectId] - Project ID for order documents. | |
| 7205 * | |
| 7206 * [approved] - Select only order documents that have been approved by at | |
| 7207 * least one user. | |
| 7208 * | |
| 7209 * [ids] - Select only order documents with these IDs. | |
| 7210 * | |
| 7211 * [maxResults] - Maximum number of results to return. | |
| 7212 * | |
| 7213 * [orderId] - Select only order documents for specified orders. | |
| 7214 * | |
| 7215 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 7216 * | |
| 7217 * [searchString] - Allows searching for order documents by name or ID. | |
| 7218 * Wildcards (*) are allowed. For example, "orderdocument*2015" will return | |
| 7219 * order documents with names like "orderdocument June 2015", "orderdocument | |
| 7220 * April 2015", or simply "orderdocument 2015". Most of the searches also add | |
| 7221 * wildcards implicitly at the start and the end of the search string. For | |
| 7222 * example, a search string of "orderdocument" will match order documents with | |
| 7223 * name "my orderdocument", "orderdocument 2015", or simply "orderdocument". | |
| 7224 * | |
| 7225 * [siteId] - Select only order documents that are associated with these | |
| 7226 * sites. | |
| 7227 * | |
| 7228 * [sortField] - Field by which to sort the list. | |
| 7229 * Possible string values are: | |
| 7230 * - "ID" | |
| 7231 * - "NAME" | |
| 7232 * | |
| 7233 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 7234 * Possible string values are: | |
| 7235 * - "ASCENDING" | |
| 7236 * - "DESCENDING" | |
| 7237 * | |
| 7238 * Completes with a [OrderDocumentsListResponse]. | |
| 7239 * | |
| 7240 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 7241 * error. | |
| 7242 * | |
| 7243 * If the used [http.Client] completes with an error when making a REST call, | |
| 7244 * this method will complete with the same error. | |
| 7245 */ | |
| 7246 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
}) { | |
| 7247 var _url = null; | |
| 7248 var _queryParams = new core.Map(); | |
| 7249 var _uploadMedia = null; | |
| 7250 var _uploadOptions = null; | |
| 7251 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 7252 var _body = null; | |
| 7253 | |
| 7254 if (profileId == null) { | |
| 7255 throw new core.ArgumentError("Parameter profileId is required."); | |
| 7256 } | |
| 7257 if (projectId == null) { | |
| 7258 throw new core.ArgumentError("Parameter projectId is required."); | |
| 7259 } | |
| 7260 if (approved != null) { | |
| 7261 _queryParams["approved"] = ["${approved}"]; | |
| 7262 } | |
| 7263 if (ids != null) { | |
| 7264 _queryParams["ids"] = ids; | |
| 7265 } | |
| 7266 if (maxResults != null) { | |
| 7267 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 7268 } | |
| 7269 if (orderId != null) { | |
| 7270 _queryParams["orderId"] = orderId; | |
| 7271 } | |
| 7272 if (pageToken != null) { | |
| 7273 _queryParams["pageToken"] = [pageToken]; | |
| 7274 } | |
| 7275 if (searchString != null) { | |
| 7276 _queryParams["searchString"] = [searchString]; | |
| 7277 } | |
| 7278 if (siteId != null) { | |
| 7279 _queryParams["siteId"] = siteId; | |
| 7280 } | |
| 7281 if (sortField != null) { | |
| 7282 _queryParams["sortField"] = [sortField]; | |
| 7283 } | |
| 7284 if (sortOrder != null) { | |
| 7285 _queryParams["sortOrder"] = [sortOrder]; | |
| 7286 } | |
| 7287 | |
| 7288 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pro
jects/' + commons.Escaper.ecapeVariable('$projectId') + '/orderDocuments'; | |
| 7289 | |
| 7290 var _response = _requester.request(_url, | |
| 7291 "GET", | |
| 7292 body: _body, | |
| 7293 queryParams: _queryParams, | |
| 7294 uploadOptions: _uploadOptions, | |
| 7295 uploadMedia: _uploadMedia, | |
| 7296 downloadOptions: _downloadOptions); | |
| 7297 return _response.then((data) => new OrderDocumentsListResponse.fromJson(data
)); | |
| 7298 } | |
| 7299 | |
| 7300 } | |
| 7301 | |
| 7302 | |
| 7303 class OrdersResourceApi { | |
| 7304 final commons.ApiRequester _requester; | |
| 7305 | |
| 7306 OrdersResourceApi(commons.ApiRequester client) : | |
| 7307 _requester = client; | |
| 7308 | |
| 7309 /** | |
| 7310 * Gets one order by ID. | |
| 7311 * | |
| 7312 * Request parameters: | |
| 7313 * | |
| 7314 * [profileId] - User profile ID associated with this request. | |
| 7315 * | |
| 7316 * [projectId] - Project ID for orders. | |
| 7317 * | |
| 7318 * [id] - Order ID. | |
| 7319 * | |
| 7320 * Completes with a [Order]. | |
| 7321 * | |
| 7322 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 7323 * error. | |
| 7324 * | |
| 7325 * If the used [http.Client] completes with an error when making a REST call, | |
| 7326 * this method will complete with the same error. | |
| 7327 */ | |
| 7328 async.Future<Order> get(core.String profileId, core.String projectId, core.Str
ing id) { | |
| 7329 var _url = null; | |
| 7330 var _queryParams = new core.Map(); | |
| 7331 var _uploadMedia = null; | |
| 7332 var _uploadOptions = null; | |
| 7333 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 7334 var _body = null; | |
| 7335 | |
| 7336 if (profileId == null) { | |
| 7337 throw new core.ArgumentError("Parameter profileId is required."); | |
| 7338 } | |
| 7339 if (projectId == null) { | |
| 7340 throw new core.ArgumentError("Parameter projectId is required."); | |
| 7341 } | |
| 7342 if (id == null) { | |
| 7343 throw new core.ArgumentError("Parameter id is required."); | |
| 7344 } | |
| 7345 | |
| 7346 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pro
jects/' + commons.Escaper.ecapeVariable('$projectId') + '/orders/' + commons.Esc
aper.ecapeVariable('$id'); | |
| 7347 | |
| 7348 var _response = _requester.request(_url, | |
| 7349 "GET", | |
| 7350 body: _body, | |
| 7351 queryParams: _queryParams, | |
| 7352 uploadOptions: _uploadOptions, | |
| 7353 uploadMedia: _uploadMedia, | |
| 7354 downloadOptions: _downloadOptions); | |
| 7355 return _response.then((data) => new Order.fromJson(data)); | |
| 7356 } | |
| 7357 | |
| 7358 /** | |
| 7359 * Retrieves a list of orders, possibly filtered. | |
| 7360 * | |
| 7361 * Request parameters: | |
| 7362 * | |
| 7363 * [profileId] - User profile ID associated with this request. | |
| 7364 * | |
| 7365 * [projectId] - Project ID for orders. | |
| 7366 * | |
| 7367 * [ids] - Select only orders with these IDs. | |
| 7368 * | |
| 7369 * [maxResults] - Maximum number of results to return. | |
| 7370 * | |
| 7371 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 7372 * | |
| 7373 * [searchString] - Allows searching for orders by name or ID. Wildcards (*) | |
| 7374 * are allowed. For example, "order*2015" will return orders with names like | |
| 7375 * "order June 2015", "order April 2015", or simply "order 2015". Most of the | |
| 7376 * searches also add wildcards implicitly at the start and the end of the | |
| 7377 * search string. For example, a search string of "order" will match orders | |
| 7378 * with name "my order", "order 2015", or simply "order". | |
| 7379 * | |
| 7380 * [siteId] - Select only orders that are associated with these site IDs. | |
| 7381 * | |
| 7382 * [sortField] - Field by which to sort the list. | |
| 7383 * Possible string values are: | |
| 7384 * - "ID" | |
| 7385 * - "NAME" | |
| 7386 * | |
| 7387 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 7388 * Possible string values are: | |
| 7389 * - "ASCENDING" | |
| 7390 * - "DESCENDING" | |
| 7391 * | |
| 7392 * Completes with a [OrdersListResponse]. | |
| 7393 * | |
| 7394 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 7395 * error. | |
| 7396 * | |
| 7397 * If the used [http.Client] completes with an error when making a REST call, | |
| 7398 * this method will complete with the same error. | |
| 7399 */ | |
| 7400 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}) { | |
| 7401 var _url = null; | |
| 7402 var _queryParams = new core.Map(); | |
| 7403 var _uploadMedia = null; | |
| 7404 var _uploadOptions = null; | |
| 7405 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 7406 var _body = null; | |
| 7407 | |
| 7408 if (profileId == null) { | |
| 7409 throw new core.ArgumentError("Parameter profileId is required."); | |
| 7410 } | |
| 7411 if (projectId == null) { | |
| 7412 throw new core.ArgumentError("Parameter projectId is required."); | |
| 7413 } | |
| 7414 if (ids != null) { | |
| 7415 _queryParams["ids"] = ids; | |
| 7416 } | |
| 7417 if (maxResults != null) { | |
| 7418 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 7419 } | |
| 7420 if (pageToken != null) { | |
| 7421 _queryParams["pageToken"] = [pageToken]; | |
| 7422 } | |
| 7423 if (searchString != null) { | |
| 7424 _queryParams["searchString"] = [searchString]; | |
| 7425 } | |
| 7426 if (siteId != null) { | |
| 7427 _queryParams["siteId"] = siteId; | |
| 7428 } | |
| 7429 if (sortField != null) { | |
| 7430 _queryParams["sortField"] = [sortField]; | |
| 7431 } | |
| 7432 if (sortOrder != null) { | |
| 7433 _queryParams["sortOrder"] = [sortOrder]; | |
| 7434 } | |
| 7435 | |
| 7436 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pro
jects/' + commons.Escaper.ecapeVariable('$projectId') + '/orders'; | |
| 7437 | |
| 7438 var _response = _requester.request(_url, | |
| 7439 "GET", | |
| 7440 body: _body, | |
| 7441 queryParams: _queryParams, | |
| 7442 uploadOptions: _uploadOptions, | |
| 7443 uploadMedia: _uploadMedia, | |
| 7444 downloadOptions: _downloadOptions); | |
| 7445 return _response.then((data) => new OrdersListResponse.fromJson(data)); | |
| 7446 } | |
| 7447 | |
| 7448 } | |
| 7449 | |
| 7450 | |
| 7451 class PlacementGroupsResourceApi { | |
| 7452 final commons.ApiRequester _requester; | |
| 7453 | |
| 7454 PlacementGroupsResourceApi(commons.ApiRequester client) : | |
| 7455 _requester = client; | |
| 7456 | |
| 7457 /** | |
| 7458 * Gets one placement group by ID. | |
| 7459 * | |
| 7460 * Request parameters: | |
| 7461 * | |
| 7462 * [profileId] - User profile ID associated with this request. | |
| 7463 * | |
| 7464 * [id] - Placement group ID. | |
| 7465 * | |
| 7466 * Completes with a [PlacementGroup]. | |
| 7467 * | |
| 7468 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 7469 * error. | |
| 7470 * | |
| 7471 * If the used [http.Client] completes with an error when making a REST call, | |
| 7472 * this method will complete with the same error. | |
| 7473 */ | |
| 7474 async.Future<PlacementGroup> get(core.String profileId, core.String id) { | |
| 7475 var _url = null; | |
| 7476 var _queryParams = new core.Map(); | |
| 7477 var _uploadMedia = null; | |
| 7478 var _uploadOptions = null; | |
| 7479 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 7480 var _body = null; | |
| 7481 | |
| 7482 if (profileId == null) { | |
| 7483 throw new core.ArgumentError("Parameter profileId is required."); | |
| 7484 } | |
| 7485 if (id == null) { | |
| 7486 throw new core.ArgumentError("Parameter id is required."); | |
| 7487 } | |
| 7488 | |
| 7489 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla
cementGroups/' + commons.Escaper.ecapeVariable('$id'); | |
| 7490 | |
| 7491 var _response = _requester.request(_url, | |
| 7492 "GET", | |
| 7493 body: _body, | |
| 7494 queryParams: _queryParams, | |
| 7495 uploadOptions: _uploadOptions, | |
| 7496 uploadMedia: _uploadMedia, | |
| 7497 downloadOptions: _downloadOptions); | |
| 7498 return _response.then((data) => new PlacementGroup.fromJson(data)); | |
| 7499 } | |
| 7500 | |
| 7501 /** | |
| 7502 * Inserts a new placement group. | |
| 7503 * | |
| 7504 * [request] - The metadata request object. | |
| 7505 * | |
| 7506 * Request parameters: | |
| 7507 * | |
| 7508 * [profileId] - User profile ID associated with this request. | |
| 7509 * | |
| 7510 * Completes with a [PlacementGroup]. | |
| 7511 * | |
| 7512 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 7513 * error. | |
| 7514 * | |
| 7515 * If the used [http.Client] completes with an error when making a REST call, | |
| 7516 * this method will complete with the same error. | |
| 7517 */ | |
| 7518 async.Future<PlacementGroup> insert(PlacementGroup request, core.String profil
eId) { | |
| 7519 var _url = null; | |
| 7520 var _queryParams = new core.Map(); | |
| 7521 var _uploadMedia = null; | |
| 7522 var _uploadOptions = null; | |
| 7523 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 7524 var _body = null; | |
| 7525 | |
| 7526 if (request != null) { | |
| 7527 _body = convert.JSON.encode((request).toJson()); | |
| 7528 } | |
| 7529 if (profileId == null) { | |
| 7530 throw new core.ArgumentError("Parameter profileId is required."); | |
| 7531 } | |
| 7532 | |
| 7533 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla
cementGroups'; | |
| 7534 | |
| 7535 var _response = _requester.request(_url, | |
| 7536 "POST", | |
| 7537 body: _body, | |
| 7538 queryParams: _queryParams, | |
| 7539 uploadOptions: _uploadOptions, | |
| 7540 uploadMedia: _uploadMedia, | |
| 7541 downloadOptions: _downloadOptions); | |
| 7542 return _response.then((data) => new PlacementGroup.fromJson(data)); | |
| 7543 } | |
| 7544 | |
| 7545 /** | |
| 7546 * Retrieves a list of placement groups, possibly filtered. | |
| 7547 * | |
| 7548 * Request parameters: | |
| 7549 * | |
| 7550 * [profileId] - User profile ID associated with this request. | |
| 7551 * | |
| 7552 * [advertiserIds] - Select only placement groups that belong to these | |
| 7553 * advertisers. | |
| 7554 * | |
| 7555 * [archived] - Select only archived placements. Don't set this field to | |
| 7556 * select both archived and non-archived placements. | |
| 7557 * | |
| 7558 * [campaignIds] - Select only placement groups that belong to these | |
| 7559 * campaigns. | |
| 7560 * | |
| 7561 * [contentCategoryIds] - Select only placement groups that are associated | |
| 7562 * with these content categories. | |
| 7563 * | |
| 7564 * [directorySiteIds] - Select only placement groups that are associated with | |
| 7565 * these directory sites. | |
| 7566 * | |
| 7567 * [ids] - Select only placement groups with these IDs. | |
| 7568 * | |
| 7569 * [maxEndDate] - Select only placements or placement groups whose end date is | |
| 7570 * on or before the specified maxEndDate. The date should be formatted as | |
| 7571 * "yyyy-MM-dd". | |
| 7572 * | |
| 7573 * [maxResults] - Maximum number of results to return. | |
| 7574 * | |
| 7575 * [maxStartDate] - Select only placements or placement groups whose start | |
| 7576 * date is on or before the specified maxStartDate. The date should be | |
| 7577 * formatted as "yyyy-MM-dd". | |
| 7578 * | |
| 7579 * [minEndDate] - Select only placements or placement groups whose end date is | |
| 7580 * on or after the specified minEndDate. The date should be formatted as | |
| 7581 * "yyyy-MM-dd". | |
| 7582 * | |
| 7583 * [minStartDate] - Select only placements or placement groups whose start | |
| 7584 * date is on or after the specified minStartDate. The date should be | |
| 7585 * formatted as "yyyy-MM-dd". | |
| 7586 * | |
| 7587 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 7588 * | |
| 7589 * [placementGroupType] - Select only placement groups belonging with this | |
| 7590 * group type. A package is a simple group of placements that acts as a single | |
| 7591 * pricing point for a group of tags. A roadblock is a group of placements | |
| 7592 * that not only acts as a single pricing point but also assumes that all the | |
| 7593 * tags in it will be served at the same time. A roadblock requires one of its | |
| 7594 * assigned placements to be marked as primary for reporting. | |
| 7595 * Possible string values are: | |
| 7596 * - "PLACEMENT_PACKAGE" | |
| 7597 * - "PLACEMENT_ROADBLOCK" | |
| 7598 * | |
| 7599 * [placementStrategyIds] - Select only placement groups that are associated | |
| 7600 * with these placement strategies. | |
| 7601 * | |
| 7602 * [pricingTypes] - Select only placement groups with these pricing types. | |
| 7603 * | |
| 7604 * [searchString] - Allows searching for placement groups by name or ID. | |
| 7605 * Wildcards (*) are allowed. For example, "placement*2015" will return | |
| 7606 * placement groups with names like "placement group June 2015", "placement | |
| 7607 * group May 2015", or simply "placements 2015". Most of the searches also add | |
| 7608 * wildcards implicitly at the start and the end of the search string. For | |
| 7609 * example, a search string of "placementgroup" will match placement groups | |
| 7610 * with name "my placementgroup", "placementgroup 2015", or simply | |
| 7611 * "placementgroup". | |
| 7612 * | |
| 7613 * [siteIds] - Select only placement groups that are associated with these | |
| 7614 * sites. | |
| 7615 * | |
| 7616 * [sortField] - Field by which to sort the list. | |
| 7617 * Possible string values are: | |
| 7618 * - "ID" | |
| 7619 * - "NAME" | |
| 7620 * | |
| 7621 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 7622 * Possible string values are: | |
| 7623 * - "ASCENDING" | |
| 7624 * - "DESCENDING" | |
| 7625 * | |
| 7626 * Completes with a [PlacementGroupsListResponse]. | |
| 7627 * | |
| 7628 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 7629 * error. | |
| 7630 * | |
| 7631 * If the used [http.Client] completes with an error when making a REST call, | |
| 7632 * this method will complete with the same error. | |
| 7633 */ | |
| 7634 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}
) { | |
| 7635 var _url = null; | |
| 7636 var _queryParams = new core.Map(); | |
| 7637 var _uploadMedia = null; | |
| 7638 var _uploadOptions = null; | |
| 7639 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 7640 var _body = null; | |
| 7641 | |
| 7642 if (profileId == null) { | |
| 7643 throw new core.ArgumentError("Parameter profileId is required."); | |
| 7644 } | |
| 7645 if (advertiserIds != null) { | |
| 7646 _queryParams["advertiserIds"] = advertiserIds; | |
| 7647 } | |
| 7648 if (archived != null) { | |
| 7649 _queryParams["archived"] = ["${archived}"]; | |
| 7650 } | |
| 7651 if (campaignIds != null) { | |
| 7652 _queryParams["campaignIds"] = campaignIds; | |
| 7653 } | |
| 7654 if (contentCategoryIds != null) { | |
| 7655 _queryParams["contentCategoryIds"] = contentCategoryIds; | |
| 7656 } | |
| 7657 if (directorySiteIds != null) { | |
| 7658 _queryParams["directorySiteIds"] = directorySiteIds; | |
| 7659 } | |
| 7660 if (ids != null) { | |
| 7661 _queryParams["ids"] = ids; | |
| 7662 } | |
| 7663 if (maxEndDate != null) { | |
| 7664 _queryParams["maxEndDate"] = [maxEndDate]; | |
| 7665 } | |
| 7666 if (maxResults != null) { | |
| 7667 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 7668 } | |
| 7669 if (maxStartDate != null) { | |
| 7670 _queryParams["maxStartDate"] = [maxStartDate]; | |
| 7671 } | |
| 7672 if (minEndDate != null) { | |
| 7673 _queryParams["minEndDate"] = [minEndDate]; | |
| 7674 } | |
| 7675 if (minStartDate != null) { | |
| 7676 _queryParams["minStartDate"] = [minStartDate]; | |
| 7677 } | |
| 7678 if (pageToken != null) { | |
| 7679 _queryParams["pageToken"] = [pageToken]; | |
| 7680 } | |
| 7681 if (placementGroupType != null) { | |
| 7682 _queryParams["placementGroupType"] = [placementGroupType]; | |
| 7683 } | |
| 7684 if (placementStrategyIds != null) { | |
| 7685 _queryParams["placementStrategyIds"] = placementStrategyIds; | |
| 7686 } | |
| 7687 if (pricingTypes != null) { | |
| 7688 _queryParams["pricingTypes"] = pricingTypes; | |
| 7689 } | |
| 7690 if (searchString != null) { | |
| 7691 _queryParams["searchString"] = [searchString]; | |
| 7692 } | |
| 7693 if (siteIds != null) { | |
| 7694 _queryParams["siteIds"] = siteIds; | |
| 7695 } | |
| 7696 if (sortField != null) { | |
| 7697 _queryParams["sortField"] = [sortField]; | |
| 7698 } | |
| 7699 if (sortOrder != null) { | |
| 7700 _queryParams["sortOrder"] = [sortOrder]; | |
| 7701 } | |
| 7702 | |
| 7703 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla
cementGroups'; | |
| 7704 | |
| 7705 var _response = _requester.request(_url, | |
| 7706 "GET", | |
| 7707 body: _body, | |
| 7708 queryParams: _queryParams, | |
| 7709 uploadOptions: _uploadOptions, | |
| 7710 uploadMedia: _uploadMedia, | |
| 7711 downloadOptions: _downloadOptions); | |
| 7712 return _response.then((data) => new PlacementGroupsListResponse.fromJson(dat
a)); | |
| 7713 } | |
| 7714 | |
| 7715 /** | |
| 7716 * Updates an existing placement group. This method supports patch semantics. | |
| 7717 * | |
| 7718 * [request] - The metadata request object. | |
| 7719 * | |
| 7720 * Request parameters: | |
| 7721 * | |
| 7722 * [profileId] - User profile ID associated with this request. | |
| 7723 * | |
| 7724 * [id] - Placement group ID. | |
| 7725 * | |
| 7726 * Completes with a [PlacementGroup]. | |
| 7727 * | |
| 7728 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 7729 * error. | |
| 7730 * | |
| 7731 * If the used [http.Client] completes with an error when making a REST call, | |
| 7732 * this method will complete with the same error. | |
| 7733 */ | |
| 7734 async.Future<PlacementGroup> patch(PlacementGroup request, core.String profile
Id, core.String id) { | |
| 7735 var _url = null; | |
| 7736 var _queryParams = new core.Map(); | |
| 7737 var _uploadMedia = null; | |
| 7738 var _uploadOptions = null; | |
| 7739 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 7740 var _body = null; | |
| 7741 | |
| 7742 if (request != null) { | |
| 7743 _body = convert.JSON.encode((request).toJson()); | |
| 7744 } | |
| 7745 if (profileId == null) { | |
| 7746 throw new core.ArgumentError("Parameter profileId is required."); | |
| 7747 } | |
| 7748 if (id == null) { | |
| 7749 throw new core.ArgumentError("Parameter id is required."); | |
| 7750 } | |
| 7751 _queryParams["id"] = [id]; | |
| 7752 | |
| 7753 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla
cementGroups'; | |
| 7754 | |
| 7755 var _response = _requester.request(_url, | |
| 7756 "PATCH", | |
| 7757 body: _body, | |
| 7758 queryParams: _queryParams, | |
| 7759 uploadOptions: _uploadOptions, | |
| 7760 uploadMedia: _uploadMedia, | |
| 7761 downloadOptions: _downloadOptions); | |
| 7762 return _response.then((data) => new PlacementGroup.fromJson(data)); | |
| 7763 } | |
| 7764 | |
| 7765 /** | |
| 7766 * Updates an existing placement group. | |
| 7767 * | |
| 7768 * [request] - The metadata request object. | |
| 7769 * | |
| 7770 * Request parameters: | |
| 7771 * | |
| 7772 * [profileId] - User profile ID associated with this request. | |
| 7773 * | |
| 7774 * Completes with a [PlacementGroup]. | |
| 7775 * | |
| 7776 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 7777 * error. | |
| 7778 * | |
| 7779 * If the used [http.Client] completes with an error when making a REST call, | |
| 7780 * this method will complete with the same error. | |
| 7781 */ | |
| 7782 async.Future<PlacementGroup> update(PlacementGroup request, core.String profil
eId) { | |
| 7783 var _url = null; | |
| 7784 var _queryParams = new core.Map(); | |
| 7785 var _uploadMedia = null; | |
| 7786 var _uploadOptions = null; | |
| 7787 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 7788 var _body = null; | |
| 7789 | |
| 7790 if (request != null) { | |
| 7791 _body = convert.JSON.encode((request).toJson()); | |
| 7792 } | |
| 7793 if (profileId == null) { | |
| 7794 throw new core.ArgumentError("Parameter profileId is required."); | |
| 7795 } | |
| 7796 | |
| 7797 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla
cementGroups'; | |
| 7798 | |
| 7799 var _response = _requester.request(_url, | |
| 7800 "PUT", | |
| 7801 body: _body, | |
| 7802 queryParams: _queryParams, | |
| 7803 uploadOptions: _uploadOptions, | |
| 7804 uploadMedia: _uploadMedia, | |
| 7805 downloadOptions: _downloadOptions); | |
| 7806 return _response.then((data) => new PlacementGroup.fromJson(data)); | |
| 7807 } | |
| 7808 | |
| 7809 } | |
| 7810 | |
| 7811 | |
| 7812 class PlacementStrategiesResourceApi { | |
| 7813 final commons.ApiRequester _requester; | |
| 7814 | |
| 7815 PlacementStrategiesResourceApi(commons.ApiRequester client) : | |
| 7816 _requester = client; | |
| 7817 | |
| 7818 /** | |
| 7819 * Deletes an existing placement strategy. | |
| 7820 * | |
| 7821 * Request parameters: | |
| 7822 * | |
| 7823 * [profileId] - User profile ID associated with this request. | |
| 7824 * | |
| 7825 * [id] - Placement strategy ID. | |
| 7826 * | |
| 7827 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 7828 * error. | |
| 7829 * | |
| 7830 * If the used [http.Client] completes with an error when making a REST call, | |
| 7831 * this method will complete with the same error. | |
| 7832 */ | |
| 7833 async.Future delete(core.String profileId, core.String id) { | |
| 7834 var _url = null; | |
| 7835 var _queryParams = new core.Map(); | |
| 7836 var _uploadMedia = null; | |
| 7837 var _uploadOptions = null; | |
| 7838 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 7839 var _body = null; | |
| 7840 | |
| 7841 if (profileId == null) { | |
| 7842 throw new core.ArgumentError("Parameter profileId is required."); | |
| 7843 } | |
| 7844 if (id == null) { | |
| 7845 throw new core.ArgumentError("Parameter id is required."); | |
| 7846 } | |
| 7847 | |
| 7848 _downloadOptions = null; | |
| 7849 | |
| 7850 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla
cementStrategies/' + commons.Escaper.ecapeVariable('$id'); | |
| 7851 | |
| 7852 var _response = _requester.request(_url, | |
| 7853 "DELETE", | |
| 7854 body: _body, | |
| 7855 queryParams: _queryParams, | |
| 7856 uploadOptions: _uploadOptions, | |
| 7857 uploadMedia: _uploadMedia, | |
| 7858 downloadOptions: _downloadOptions); | |
| 7859 return _response.then((data) => null); | |
| 7860 } | |
| 7861 | |
| 7862 /** | |
| 7863 * Gets one placement strategy by ID. | |
| 7864 * | |
| 7865 * Request parameters: | |
| 7866 * | |
| 7867 * [profileId] - User profile ID associated with this request. | |
| 7868 * | |
| 7869 * [id] - Placement strategy ID. | |
| 7870 * | |
| 7871 * Completes with a [PlacementStrategy]. | |
| 7872 * | |
| 7873 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 7874 * error. | |
| 7875 * | |
| 7876 * If the used [http.Client] completes with an error when making a REST call, | |
| 7877 * this method will complete with the same error. | |
| 7878 */ | |
| 7879 async.Future<PlacementStrategy> get(core.String profileId, core.String id) { | |
| 7880 var _url = null; | |
| 7881 var _queryParams = new core.Map(); | |
| 7882 var _uploadMedia = null; | |
| 7883 var _uploadOptions = null; | |
| 7884 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 7885 var _body = null; | |
| 7886 | |
| 7887 if (profileId == null) { | |
| 7888 throw new core.ArgumentError("Parameter profileId is required."); | |
| 7889 } | |
| 7890 if (id == null) { | |
| 7891 throw new core.ArgumentError("Parameter id is required."); | |
| 7892 } | |
| 7893 | |
| 7894 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla
cementStrategies/' + commons.Escaper.ecapeVariable('$id'); | |
| 7895 | |
| 7896 var _response = _requester.request(_url, | |
| 7897 "GET", | |
| 7898 body: _body, | |
| 7899 queryParams: _queryParams, | |
| 7900 uploadOptions: _uploadOptions, | |
| 7901 uploadMedia: _uploadMedia, | |
| 7902 downloadOptions: _downloadOptions); | |
| 7903 return _response.then((data) => new PlacementStrategy.fromJson(data)); | |
| 7904 } | |
| 7905 | |
| 7906 /** | |
| 7907 * Inserts a new placement strategy. | |
| 7908 * | |
| 7909 * [request] - The metadata request object. | |
| 7910 * | |
| 7911 * Request parameters: | |
| 7912 * | |
| 7913 * [profileId] - User profile ID associated with this request. | |
| 7914 * | |
| 7915 * Completes with a [PlacementStrategy]. | |
| 7916 * | |
| 7917 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 7918 * error. | |
| 7919 * | |
| 7920 * If the used [http.Client] completes with an error when making a REST call, | |
| 7921 * this method will complete with the same error. | |
| 7922 */ | |
| 7923 async.Future<PlacementStrategy> insert(PlacementStrategy request, core.String
profileId) { | |
| 7924 var _url = null; | |
| 7925 var _queryParams = new core.Map(); | |
| 7926 var _uploadMedia = null; | |
| 7927 var _uploadOptions = null; | |
| 7928 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 7929 var _body = null; | |
| 7930 | |
| 7931 if (request != null) { | |
| 7932 _body = convert.JSON.encode((request).toJson()); | |
| 7933 } | |
| 7934 if (profileId == null) { | |
| 7935 throw new core.ArgumentError("Parameter profileId is required."); | |
| 7936 } | |
| 7937 | |
| 7938 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla
cementStrategies'; | |
| 7939 | |
| 7940 var _response = _requester.request(_url, | |
| 7941 "POST", | |
| 7942 body: _body, | |
| 7943 queryParams: _queryParams, | |
| 7944 uploadOptions: _uploadOptions, | |
| 7945 uploadMedia: _uploadMedia, | |
| 7946 downloadOptions: _downloadOptions); | |
| 7947 return _response.then((data) => new PlacementStrategy.fromJson(data)); | |
| 7948 } | |
| 7949 | |
| 7950 /** | |
| 7951 * Retrieves a list of placement strategies, possibly filtered. | |
| 7952 * | |
| 7953 * Request parameters: | |
| 7954 * | |
| 7955 * [profileId] - User profile ID associated with this request. | |
| 7956 * | |
| 7957 * [ids] - Select only placement strategies with these IDs. | |
| 7958 * | |
| 7959 * [maxResults] - Maximum number of results to return. | |
| 7960 * | |
| 7961 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 7962 * | |
| 7963 * [searchString] - Allows searching for objects by name or ID. Wildcards (*) | |
| 7964 * are allowed. For example, "placementstrategy*2015" will return objects with | |
| 7965 * names like "placementstrategy June 2015", "placementstrategy April 2015", | |
| 7966 * or simply "placementstrategy 2015". Most of the searches also add wildcards | |
| 7967 * implicitly at the start and the end of the search string. For example, a | |
| 7968 * search string of "placementstrategy" will match objects with name "my | |
| 7969 * placementstrategy", "placementstrategy 2015", or simply | |
| 7970 * "placementstrategy". | |
| 7971 * | |
| 7972 * [sortField] - Field by which to sort the list. | |
| 7973 * Possible string values are: | |
| 7974 * - "ID" | |
| 7975 * - "NAME" | |
| 7976 * | |
| 7977 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 7978 * Possible string values are: | |
| 7979 * - "ASCENDING" | |
| 7980 * - "DESCENDING" | |
| 7981 * | |
| 7982 * Completes with a [PlacementStrategiesListResponse]. | |
| 7983 * | |
| 7984 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 7985 * error. | |
| 7986 * | |
| 7987 * If the used [http.Client] completes with an error when making a REST call, | |
| 7988 * this method will complete with the same error. | |
| 7989 */ | |
| 7990 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}) { | |
| 7991 var _url = null; | |
| 7992 var _queryParams = new core.Map(); | |
| 7993 var _uploadMedia = null; | |
| 7994 var _uploadOptions = null; | |
| 7995 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 7996 var _body = null; | |
| 7997 | |
| 7998 if (profileId == null) { | |
| 7999 throw new core.ArgumentError("Parameter profileId is required."); | |
| 8000 } | |
| 8001 if (ids != null) { | |
| 8002 _queryParams["ids"] = ids; | |
| 8003 } | |
| 8004 if (maxResults != null) { | |
| 8005 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 8006 } | |
| 8007 if (pageToken != null) { | |
| 8008 _queryParams["pageToken"] = [pageToken]; | |
| 8009 } | |
| 8010 if (searchString != null) { | |
| 8011 _queryParams["searchString"] = [searchString]; | |
| 8012 } | |
| 8013 if (sortField != null) { | |
| 8014 _queryParams["sortField"] = [sortField]; | |
| 8015 } | |
| 8016 if (sortOrder != null) { | |
| 8017 _queryParams["sortOrder"] = [sortOrder]; | |
| 8018 } | |
| 8019 | |
| 8020 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla
cementStrategies'; | |
| 8021 | |
| 8022 var _response = _requester.request(_url, | |
| 8023 "GET", | |
| 8024 body: _body, | |
| 8025 queryParams: _queryParams, | |
| 8026 uploadOptions: _uploadOptions, | |
| 8027 uploadMedia: _uploadMedia, | |
| 8028 downloadOptions: _downloadOptions); | |
| 8029 return _response.then((data) => new PlacementStrategiesListResponse.fromJson
(data)); | |
| 8030 } | |
| 8031 | |
| 8032 /** | |
| 8033 * Updates an existing placement strategy. This method supports patch | |
| 8034 * semantics. | |
| 8035 * | |
| 8036 * [request] - The metadata request object. | |
| 8037 * | |
| 8038 * Request parameters: | |
| 8039 * | |
| 8040 * [profileId] - User profile ID associated with this request. | |
| 8041 * | |
| 8042 * [id] - Placement strategy ID. | |
| 8043 * | |
| 8044 * Completes with a [PlacementStrategy]. | |
| 8045 * | |
| 8046 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 8047 * error. | |
| 8048 * | |
| 8049 * If the used [http.Client] completes with an error when making a REST call, | |
| 8050 * this method will complete with the same error. | |
| 8051 */ | |
| 8052 async.Future<PlacementStrategy> patch(PlacementStrategy request, core.String p
rofileId, core.String id) { | |
| 8053 var _url = null; | |
| 8054 var _queryParams = new core.Map(); | |
| 8055 var _uploadMedia = null; | |
| 8056 var _uploadOptions = null; | |
| 8057 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 8058 var _body = null; | |
| 8059 | |
| 8060 if (request != null) { | |
| 8061 _body = convert.JSON.encode((request).toJson()); | |
| 8062 } | |
| 8063 if (profileId == null) { | |
| 8064 throw new core.ArgumentError("Parameter profileId is required."); | |
| 8065 } | |
| 8066 if (id == null) { | |
| 8067 throw new core.ArgumentError("Parameter id is required."); | |
| 8068 } | |
| 8069 _queryParams["id"] = [id]; | |
| 8070 | |
| 8071 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla
cementStrategies'; | |
| 8072 | |
| 8073 var _response = _requester.request(_url, | |
| 8074 "PATCH", | |
| 8075 body: _body, | |
| 8076 queryParams: _queryParams, | |
| 8077 uploadOptions: _uploadOptions, | |
| 8078 uploadMedia: _uploadMedia, | |
| 8079 downloadOptions: _downloadOptions); | |
| 8080 return _response.then((data) => new PlacementStrategy.fromJson(data)); | |
| 8081 } | |
| 8082 | |
| 8083 /** | |
| 8084 * Updates an existing placement strategy. | |
| 8085 * | |
| 8086 * [request] - The metadata request object. | |
| 8087 * | |
| 8088 * Request parameters: | |
| 8089 * | |
| 8090 * [profileId] - User profile ID associated with this request. | |
| 8091 * | |
| 8092 * Completes with a [PlacementStrategy]. | |
| 8093 * | |
| 8094 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 8095 * error. | |
| 8096 * | |
| 8097 * If the used [http.Client] completes with an error when making a REST call, | |
| 8098 * this method will complete with the same error. | |
| 8099 */ | |
| 8100 async.Future<PlacementStrategy> update(PlacementStrategy request, core.String
profileId) { | |
| 8101 var _url = null; | |
| 8102 var _queryParams = new core.Map(); | |
| 8103 var _uploadMedia = null; | |
| 8104 var _uploadOptions = null; | |
| 8105 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 8106 var _body = null; | |
| 8107 | |
| 8108 if (request != null) { | |
| 8109 _body = convert.JSON.encode((request).toJson()); | |
| 8110 } | |
| 8111 if (profileId == null) { | |
| 8112 throw new core.ArgumentError("Parameter profileId is required."); | |
| 8113 } | |
| 8114 | |
| 8115 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla
cementStrategies'; | |
| 8116 | |
| 8117 var _response = _requester.request(_url, | |
| 8118 "PUT", | |
| 8119 body: _body, | |
| 8120 queryParams: _queryParams, | |
| 8121 uploadOptions: _uploadOptions, | |
| 8122 uploadMedia: _uploadMedia, | |
| 8123 downloadOptions: _downloadOptions); | |
| 8124 return _response.then((data) => new PlacementStrategy.fromJson(data)); | |
| 8125 } | |
| 8126 | |
| 8127 } | |
| 8128 | |
| 8129 | |
| 8130 class PlacementsResourceApi { | |
| 8131 final commons.ApiRequester _requester; | |
| 8132 | |
| 8133 PlacementsResourceApi(commons.ApiRequester client) : | |
| 8134 _requester = client; | |
| 8135 | |
| 8136 /** | |
| 8137 * Generates tags for a placement. | |
| 8138 * | |
| 8139 * Request parameters: | |
| 8140 * | |
| 8141 * [profileId] - User profile ID associated with this request. | |
| 8142 * | |
| 8143 * [campaignId] - Generate placements belonging to this campaign. This is a | |
| 8144 * required field. | |
| 8145 * | |
| 8146 * [placementIds] - Generate tags for these placements. | |
| 8147 * | |
| 8148 * [tagFormats] - Tag formats to generate for these placements. | |
| 8149 * | |
| 8150 * Completes with a [PlacementsGenerateTagsResponse]. | |
| 8151 * | |
| 8152 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 8153 * error. | |
| 8154 * | |
| 8155 * If the used [http.Client] completes with an error when making a REST call, | |
| 8156 * this method will complete with the same error. | |
| 8157 */ | |
| 8158 async.Future<PlacementsGenerateTagsResponse> generatetags(core.String profileI
d, {core.String campaignId, core.List<core.String> placementIds, core.List<core.
String> tagFormats}) { | |
| 8159 var _url = null; | |
| 8160 var _queryParams = new core.Map(); | |
| 8161 var _uploadMedia = null; | |
| 8162 var _uploadOptions = null; | |
| 8163 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 8164 var _body = null; | |
| 8165 | |
| 8166 if (profileId == null) { | |
| 8167 throw new core.ArgumentError("Parameter profileId is required."); | |
| 8168 } | |
| 8169 if (campaignId != null) { | |
| 8170 _queryParams["campaignId"] = [campaignId]; | |
| 8171 } | |
| 8172 if (placementIds != null) { | |
| 8173 _queryParams["placementIds"] = placementIds; | |
| 8174 } | |
| 8175 if (tagFormats != null) { | |
| 8176 _queryParams["tagFormats"] = tagFormats; | |
| 8177 } | |
| 8178 | |
| 8179 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla
cements/generatetags'; | |
| 8180 | |
| 8181 var _response = _requester.request(_url, | |
| 8182 "POST", | |
| 8183 body: _body, | |
| 8184 queryParams: _queryParams, | |
| 8185 uploadOptions: _uploadOptions, | |
| 8186 uploadMedia: _uploadMedia, | |
| 8187 downloadOptions: _downloadOptions); | |
| 8188 return _response.then((data) => new PlacementsGenerateTagsResponse.fromJson(
data)); | |
| 8189 } | |
| 8190 | |
| 8191 /** | |
| 8192 * Gets one placement by ID. | |
| 8193 * | |
| 8194 * Request parameters: | |
| 8195 * | |
| 8196 * [profileId] - User profile ID associated with this request. | |
| 8197 * | |
| 8198 * [id] - Placement ID. | |
| 8199 * | |
| 8200 * Completes with a [Placement]. | |
| 8201 * | |
| 8202 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 8203 * error. | |
| 8204 * | |
| 8205 * If the used [http.Client] completes with an error when making a REST call, | |
| 8206 * this method will complete with the same error. | |
| 8207 */ | |
| 8208 async.Future<Placement> get(core.String profileId, core.String id) { | |
| 8209 var _url = null; | |
| 8210 var _queryParams = new core.Map(); | |
| 8211 var _uploadMedia = null; | |
| 8212 var _uploadOptions = null; | |
| 8213 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 8214 var _body = null; | |
| 8215 | |
| 8216 if (profileId == null) { | |
| 8217 throw new core.ArgumentError("Parameter profileId is required."); | |
| 8218 } | |
| 8219 if (id == null) { | |
| 8220 throw new core.ArgumentError("Parameter id is required."); | |
| 8221 } | |
| 8222 | |
| 8223 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla
cements/' + commons.Escaper.ecapeVariable('$id'); | |
| 8224 | |
| 8225 var _response = _requester.request(_url, | |
| 8226 "GET", | |
| 8227 body: _body, | |
| 8228 queryParams: _queryParams, | |
| 8229 uploadOptions: _uploadOptions, | |
| 8230 uploadMedia: _uploadMedia, | |
| 8231 downloadOptions: _downloadOptions); | |
| 8232 return _response.then((data) => new Placement.fromJson(data)); | |
| 8233 } | |
| 8234 | |
| 8235 /** | |
| 8236 * Inserts a new placement. | |
| 8237 * | |
| 8238 * [request] - The metadata request object. | |
| 8239 * | |
| 8240 * Request parameters: | |
| 8241 * | |
| 8242 * [profileId] - User profile ID associated with this request. | |
| 8243 * | |
| 8244 * Completes with a [Placement]. | |
| 8245 * | |
| 8246 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 8247 * error. | |
| 8248 * | |
| 8249 * If the used [http.Client] completes with an error when making a REST call, | |
| 8250 * this method will complete with the same error. | |
| 8251 */ | |
| 8252 async.Future<Placement> insert(Placement request, core.String profileId) { | |
| 8253 var _url = null; | |
| 8254 var _queryParams = new core.Map(); | |
| 8255 var _uploadMedia = null; | |
| 8256 var _uploadOptions = null; | |
| 8257 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 8258 var _body = null; | |
| 8259 | |
| 8260 if (request != null) { | |
| 8261 _body = convert.JSON.encode((request).toJson()); | |
| 8262 } | |
| 8263 if (profileId == null) { | |
| 8264 throw new core.ArgumentError("Parameter profileId is required."); | |
| 8265 } | |
| 8266 | |
| 8267 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla
cements'; | |
| 8268 | |
| 8269 var _response = _requester.request(_url, | |
| 8270 "POST", | |
| 8271 body: _body, | |
| 8272 queryParams: _queryParams, | |
| 8273 uploadOptions: _uploadOptions, | |
| 8274 uploadMedia: _uploadMedia, | |
| 8275 downloadOptions: _downloadOptions); | |
| 8276 return _response.then((data) => new Placement.fromJson(data)); | |
| 8277 } | |
| 8278 | |
| 8279 /** | |
| 8280 * Retrieves a list of placements, possibly filtered. | |
| 8281 * | |
| 8282 * Request parameters: | |
| 8283 * | |
| 8284 * [profileId] - User profile ID associated with this request. | |
| 8285 * | |
| 8286 * [advertiserIds] - Select only placements that belong to these advertisers. | |
| 8287 * | |
| 8288 * [archived] - Select only archived placements. Don't set this field to | |
| 8289 * select both archived and non-archived placements. | |
| 8290 * | |
| 8291 * [campaignIds] - Select only placements that belong to these campaigns. | |
| 8292 * | |
| 8293 * [compatibilities] - Select only placements that are associated with these | |
| 8294 * compatibilities. WEB and WEB_INTERSTITIAL refer to rendering either on | |
| 8295 * desktop or on mobile devices for regular or interstitial ads respectively. | |
| 8296 * APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO | |
| 8297 * refers to rendering in in-stream video ads developed with the VAST | |
| 8298 * standard. | |
| 8299 * | |
| 8300 * [contentCategoryIds] - Select only placements that are associated with | |
| 8301 * these content categories. | |
| 8302 * | |
| 8303 * [directorySiteIds] - Select only placements that are associated with these | |
| 8304 * directory sites. | |
| 8305 * | |
| 8306 * [groupIds] - Select only placements that belong to these placement groups. | |
| 8307 * | |
| 8308 * [ids] - Select only placements with these IDs. | |
| 8309 * | |
| 8310 * [maxEndDate] - Select only placements or placement groups whose end date is | |
| 8311 * on or before the specified maxEndDate. The date should be formatted as | |
| 8312 * "yyyy-MM-dd". | |
| 8313 * | |
| 8314 * [maxResults] - Maximum number of results to return. | |
| 8315 * | |
| 8316 * [maxStartDate] - Select only placements or placement groups whose start | |
| 8317 * date is on or before the specified maxStartDate. The date should be | |
| 8318 * formatted as "yyyy-MM-dd". | |
| 8319 * | |
| 8320 * [minEndDate] - Select only placements or placement groups whose end date is | |
| 8321 * on or after the specified minEndDate. The date should be formatted as | |
| 8322 * "yyyy-MM-dd". | |
| 8323 * | |
| 8324 * [minStartDate] - Select only placements or placement groups whose start | |
| 8325 * date is on or after the specified minStartDate. The date should be | |
| 8326 * formatted as "yyyy-MM-dd". | |
| 8327 * | |
| 8328 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 8329 * | |
| 8330 * [paymentSource] - Select only placements with this payment source. | |
| 8331 * Possible string values are: | |
| 8332 * - "PLACEMENT_AGENCY_PAID" | |
| 8333 * - "PLACEMENT_PUBLISHER_PAID" | |
| 8334 * | |
| 8335 * [placementStrategyIds] - Select only placements that are associated with | |
| 8336 * these placement strategies. | |
| 8337 * | |
| 8338 * [pricingTypes] - Select only placements with these pricing types. | |
| 8339 * | |
| 8340 * [searchString] - Allows searching for placements by name or ID. Wildcards | |
| 8341 * (*) are allowed. For example, "placement*2015" will return placements with | |
| 8342 * names like "placement June 2015", "placement May 2015", or simply | |
| 8343 * "placements 2015". Most of the searches also add wildcards implicitly at | |
| 8344 * the start and the end of the search string. For example, a search string of | |
| 8345 * "placement" will match placements with name "my placement", "placement | |
| 8346 * 2015", or simply "placement". | |
| 8347 * | |
| 8348 * [siteIds] - Select only placements that are associated with these sites. | |
| 8349 * | |
| 8350 * [sizeIds] - Select only placements that are associated with these sizes. | |
| 8351 * | |
| 8352 * [sortField] - Field by which to sort the list. | |
| 8353 * Possible string values are: | |
| 8354 * - "ID" | |
| 8355 * - "NAME" | |
| 8356 * | |
| 8357 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 8358 * Possible string values are: | |
| 8359 * - "ASCENDING" | |
| 8360 * - "DESCENDING" | |
| 8361 * | |
| 8362 * Completes with a [PlacementsListResponse]. | |
| 8363 * | |
| 8364 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 8365 * error. | |
| 8366 * | |
| 8367 * If the used [http.Client] completes with an error when making a REST call, | |
| 8368 * this method will complete with the same error. | |
| 8369 */ | |
| 8370 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}) { | |
| 8371 var _url = null; | |
| 8372 var _queryParams = new core.Map(); | |
| 8373 var _uploadMedia = null; | |
| 8374 var _uploadOptions = null; | |
| 8375 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 8376 var _body = null; | |
| 8377 | |
| 8378 if (profileId == null) { | |
| 8379 throw new core.ArgumentError("Parameter profileId is required."); | |
| 8380 } | |
| 8381 if (advertiserIds != null) { | |
| 8382 _queryParams["advertiserIds"] = advertiserIds; | |
| 8383 } | |
| 8384 if (archived != null) { | |
| 8385 _queryParams["archived"] = ["${archived}"]; | |
| 8386 } | |
| 8387 if (campaignIds != null) { | |
| 8388 _queryParams["campaignIds"] = campaignIds; | |
| 8389 } | |
| 8390 if (compatibilities != null) { | |
| 8391 _queryParams["compatibilities"] = compatibilities; | |
| 8392 } | |
| 8393 if (contentCategoryIds != null) { | |
| 8394 _queryParams["contentCategoryIds"] = contentCategoryIds; | |
| 8395 } | |
| 8396 if (directorySiteIds != null) { | |
| 8397 _queryParams["directorySiteIds"] = directorySiteIds; | |
| 8398 } | |
| 8399 if (groupIds != null) { | |
| 8400 _queryParams["groupIds"] = groupIds; | |
| 8401 } | |
| 8402 if (ids != null) { | |
| 8403 _queryParams["ids"] = ids; | |
| 8404 } | |
| 8405 if (maxEndDate != null) { | |
| 8406 _queryParams["maxEndDate"] = [maxEndDate]; | |
| 8407 } | |
| 8408 if (maxResults != null) { | |
| 8409 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 8410 } | |
| 8411 if (maxStartDate != null) { | |
| 8412 _queryParams["maxStartDate"] = [maxStartDate]; | |
| 8413 } | |
| 8414 if (minEndDate != null) { | |
| 8415 _queryParams["minEndDate"] = [minEndDate]; | |
| 8416 } | |
| 8417 if (minStartDate != null) { | |
| 8418 _queryParams["minStartDate"] = [minStartDate]; | |
| 8419 } | |
| 8420 if (pageToken != null) { | |
| 8421 _queryParams["pageToken"] = [pageToken]; | |
| 8422 } | |
| 8423 if (paymentSource != null) { | |
| 8424 _queryParams["paymentSource"] = [paymentSource]; | |
| 8425 } | |
| 8426 if (placementStrategyIds != null) { | |
| 8427 _queryParams["placementStrategyIds"] = placementStrategyIds; | |
| 8428 } | |
| 8429 if (pricingTypes != null) { | |
| 8430 _queryParams["pricingTypes"] = pricingTypes; | |
| 8431 } | |
| 8432 if (searchString != null) { | |
| 8433 _queryParams["searchString"] = [searchString]; | |
| 8434 } | |
| 8435 if (siteIds != null) { | |
| 8436 _queryParams["siteIds"] = siteIds; | |
| 8437 } | |
| 8438 if (sizeIds != null) { | |
| 8439 _queryParams["sizeIds"] = sizeIds; | |
| 8440 } | |
| 8441 if (sortField != null) { | |
| 8442 _queryParams["sortField"] = [sortField]; | |
| 8443 } | |
| 8444 if (sortOrder != null) { | |
| 8445 _queryParams["sortOrder"] = [sortOrder]; | |
| 8446 } | |
| 8447 | |
| 8448 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla
cements'; | |
| 8449 | |
| 8450 var _response = _requester.request(_url, | |
| 8451 "GET", | |
| 8452 body: _body, | |
| 8453 queryParams: _queryParams, | |
| 8454 uploadOptions: _uploadOptions, | |
| 8455 uploadMedia: _uploadMedia, | |
| 8456 downloadOptions: _downloadOptions); | |
| 8457 return _response.then((data) => new PlacementsListResponse.fromJson(data)); | |
| 8458 } | |
| 8459 | |
| 8460 /** | |
| 8461 * Updates an existing placement. This method supports patch semantics. | |
| 8462 * | |
| 8463 * [request] - The metadata request object. | |
| 8464 * | |
| 8465 * Request parameters: | |
| 8466 * | |
| 8467 * [profileId] - User profile ID associated with this request. | |
| 8468 * | |
| 8469 * [id] - Placement ID. | |
| 8470 * | |
| 8471 * Completes with a [Placement]. | |
| 8472 * | |
| 8473 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 8474 * error. | |
| 8475 * | |
| 8476 * If the used [http.Client] completes with an error when making a REST call, | |
| 8477 * this method will complete with the same error. | |
| 8478 */ | |
| 8479 async.Future<Placement> patch(Placement request, core.String profileId, core.S
tring id) { | |
| 8480 var _url = null; | |
| 8481 var _queryParams = new core.Map(); | |
| 8482 var _uploadMedia = null; | |
| 8483 var _uploadOptions = null; | |
| 8484 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 8485 var _body = null; | |
| 8486 | |
| 8487 if (request != null) { | |
| 8488 _body = convert.JSON.encode((request).toJson()); | |
| 8489 } | |
| 8490 if (profileId == null) { | |
| 8491 throw new core.ArgumentError("Parameter profileId is required."); | |
| 8492 } | |
| 8493 if (id == null) { | |
| 8494 throw new core.ArgumentError("Parameter id is required."); | |
| 8495 } | |
| 8496 _queryParams["id"] = [id]; | |
| 8497 | |
| 8498 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla
cements'; | |
| 8499 | |
| 8500 var _response = _requester.request(_url, | |
| 8501 "PATCH", | |
| 8502 body: _body, | |
| 8503 queryParams: _queryParams, | |
| 8504 uploadOptions: _uploadOptions, | |
| 8505 uploadMedia: _uploadMedia, | |
| 8506 downloadOptions: _downloadOptions); | |
| 8507 return _response.then((data) => new Placement.fromJson(data)); | |
| 8508 } | |
| 8509 | |
| 8510 /** | |
| 8511 * Updates an existing placement. | |
| 8512 * | |
| 8513 * [request] - The metadata request object. | |
| 8514 * | |
| 8515 * Request parameters: | |
| 8516 * | |
| 8517 * [profileId] - User profile ID associated with this request. | |
| 8518 * | |
| 8519 * Completes with a [Placement]. | |
| 8520 * | |
| 8521 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 8522 * error. | |
| 8523 * | |
| 8524 * If the used [http.Client] completes with an error when making a REST call, | |
| 8525 * this method will complete with the same error. | |
| 8526 */ | |
| 8527 async.Future<Placement> update(Placement request, core.String profileId) { | |
| 8528 var _url = null; | |
| 8529 var _queryParams = new core.Map(); | |
| 8530 var _uploadMedia = null; | |
| 8531 var _uploadOptions = null; | |
| 8532 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 8533 var _body = null; | |
| 8534 | |
| 8535 if (request != null) { | |
| 8536 _body = convert.JSON.encode((request).toJson()); | |
| 8537 } | |
| 8538 if (profileId == null) { | |
| 8539 throw new core.ArgumentError("Parameter profileId is required."); | |
| 8540 } | |
| 8541 | |
| 8542 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla
cements'; | |
| 8543 | |
| 8544 var _response = _requester.request(_url, | |
| 8545 "PUT", | |
| 8546 body: _body, | |
| 8547 queryParams: _queryParams, | |
| 8548 uploadOptions: _uploadOptions, | |
| 8549 uploadMedia: _uploadMedia, | |
| 8550 downloadOptions: _downloadOptions); | |
| 8551 return _response.then((data) => new Placement.fromJson(data)); | |
| 8552 } | |
| 8553 | |
| 8554 } | |
| 8555 | |
| 8556 | |
| 8557 class PlatformTypesResourceApi { | |
| 8558 final commons.ApiRequester _requester; | |
| 8559 | |
| 8560 PlatformTypesResourceApi(commons.ApiRequester client) : | |
| 8561 _requester = client; | |
| 8562 | |
| 8563 /** | |
| 8564 * Gets one platform type by ID. | |
| 8565 * | |
| 8566 * Request parameters: | |
| 8567 * | |
| 8568 * [profileId] - User profile ID associated with this request. | |
| 8569 * | |
| 8570 * [id] - Platform type ID. | |
| 8571 * | |
| 8572 * Completes with a [PlatformType]. | |
| 8573 * | |
| 8574 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 8575 * error. | |
| 8576 * | |
| 8577 * If the used [http.Client] completes with an error when making a REST call, | |
| 8578 * this method will complete with the same error. | |
| 8579 */ | |
| 8580 async.Future<PlatformType> get(core.String profileId, core.String id) { | |
| 8581 var _url = null; | |
| 8582 var _queryParams = new core.Map(); | |
| 8583 var _uploadMedia = null; | |
| 8584 var _uploadOptions = null; | |
| 8585 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 8586 var _body = null; | |
| 8587 | |
| 8588 if (profileId == null) { | |
| 8589 throw new core.ArgumentError("Parameter profileId is required."); | |
| 8590 } | |
| 8591 if (id == null) { | |
| 8592 throw new core.ArgumentError("Parameter id is required."); | |
| 8593 } | |
| 8594 | |
| 8595 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla
tformTypes/' + commons.Escaper.ecapeVariable('$id'); | |
| 8596 | |
| 8597 var _response = _requester.request(_url, | |
| 8598 "GET", | |
| 8599 body: _body, | |
| 8600 queryParams: _queryParams, | |
| 8601 uploadOptions: _uploadOptions, | |
| 8602 uploadMedia: _uploadMedia, | |
| 8603 downloadOptions: _downloadOptions); | |
| 8604 return _response.then((data) => new PlatformType.fromJson(data)); | |
| 8605 } | |
| 8606 | |
| 8607 /** | |
| 8608 * Retrieves a list of platform types. | |
| 8609 * | |
| 8610 * Request parameters: | |
| 8611 * | |
| 8612 * [profileId] - User profile ID associated with this request. | |
| 8613 * | |
| 8614 * Completes with a [PlatformTypesListResponse]. | |
| 8615 * | |
| 8616 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 8617 * error. | |
| 8618 * | |
| 8619 * If the used [http.Client] completes with an error when making a REST call, | |
| 8620 * this method will complete with the same error. | |
| 8621 */ | |
| 8622 async.Future<PlatformTypesListResponse> list(core.String profileId) { | |
| 8623 var _url = null; | |
| 8624 var _queryParams = new core.Map(); | |
| 8625 var _uploadMedia = null; | |
| 8626 var _uploadOptions = null; | |
| 8627 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 8628 var _body = null; | |
| 8629 | |
| 8630 if (profileId == null) { | |
| 8631 throw new core.ArgumentError("Parameter profileId is required."); | |
| 8632 } | |
| 8633 | |
| 8634 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla
tformTypes'; | |
| 8635 | |
| 8636 var _response = _requester.request(_url, | |
| 8637 "GET", | |
| 8638 body: _body, | |
| 8639 queryParams: _queryParams, | |
| 8640 uploadOptions: _uploadOptions, | |
| 8641 uploadMedia: _uploadMedia, | |
| 8642 downloadOptions: _downloadOptions); | |
| 8643 return _response.then((data) => new PlatformTypesListResponse.fromJson(data)
); | |
| 8644 } | |
| 8645 | |
| 8646 } | |
| 8647 | |
| 8648 | |
| 8649 class PostalCodesResourceApi { | |
| 8650 final commons.ApiRequester _requester; | |
| 8651 | |
| 8652 PostalCodesResourceApi(commons.ApiRequester client) : | |
| 8653 _requester = client; | |
| 8654 | |
| 8655 /** | |
| 8656 * Gets one postal code by ID. | |
| 8657 * | |
| 8658 * Request parameters: | |
| 8659 * | |
| 8660 * [profileId] - User profile ID associated with this request. | |
| 8661 * | |
| 8662 * [code] - Postal code ID. | |
| 8663 * | |
| 8664 * Completes with a [PostalCode]. | |
| 8665 * | |
| 8666 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 8667 * error. | |
| 8668 * | |
| 8669 * If the used [http.Client] completes with an error when making a REST call, | |
| 8670 * this method will complete with the same error. | |
| 8671 */ | |
| 8672 async.Future<PostalCode> get(core.String profileId, core.String code) { | |
| 8673 var _url = null; | |
| 8674 var _queryParams = new core.Map(); | |
| 8675 var _uploadMedia = null; | |
| 8676 var _uploadOptions = null; | |
| 8677 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 8678 var _body = null; | |
| 8679 | |
| 8680 if (profileId == null) { | |
| 8681 throw new core.ArgumentError("Parameter profileId is required."); | |
| 8682 } | |
| 8683 if (code == null) { | |
| 8684 throw new core.ArgumentError("Parameter code is required."); | |
| 8685 } | |
| 8686 | |
| 8687 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pos
talCodes/' + commons.Escaper.ecapeVariable('$code'); | |
| 8688 | |
| 8689 var _response = _requester.request(_url, | |
| 8690 "GET", | |
| 8691 body: _body, | |
| 8692 queryParams: _queryParams, | |
| 8693 uploadOptions: _uploadOptions, | |
| 8694 uploadMedia: _uploadMedia, | |
| 8695 downloadOptions: _downloadOptions); | |
| 8696 return _response.then((data) => new PostalCode.fromJson(data)); | |
| 8697 } | |
| 8698 | |
| 8699 /** | |
| 8700 * Retrieves a list of postal codes. | |
| 8701 * | |
| 8702 * Request parameters: | |
| 8703 * | |
| 8704 * [profileId] - User profile ID associated with this request. | |
| 8705 * | |
| 8706 * Completes with a [PostalCodesListResponse]. | |
| 8707 * | |
| 8708 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 8709 * error. | |
| 8710 * | |
| 8711 * If the used [http.Client] completes with an error when making a REST call, | |
| 8712 * this method will complete with the same error. | |
| 8713 */ | |
| 8714 async.Future<PostalCodesListResponse> list(core.String profileId) { | |
| 8715 var _url = null; | |
| 8716 var _queryParams = new core.Map(); | |
| 8717 var _uploadMedia = null; | |
| 8718 var _uploadOptions = null; | |
| 8719 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 8720 var _body = null; | |
| 8721 | |
| 8722 if (profileId == null) { | |
| 8723 throw new core.ArgumentError("Parameter profileId is required."); | |
| 8724 } | |
| 8725 | |
| 8726 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pos
talCodes'; | |
| 8727 | |
| 8728 var _response = _requester.request(_url, | |
| 8729 "GET", | |
| 8730 body: _body, | |
| 8731 queryParams: _queryParams, | |
| 8732 uploadOptions: _uploadOptions, | |
| 8733 uploadMedia: _uploadMedia, | |
| 8734 downloadOptions: _downloadOptions); | |
| 8735 return _response.then((data) => new PostalCodesListResponse.fromJson(data)); | |
| 8736 } | |
| 8737 | |
| 8738 } | |
| 8739 | |
| 8740 | |
| 8741 class ProjectsResourceApi { | |
| 8742 final commons.ApiRequester _requester; | |
| 8743 | |
| 8744 ProjectsResourceApi(commons.ApiRequester client) : | |
| 8745 _requester = client; | |
| 8746 | |
| 8747 /** | |
| 8748 * Gets one project by ID. | |
| 8749 * | |
| 8750 * Request parameters: | |
| 8751 * | |
| 8752 * [profileId] - User profile ID associated with this request. | |
| 8753 * | |
| 8754 * [id] - Project ID. | |
| 8755 * | |
| 8756 * Completes with a [Project]. | |
| 8757 * | |
| 8758 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 8759 * error. | |
| 8760 * | |
| 8761 * If the used [http.Client] completes with an error when making a REST call, | |
| 8762 * this method will complete with the same error. | |
| 8763 */ | |
| 8764 async.Future<Project> get(core.String profileId, core.String id) { | |
| 8765 var _url = null; | |
| 8766 var _queryParams = new core.Map(); | |
| 8767 var _uploadMedia = null; | |
| 8768 var _uploadOptions = null; | |
| 8769 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 8770 var _body = null; | |
| 8771 | |
| 8772 if (profileId == null) { | |
| 8773 throw new core.ArgumentError("Parameter profileId is required."); | |
| 8774 } | |
| 8775 if (id == null) { | |
| 8776 throw new core.ArgumentError("Parameter id is required."); | |
| 8777 } | |
| 8778 | |
| 8779 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pro
jects/' + commons.Escaper.ecapeVariable('$id'); | |
| 8780 | |
| 8781 var _response = _requester.request(_url, | |
| 8782 "GET", | |
| 8783 body: _body, | |
| 8784 queryParams: _queryParams, | |
| 8785 uploadOptions: _uploadOptions, | |
| 8786 uploadMedia: _uploadMedia, | |
| 8787 downloadOptions: _downloadOptions); | |
| 8788 return _response.then((data) => new Project.fromJson(data)); | |
| 8789 } | |
| 8790 | |
| 8791 /** | |
| 8792 * Retrieves a list of projects, possibly filtered. | |
| 8793 * | |
| 8794 * Request parameters: | |
| 8795 * | |
| 8796 * [profileId] - User profile ID associated with this request. | |
| 8797 * | |
| 8798 * [advertiserIds] - Select only projects with these advertiser IDs. | |
| 8799 * | |
| 8800 * [ids] - Select only projects with these IDs. | |
| 8801 * | |
| 8802 * [maxResults] - Maximum number of results to return. | |
| 8803 * | |
| 8804 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 8805 * | |
| 8806 * [searchString] - Allows searching for projects by name or ID. Wildcards (*) | |
| 8807 * are allowed. For example, "project*2015" will return projects with names | |
| 8808 * like "project June 2015", "project April 2015", or simply "project 2015". | |
| 8809 * Most of the searches also add wildcards implicitly at the start and the end | |
| 8810 * of the search string. For example, a search string of "project" will match | |
| 8811 * projects with name "my project", "project 2015", or simply "project". | |
| 8812 * | |
| 8813 * [sortField] - Field by which to sort the list. | |
| 8814 * Possible string values are: | |
| 8815 * - "ID" | |
| 8816 * - "NAME" | |
| 8817 * | |
| 8818 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 8819 * Possible string values are: | |
| 8820 * - "ASCENDING" | |
| 8821 * - "DESCENDING" | |
| 8822 * | |
| 8823 * Completes with a [ProjectsListResponse]. | |
| 8824 * | |
| 8825 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 8826 * error. | |
| 8827 * | |
| 8828 * If the used [http.Client] completes with an error when making a REST call, | |
| 8829 * this method will complete with the same error. | |
| 8830 */ | |
| 8831 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}) { | |
| 8832 var _url = null; | |
| 8833 var _queryParams = new core.Map(); | |
| 8834 var _uploadMedia = null; | |
| 8835 var _uploadOptions = null; | |
| 8836 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 8837 var _body = null; | |
| 8838 | |
| 8839 if (profileId == null) { | |
| 8840 throw new core.ArgumentError("Parameter profileId is required."); | |
| 8841 } | |
| 8842 if (advertiserIds != null) { | |
| 8843 _queryParams["advertiserIds"] = advertiserIds; | |
| 8844 } | |
| 8845 if (ids != null) { | |
| 8846 _queryParams["ids"] = ids; | |
| 8847 } | |
| 8848 if (maxResults != null) { | |
| 8849 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 8850 } | |
| 8851 if (pageToken != null) { | |
| 8852 _queryParams["pageToken"] = [pageToken]; | |
| 8853 } | |
| 8854 if (searchString != null) { | |
| 8855 _queryParams["searchString"] = [searchString]; | |
| 8856 } | |
| 8857 if (sortField != null) { | |
| 8858 _queryParams["sortField"] = [sortField]; | |
| 8859 } | |
| 8860 if (sortOrder != null) { | |
| 8861 _queryParams["sortOrder"] = [sortOrder]; | |
| 8862 } | |
| 8863 | |
| 8864 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pro
jects'; | |
| 8865 | |
| 8866 var _response = _requester.request(_url, | |
| 8867 "GET", | |
| 8868 body: _body, | |
| 8869 queryParams: _queryParams, | |
| 8870 uploadOptions: _uploadOptions, | |
| 8871 uploadMedia: _uploadMedia, | |
| 8872 downloadOptions: _downloadOptions); | |
| 8873 return _response.then((data) => new ProjectsListResponse.fromJson(data)); | |
| 8874 } | |
| 8875 | |
| 8876 } | |
| 8877 | |
| 8878 | |
| 8879 class RegionsResourceApi { | |
| 8880 final commons.ApiRequester _requester; | |
| 8881 | |
| 8882 RegionsResourceApi(commons.ApiRequester client) : | |
| 8883 _requester = client; | |
| 8884 | |
| 8885 /** | |
| 8886 * Retrieves a list of regions. | |
| 8887 * | |
| 8888 * Request parameters: | |
| 8889 * | |
| 8890 * [profileId] - User profile ID associated with this request. | |
| 8891 * | |
| 8892 * Completes with a [RegionsListResponse]. | |
| 8893 * | |
| 8894 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 8895 * error. | |
| 8896 * | |
| 8897 * If the used [http.Client] completes with an error when making a REST call, | |
| 8898 * this method will complete with the same error. | |
| 8899 */ | |
| 8900 async.Future<RegionsListResponse> list(core.String profileId) { | |
| 8901 var _url = null; | |
| 8902 var _queryParams = new core.Map(); | |
| 8903 var _uploadMedia = null; | |
| 8904 var _uploadOptions = null; | |
| 8905 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 8906 var _body = null; | |
| 8907 | |
| 8908 if (profileId == null) { | |
| 8909 throw new core.ArgumentError("Parameter profileId is required."); | |
| 8910 } | |
| 8911 | |
| 8912 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/reg
ions'; | |
| 8913 | |
| 8914 var _response = _requester.request(_url, | |
| 8915 "GET", | |
| 8916 body: _body, | |
| 8917 queryParams: _queryParams, | |
| 8918 uploadOptions: _uploadOptions, | |
| 8919 uploadMedia: _uploadMedia, | |
| 8920 downloadOptions: _downloadOptions); | |
| 8921 return _response.then((data) => new RegionsListResponse.fromJson(data)); | |
| 8922 } | |
| 8923 | |
| 8924 } | |
| 8925 | |
| 8926 | |
| 8927 class RemarketingListSharesResourceApi { | |
| 8928 final commons.ApiRequester _requester; | |
| 8929 | |
| 8930 RemarketingListSharesResourceApi(commons.ApiRequester client) : | |
| 8931 _requester = client; | |
| 8932 | |
| 8933 /** | |
| 8934 * Gets one remarketing list share by remarketing list ID. | |
| 8935 * | |
| 8936 * Request parameters: | |
| 8937 * | |
| 8938 * [profileId] - User profile ID associated with this request. | |
| 8939 * | |
| 8940 * [remarketingListId] - Remarketing list ID. | |
| 8941 * | |
| 8942 * Completes with a [RemarketingListShare]. | |
| 8943 * | |
| 8944 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 8945 * error. | |
| 8946 * | |
| 8947 * If the used [http.Client] completes with an error when making a REST call, | |
| 8948 * this method will complete with the same error. | |
| 8949 */ | |
| 8950 async.Future<RemarketingListShare> get(core.String profileId, core.String rema
rketingListId) { | |
| 8951 var _url = null; | |
| 8952 var _queryParams = new core.Map(); | |
| 8953 var _uploadMedia = null; | |
| 8954 var _uploadOptions = null; | |
| 8955 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 8956 var _body = null; | |
| 8957 | |
| 8958 if (profileId == null) { | |
| 8959 throw new core.ArgumentError("Parameter profileId is required."); | |
| 8960 } | |
| 8961 if (remarketingListId == null) { | |
| 8962 throw new core.ArgumentError("Parameter remarketingListId is required."); | |
| 8963 } | |
| 8964 | |
| 8965 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rem
arketingListShares/' + commons.Escaper.ecapeVariable('$remarketingListId'); | |
| 8966 | |
| 8967 var _response = _requester.request(_url, | |
| 8968 "GET", | |
| 8969 body: _body, | |
| 8970 queryParams: _queryParams, | |
| 8971 uploadOptions: _uploadOptions, | |
| 8972 uploadMedia: _uploadMedia, | |
| 8973 downloadOptions: _downloadOptions); | |
| 8974 return _response.then((data) => new RemarketingListShare.fromJson(data)); | |
| 8975 } | |
| 8976 | |
| 8977 /** | |
| 8978 * Updates an existing remarketing list share. This method supports patch | |
| 8979 * semantics. | |
| 8980 * | |
| 8981 * [request] - The metadata request object. | |
| 8982 * | |
| 8983 * Request parameters: | |
| 8984 * | |
| 8985 * [profileId] - User profile ID associated with this request. | |
| 8986 * | |
| 8987 * [remarketingListId] - Remarketing list ID. | |
| 8988 * | |
| 8989 * Completes with a [RemarketingListShare]. | |
| 8990 * | |
| 8991 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 8992 * error. | |
| 8993 * | |
| 8994 * If the used [http.Client] completes with an error when making a REST call, | |
| 8995 * this method will complete with the same error. | |
| 8996 */ | |
| 8997 async.Future<RemarketingListShare> patch(RemarketingListShare request, core.St
ring profileId, core.String remarketingListId) { | |
| 8998 var _url = null; | |
| 8999 var _queryParams = new core.Map(); | |
| 9000 var _uploadMedia = null; | |
| 9001 var _uploadOptions = null; | |
| 9002 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 9003 var _body = null; | |
| 9004 | |
| 9005 if (request != null) { | |
| 9006 _body = convert.JSON.encode((request).toJson()); | |
| 9007 } | |
| 9008 if (profileId == null) { | |
| 9009 throw new core.ArgumentError("Parameter profileId is required."); | |
| 9010 } | |
| 9011 if (remarketingListId == null) { | |
| 9012 throw new core.ArgumentError("Parameter remarketingListId is required."); | |
| 9013 } | |
| 9014 _queryParams["remarketingListId"] = [remarketingListId]; | |
| 9015 | |
| 9016 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rem
arketingListShares'; | |
| 9017 | |
| 9018 var _response = _requester.request(_url, | |
| 9019 "PATCH", | |
| 9020 body: _body, | |
| 9021 queryParams: _queryParams, | |
| 9022 uploadOptions: _uploadOptions, | |
| 9023 uploadMedia: _uploadMedia, | |
| 9024 downloadOptions: _downloadOptions); | |
| 9025 return _response.then((data) => new RemarketingListShare.fromJson(data)); | |
| 9026 } | |
| 9027 | |
| 9028 /** | |
| 9029 * Updates an existing remarketing list share. | |
| 9030 * | |
| 9031 * [request] - The metadata request object. | |
| 9032 * | |
| 9033 * Request parameters: | |
| 9034 * | |
| 9035 * [profileId] - User profile ID associated with this request. | |
| 9036 * | |
| 9037 * Completes with a [RemarketingListShare]. | |
| 9038 * | |
| 9039 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 9040 * error. | |
| 9041 * | |
| 9042 * If the used [http.Client] completes with an error when making a REST call, | |
| 9043 * this method will complete with the same error. | |
| 9044 */ | |
| 9045 async.Future<RemarketingListShare> update(RemarketingListShare request, core.S
tring profileId) { | |
| 9046 var _url = null; | |
| 9047 var _queryParams = new core.Map(); | |
| 9048 var _uploadMedia = null; | |
| 9049 var _uploadOptions = null; | |
| 9050 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 9051 var _body = null; | |
| 9052 | |
| 9053 if (request != null) { | |
| 9054 _body = convert.JSON.encode((request).toJson()); | |
| 9055 } | |
| 9056 if (profileId == null) { | |
| 9057 throw new core.ArgumentError("Parameter profileId is required."); | |
| 9058 } | |
| 9059 | |
| 9060 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rem
arketingListShares'; | |
| 9061 | |
| 9062 var _response = _requester.request(_url, | |
| 9063 "PUT", | |
| 9064 body: _body, | |
| 9065 queryParams: _queryParams, | |
| 9066 uploadOptions: _uploadOptions, | |
| 9067 uploadMedia: _uploadMedia, | |
| 9068 downloadOptions: _downloadOptions); | |
| 9069 return _response.then((data) => new RemarketingListShare.fromJson(data)); | |
| 9070 } | |
| 9071 | |
| 9072 } | |
| 9073 | |
| 9074 | |
| 9075 class RemarketingListsResourceApi { | |
| 9076 final commons.ApiRequester _requester; | |
| 9077 | |
| 9078 RemarketingListsResourceApi(commons.ApiRequester client) : | |
| 9079 _requester = client; | |
| 9080 | |
| 9081 /** | |
| 9082 * Gets one remarketing list by ID. | |
| 9083 * | |
| 9084 * Request parameters: | |
| 9085 * | |
| 9086 * [profileId] - User profile ID associated with this request. | |
| 9087 * | |
| 9088 * [id] - Remarketing list ID. | |
| 9089 * | |
| 9090 * Completes with a [RemarketingList]. | |
| 9091 * | |
| 9092 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 9093 * error. | |
| 9094 * | |
| 9095 * If the used [http.Client] completes with an error when making a REST call, | |
| 9096 * this method will complete with the same error. | |
| 9097 */ | |
| 9098 async.Future<RemarketingList> get(core.String profileId, core.String id) { | |
| 9099 var _url = null; | |
| 9100 var _queryParams = new core.Map(); | |
| 9101 var _uploadMedia = null; | |
| 9102 var _uploadOptions = null; | |
| 9103 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 9104 var _body = null; | |
| 9105 | |
| 9106 if (profileId == null) { | |
| 9107 throw new core.ArgumentError("Parameter profileId is required."); | |
| 9108 } | |
| 9109 if (id == null) { | |
| 9110 throw new core.ArgumentError("Parameter id is required."); | |
| 9111 } | |
| 9112 | |
| 9113 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rem
arketingLists/' + commons.Escaper.ecapeVariable('$id'); | |
| 9114 | |
| 9115 var _response = _requester.request(_url, | |
| 9116 "GET", | |
| 9117 body: _body, | |
| 9118 queryParams: _queryParams, | |
| 9119 uploadOptions: _uploadOptions, | |
| 9120 uploadMedia: _uploadMedia, | |
| 9121 downloadOptions: _downloadOptions); | |
| 9122 return _response.then((data) => new RemarketingList.fromJson(data)); | |
| 9123 } | |
| 9124 | |
| 9125 /** | |
| 9126 * Inserts a new remarketing list. | |
| 9127 * | |
| 9128 * [request] - The metadata request object. | |
| 9129 * | |
| 9130 * Request parameters: | |
| 9131 * | |
| 9132 * [profileId] - User profile ID associated with this request. | |
| 9133 * | |
| 9134 * Completes with a [RemarketingList]. | |
| 9135 * | |
| 9136 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 9137 * error. | |
| 9138 * | |
| 9139 * If the used [http.Client] completes with an error when making a REST call, | |
| 9140 * this method will complete with the same error. | |
| 9141 */ | |
| 9142 async.Future<RemarketingList> insert(RemarketingList request, core.String prof
ileId) { | |
| 9143 var _url = null; | |
| 9144 var _queryParams = new core.Map(); | |
| 9145 var _uploadMedia = null; | |
| 9146 var _uploadOptions = null; | |
| 9147 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 9148 var _body = null; | |
| 9149 | |
| 9150 if (request != null) { | |
| 9151 _body = convert.JSON.encode((request).toJson()); | |
| 9152 } | |
| 9153 if (profileId == null) { | |
| 9154 throw new core.ArgumentError("Parameter profileId is required."); | |
| 9155 } | |
| 9156 | |
| 9157 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rem
arketingLists'; | |
| 9158 | |
| 9159 var _response = _requester.request(_url, | |
| 9160 "POST", | |
| 9161 body: _body, | |
| 9162 queryParams: _queryParams, | |
| 9163 uploadOptions: _uploadOptions, | |
| 9164 uploadMedia: _uploadMedia, | |
| 9165 downloadOptions: _downloadOptions); | |
| 9166 return _response.then((data) => new RemarketingList.fromJson(data)); | |
| 9167 } | |
| 9168 | |
| 9169 /** | |
| 9170 * Retrieves a list of remarketing lists, possibly filtered. | |
| 9171 * | |
| 9172 * Request parameters: | |
| 9173 * | |
| 9174 * [profileId] - User profile ID associated with this request. | |
| 9175 * | |
| 9176 * [advertiserId] - Select only remarketing lists owned by this advertiser. | |
| 9177 * | |
| 9178 * [active] - Select only active or only inactive remarketing lists. | |
| 9179 * | |
| 9180 * [floodlightActivityId] - Select only remarketing lists that have this | |
| 9181 * floodlight activity ID. | |
| 9182 * | |
| 9183 * [maxResults] - Maximum number of results to return. | |
| 9184 * | |
| 9185 * [name] - Allows searching for objects by name or ID. Wildcards (*) are | |
| 9186 * allowed. For example, "remarketing list*2015" will return objects with | |
| 9187 * names like "remarketing list June 2015", "remarketing list April 2015", or | |
| 9188 * simply "remarketing list 2015". Most of the searches also add wildcards | |
| 9189 * implicitly at the start and the end of the search string. For example, a | |
| 9190 * search string of "remarketing list" will match objects with name "my | |
| 9191 * remarketing list", "remarketing list 2015", or simply "remarketing list". | |
| 9192 * | |
| 9193 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 9194 * | |
| 9195 * [sortField] - Field by which to sort the list. | |
| 9196 * Possible string values are: | |
| 9197 * - "ID" | |
| 9198 * - "NAME" | |
| 9199 * | |
| 9200 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 9201 * Possible string values are: | |
| 9202 * - "ASCENDING" | |
| 9203 * - "DESCENDING" | |
| 9204 * | |
| 9205 * Completes with a [RemarketingListsListResponse]. | |
| 9206 * | |
| 9207 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 9208 * error. | |
| 9209 * | |
| 9210 * If the used [http.Client] completes with an error when making a REST call, | |
| 9211 * this method will complete with the same error. | |
| 9212 */ | |
| 9213 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}) { | |
| 9214 var _url = null; | |
| 9215 var _queryParams = new core.Map(); | |
| 9216 var _uploadMedia = null; | |
| 9217 var _uploadOptions = null; | |
| 9218 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 9219 var _body = null; | |
| 9220 | |
| 9221 if (profileId == null) { | |
| 9222 throw new core.ArgumentError("Parameter profileId is required."); | |
| 9223 } | |
| 9224 if (advertiserId == null) { | |
| 9225 throw new core.ArgumentError("Parameter advertiserId is required."); | |
| 9226 } | |
| 9227 _queryParams["advertiserId"] = [advertiserId]; | |
| 9228 if (active != null) { | |
| 9229 _queryParams["active"] = ["${active}"]; | |
| 9230 } | |
| 9231 if (floodlightActivityId != null) { | |
| 9232 _queryParams["floodlightActivityId"] = [floodlightActivityId]; | |
| 9233 } | |
| 9234 if (maxResults != null) { | |
| 9235 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 9236 } | |
| 9237 if (name != null) { | |
| 9238 _queryParams["name"] = [name]; | |
| 9239 } | |
| 9240 if (pageToken != null) { | |
| 9241 _queryParams["pageToken"] = [pageToken]; | |
| 9242 } | |
| 9243 if (sortField != null) { | |
| 9244 _queryParams["sortField"] = [sortField]; | |
| 9245 } | |
| 9246 if (sortOrder != null) { | |
| 9247 _queryParams["sortOrder"] = [sortOrder]; | |
| 9248 } | |
| 9249 | |
| 9250 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rem
arketingLists'; | |
| 9251 | |
| 9252 var _response = _requester.request(_url, | |
| 9253 "GET", | |
| 9254 body: _body, | |
| 9255 queryParams: _queryParams, | |
| 9256 uploadOptions: _uploadOptions, | |
| 9257 uploadMedia: _uploadMedia, | |
| 9258 downloadOptions: _downloadOptions); | |
| 9259 return _response.then((data) => new RemarketingListsListResponse.fromJson(da
ta)); | |
| 9260 } | |
| 9261 | |
| 9262 /** | |
| 9263 * Updates an existing remarketing list. This method supports patch semantics. | |
| 9264 * | |
| 9265 * [request] - The metadata request object. | |
| 9266 * | |
| 9267 * Request parameters: | |
| 9268 * | |
| 9269 * [profileId] - User profile ID associated with this request. | |
| 9270 * | |
| 9271 * [id] - Remarketing list ID. | |
| 9272 * | |
| 9273 * Completes with a [RemarketingList]. | |
| 9274 * | |
| 9275 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 9276 * error. | |
| 9277 * | |
| 9278 * If the used [http.Client] completes with an error when making a REST call, | |
| 9279 * this method will complete with the same error. | |
| 9280 */ | |
| 9281 async.Future<RemarketingList> patch(RemarketingList request, core.String profi
leId, core.String id) { | |
| 9282 var _url = null; | |
| 9283 var _queryParams = new core.Map(); | |
| 9284 var _uploadMedia = null; | |
| 9285 var _uploadOptions = null; | |
| 9286 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 9287 var _body = null; | |
| 9288 | |
| 9289 if (request != null) { | |
| 9290 _body = convert.JSON.encode((request).toJson()); | |
| 9291 } | |
| 9292 if (profileId == null) { | |
| 9293 throw new core.ArgumentError("Parameter profileId is required."); | |
| 9294 } | |
| 9295 if (id == null) { | |
| 9296 throw new core.ArgumentError("Parameter id is required."); | |
| 9297 } | |
| 9298 _queryParams["id"] = [id]; | |
| 9299 | |
| 9300 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rem
arketingLists'; | |
| 9301 | |
| 9302 var _response = _requester.request(_url, | |
| 9303 "PATCH", | |
| 9304 body: _body, | |
| 9305 queryParams: _queryParams, | |
| 9306 uploadOptions: _uploadOptions, | |
| 9307 uploadMedia: _uploadMedia, | |
| 9308 downloadOptions: _downloadOptions); | |
| 9309 return _response.then((data) => new RemarketingList.fromJson(data)); | |
| 9310 } | |
| 9311 | |
| 9312 /** | |
| 9313 * Updates an existing remarketing list. | |
| 9314 * | |
| 9315 * [request] - The metadata request object. | |
| 9316 * | |
| 9317 * Request parameters: | |
| 9318 * | |
| 9319 * [profileId] - User profile ID associated with this request. | |
| 9320 * | |
| 9321 * Completes with a [RemarketingList]. | |
| 9322 * | |
| 9323 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 9324 * error. | |
| 9325 * | |
| 9326 * If the used [http.Client] completes with an error when making a REST call, | |
| 9327 * this method will complete with the same error. | |
| 9328 */ | |
| 9329 async.Future<RemarketingList> update(RemarketingList request, core.String prof
ileId) { | |
| 9330 var _url = null; | |
| 9331 var _queryParams = new core.Map(); | |
| 9332 var _uploadMedia = null; | |
| 9333 var _uploadOptions = null; | |
| 9334 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 9335 var _body = null; | |
| 9336 | |
| 9337 if (request != null) { | |
| 9338 _body = convert.JSON.encode((request).toJson()); | |
| 9339 } | |
| 9340 if (profileId == null) { | |
| 9341 throw new core.ArgumentError("Parameter profileId is required."); | |
| 9342 } | |
| 9343 | |
| 9344 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rem
arketingLists'; | |
| 9345 | |
| 9346 var _response = _requester.request(_url, | |
| 9347 "PUT", | |
| 9348 body: _body, | |
| 9349 queryParams: _queryParams, | |
| 9350 uploadOptions: _uploadOptions, | |
| 9351 uploadMedia: _uploadMedia, | |
| 9352 downloadOptions: _downloadOptions); | |
| 9353 return _response.then((data) => new RemarketingList.fromJson(data)); | |
| 9354 } | |
| 9355 | |
| 9356 } | |
| 9357 | |
| 9358 | |
| 9359 class ReportsResourceApi { | |
| 9360 final commons.ApiRequester _requester; | |
| 9361 | |
| 9362 ReportsCompatibleFieldsResourceApi get compatibleFields => new ReportsCompatib
leFieldsResourceApi(_requester); | |
| 9363 ReportsFilesResourceApi get files => new ReportsFilesResourceApi(_requester); | |
| 9364 | |
| 9365 ReportsResourceApi(commons.ApiRequester client) : | |
| 9366 _requester = client; | |
| 9367 | |
| 9368 /** | |
| 9369 * Deletes a report by its ID. | |
| 9370 * | |
| 9371 * Request parameters: | |
| 9372 * | |
| 9373 * [profileId] - The DFA user profile ID. | |
| 9374 * | |
| 9375 * [reportId] - The ID of the report. | |
| 9376 * | |
| 9377 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 9378 * error. | |
| 9379 * | |
| 9380 * If the used [http.Client] completes with an error when making a REST call, | |
| 9381 * this method will complete with the same error. | |
| 9382 */ | |
| 9383 async.Future delete(core.String profileId, core.String reportId) { | |
| 9384 var _url = null; | |
| 9385 var _queryParams = new core.Map(); | |
| 9386 var _uploadMedia = null; | |
| 9387 var _uploadOptions = null; | |
| 9388 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 9389 var _body = null; | |
| 9390 | |
| 9391 if (profileId == null) { | |
| 9392 throw new core.ArgumentError("Parameter profileId is required."); | |
| 9393 } | |
| 9394 if (reportId == null) { | |
| 9395 throw new core.ArgumentError("Parameter reportId is required."); | |
| 9396 } | |
| 9397 | |
| 9398 _downloadOptions = null; | |
| 9399 | |
| 9400 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rep
orts/' + commons.Escaper.ecapeVariable('$reportId'); | |
| 9401 | |
| 9402 var _response = _requester.request(_url, | |
| 9403 "DELETE", | |
| 9404 body: _body, | |
| 9405 queryParams: _queryParams, | |
| 9406 uploadOptions: _uploadOptions, | |
| 9407 uploadMedia: _uploadMedia, | |
| 9408 downloadOptions: _downloadOptions); | |
| 9409 return _response.then((data) => null); | |
| 9410 } | |
| 9411 | |
| 9412 /** | |
| 9413 * Retrieves a report by its ID. | |
| 9414 * | |
| 9415 * Request parameters: | |
| 9416 * | |
| 9417 * [profileId] - The DFA user profile ID. | |
| 9418 * | |
| 9419 * [reportId] - The ID of the report. | |
| 9420 * | |
| 9421 * Completes with a [Report]. | |
| 9422 * | |
| 9423 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 9424 * error. | |
| 9425 * | |
| 9426 * If the used [http.Client] completes with an error when making a REST call, | |
| 9427 * this method will complete with the same error. | |
| 9428 */ | |
| 9429 async.Future<Report> get(core.String profileId, core.String reportId) { | |
| 9430 var _url = null; | |
| 9431 var _queryParams = new core.Map(); | |
| 9432 var _uploadMedia = null; | |
| 9433 var _uploadOptions = null; | |
| 9434 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 9435 var _body = null; | |
| 9436 | |
| 9437 if (profileId == null) { | |
| 9438 throw new core.ArgumentError("Parameter profileId is required."); | |
| 9439 } | |
| 9440 if (reportId == null) { | |
| 9441 throw new core.ArgumentError("Parameter reportId is required."); | |
| 9442 } | |
| 9443 | |
| 9444 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rep
orts/' + commons.Escaper.ecapeVariable('$reportId'); | |
| 9445 | |
| 9446 var _response = _requester.request(_url, | |
| 9447 "GET", | |
| 9448 body: _body, | |
| 9449 queryParams: _queryParams, | |
| 9450 uploadOptions: _uploadOptions, | |
| 9451 uploadMedia: _uploadMedia, | |
| 9452 downloadOptions: _downloadOptions); | |
| 9453 return _response.then((data) => new Report.fromJson(data)); | |
| 9454 } | |
| 9455 | |
| 9456 /** | |
| 9457 * Creates a report. | |
| 9458 * | |
| 9459 * [request] - The metadata request object. | |
| 9460 * | |
| 9461 * Request parameters: | |
| 9462 * | |
| 9463 * [profileId] - The DFA user profile ID. | |
| 9464 * | |
| 9465 * Completes with a [Report]. | |
| 9466 * | |
| 9467 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 9468 * error. | |
| 9469 * | |
| 9470 * If the used [http.Client] completes with an error when making a REST call, | |
| 9471 * this method will complete with the same error. | |
| 9472 */ | |
| 9473 async.Future<Report> insert(Report request, core.String profileId) { | |
| 9474 var _url = null; | |
| 9475 var _queryParams = new core.Map(); | |
| 9476 var _uploadMedia = null; | |
| 9477 var _uploadOptions = null; | |
| 9478 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 9479 var _body = null; | |
| 9480 | |
| 9481 if (request != null) { | |
| 9482 _body = convert.JSON.encode((request).toJson()); | |
| 9483 } | |
| 9484 if (profileId == null) { | |
| 9485 throw new core.ArgumentError("Parameter profileId is required."); | |
| 9486 } | |
| 9487 | |
| 9488 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rep
orts'; | |
| 9489 | |
| 9490 var _response = _requester.request(_url, | |
| 9491 "POST", | |
| 9492 body: _body, | |
| 9493 queryParams: _queryParams, | |
| 9494 uploadOptions: _uploadOptions, | |
| 9495 uploadMedia: _uploadMedia, | |
| 9496 downloadOptions: _downloadOptions); | |
| 9497 return _response.then((data) => new Report.fromJson(data)); | |
| 9498 } | |
| 9499 | |
| 9500 /** | |
| 9501 * Retrieves list of reports. | |
| 9502 * | |
| 9503 * Request parameters: | |
| 9504 * | |
| 9505 * [profileId] - The DFA user profile ID. | |
| 9506 * | |
| 9507 * [maxResults] - Maximum number of results to return. | |
| 9508 * Value must be between "0" and "10". | |
| 9509 * | |
| 9510 * [pageToken] - The value of the nextToken from the previous result page. | |
| 9511 * | |
| 9512 * [scope] - The scope that defines which results are returned, default is | |
| 9513 * 'MINE'. | |
| 9514 * Possible string values are: | |
| 9515 * - "ALL" : All reports in account. | |
| 9516 * - "MINE" : My reports. | |
| 9517 * | |
| 9518 * [sortField] - The field by which to sort the list. | |
| 9519 * Possible string values are: | |
| 9520 * - "ID" : Sort by report ID. | |
| 9521 * - "LAST_MODIFIED_TIME" : Sort by 'lastModifiedTime' field. | |
| 9522 * - "NAME" : Sort by name of reports. | |
| 9523 * | |
| 9524 * [sortOrder] - Order of sorted results, default is 'DESCENDING'. | |
| 9525 * Possible string values are: | |
| 9526 * - "ASCENDING" : Ascending order. | |
| 9527 * - "DESCENDING" : Descending order. | |
| 9528 * | |
| 9529 * Completes with a [ReportList]. | |
| 9530 * | |
| 9531 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 9532 * error. | |
| 9533 * | |
| 9534 * If the used [http.Client] completes with an error when making a REST call, | |
| 9535 * this method will complete with the same error. | |
| 9536 */ | |
| 9537 async.Future<ReportList> list(core.String profileId, {core.int maxResults, cor
e.String pageToken, core.String scope, core.String sortField, core.String sortOr
der}) { | |
| 9538 var _url = null; | |
| 9539 var _queryParams = new core.Map(); | |
| 9540 var _uploadMedia = null; | |
| 9541 var _uploadOptions = null; | |
| 9542 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 9543 var _body = null; | |
| 9544 | |
| 9545 if (profileId == null) { | |
| 9546 throw new core.ArgumentError("Parameter profileId is required."); | |
| 9547 } | |
| 9548 if (maxResults != null) { | |
| 9549 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 9550 } | |
| 9551 if (pageToken != null) { | |
| 9552 _queryParams["pageToken"] = [pageToken]; | |
| 9553 } | |
| 9554 if (scope != null) { | |
| 9555 _queryParams["scope"] = [scope]; | |
| 9556 } | |
| 9557 if (sortField != null) { | |
| 9558 _queryParams["sortField"] = [sortField]; | |
| 9559 } | |
| 9560 if (sortOrder != null) { | |
| 9561 _queryParams["sortOrder"] = [sortOrder]; | |
| 9562 } | |
| 9563 | |
| 9564 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rep
orts'; | |
| 9565 | |
| 9566 var _response = _requester.request(_url, | |
| 9567 "GET", | |
| 9568 body: _body, | |
| 9569 queryParams: _queryParams, | |
| 9570 uploadOptions: _uploadOptions, | |
| 9571 uploadMedia: _uploadMedia, | |
| 9572 downloadOptions: _downloadOptions); | |
| 9573 return _response.then((data) => new ReportList.fromJson(data)); | |
| 9574 } | |
| 9575 | |
| 9576 /** | |
| 9577 * Updates a report. This method supports patch semantics. | |
| 9578 * | |
| 9579 * [request] - The metadata request object. | |
| 9580 * | |
| 9581 * Request parameters: | |
| 9582 * | |
| 9583 * [profileId] - The DFA user profile ID. | |
| 9584 * | |
| 9585 * [reportId] - The ID of the report. | |
| 9586 * | |
| 9587 * Completes with a [Report]. | |
| 9588 * | |
| 9589 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 9590 * error. | |
| 9591 * | |
| 9592 * If the used [http.Client] completes with an error when making a REST call, | |
| 9593 * this method will complete with the same error. | |
| 9594 */ | |
| 9595 async.Future<Report> patch(Report request, core.String profileId, core.String
reportId) { | |
| 9596 var _url = null; | |
| 9597 var _queryParams = new core.Map(); | |
| 9598 var _uploadMedia = null; | |
| 9599 var _uploadOptions = null; | |
| 9600 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 9601 var _body = null; | |
| 9602 | |
| 9603 if (request != null) { | |
| 9604 _body = convert.JSON.encode((request).toJson()); | |
| 9605 } | |
| 9606 if (profileId == null) { | |
| 9607 throw new core.ArgumentError("Parameter profileId is required."); | |
| 9608 } | |
| 9609 if (reportId == null) { | |
| 9610 throw new core.ArgumentError("Parameter reportId is required."); | |
| 9611 } | |
| 9612 | |
| 9613 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rep
orts/' + commons.Escaper.ecapeVariable('$reportId'); | |
| 9614 | |
| 9615 var _response = _requester.request(_url, | |
| 9616 "PATCH", | |
| 9617 body: _body, | |
| 9618 queryParams: _queryParams, | |
| 9619 uploadOptions: _uploadOptions, | |
| 9620 uploadMedia: _uploadMedia, | |
| 9621 downloadOptions: _downloadOptions); | |
| 9622 return _response.then((data) => new Report.fromJson(data)); | |
| 9623 } | |
| 9624 | |
| 9625 /** | |
| 9626 * Runs a report. | |
| 9627 * | |
| 9628 * Request parameters: | |
| 9629 * | |
| 9630 * [profileId] - The DFA profile ID. | |
| 9631 * | |
| 9632 * [reportId] - The ID of the report. | |
| 9633 * | |
| 9634 * [synchronous] - If set and true, tries to run the report synchronously. | |
| 9635 * | |
| 9636 * Completes with a [File]. | |
| 9637 * | |
| 9638 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 9639 * error. | |
| 9640 * | |
| 9641 * If the used [http.Client] completes with an error when making a REST call, | |
| 9642 * this method will complete with the same error. | |
| 9643 */ | |
| 9644 async.Future<File> run(core.String profileId, core.String reportId, {core.bool
synchronous}) { | |
| 9645 var _url = null; | |
| 9646 var _queryParams = new core.Map(); | |
| 9647 var _uploadMedia = null; | |
| 9648 var _uploadOptions = null; | |
| 9649 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 9650 var _body = null; | |
| 9651 | |
| 9652 if (profileId == null) { | |
| 9653 throw new core.ArgumentError("Parameter profileId is required."); | |
| 9654 } | |
| 9655 if (reportId == null) { | |
| 9656 throw new core.ArgumentError("Parameter reportId is required."); | |
| 9657 } | |
| 9658 if (synchronous != null) { | |
| 9659 _queryParams["synchronous"] = ["${synchronous}"]; | |
| 9660 } | |
| 9661 | |
| 9662 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rep
orts/' + commons.Escaper.ecapeVariable('$reportId') + '/run'; | |
| 9663 | |
| 9664 var _response = _requester.request(_url, | |
| 9665 "POST", | |
| 9666 body: _body, | |
| 9667 queryParams: _queryParams, | |
| 9668 uploadOptions: _uploadOptions, | |
| 9669 uploadMedia: _uploadMedia, | |
| 9670 downloadOptions: _downloadOptions); | |
| 9671 return _response.then((data) => new File.fromJson(data)); | |
| 9672 } | |
| 9673 | |
| 9674 /** | |
| 9675 * Updates a report. | |
| 9676 * | |
| 9677 * [request] - The metadata request object. | |
| 9678 * | |
| 9679 * Request parameters: | |
| 9680 * | |
| 9681 * [profileId] - The DFA user profile ID. | |
| 9682 * | |
| 9683 * [reportId] - The ID of the report. | |
| 9684 * | |
| 9685 * Completes with a [Report]. | |
| 9686 * | |
| 9687 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 9688 * error. | |
| 9689 * | |
| 9690 * If the used [http.Client] completes with an error when making a REST call, | |
| 9691 * this method will complete with the same error. | |
| 9692 */ | |
| 9693 async.Future<Report> update(Report request, core.String profileId, core.String
reportId) { | |
| 9694 var _url = null; | |
| 9695 var _queryParams = new core.Map(); | |
| 9696 var _uploadMedia = null; | |
| 9697 var _uploadOptions = null; | |
| 9698 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 9699 var _body = null; | |
| 9700 | |
| 9701 if (request != null) { | |
| 9702 _body = convert.JSON.encode((request).toJson()); | |
| 9703 } | |
| 9704 if (profileId == null) { | |
| 9705 throw new core.ArgumentError("Parameter profileId is required."); | |
| 9706 } | |
| 9707 if (reportId == null) { | |
| 9708 throw new core.ArgumentError("Parameter reportId is required."); | |
| 9709 } | |
| 9710 | |
| 9711 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rep
orts/' + commons.Escaper.ecapeVariable('$reportId'); | |
| 9712 | |
| 9713 var _response = _requester.request(_url, | |
| 9714 "PUT", | |
| 9715 body: _body, | |
| 9716 queryParams: _queryParams, | |
| 9717 uploadOptions: _uploadOptions, | |
| 9718 uploadMedia: _uploadMedia, | |
| 9719 downloadOptions: _downloadOptions); | |
| 9720 return _response.then((data) => new Report.fromJson(data)); | |
| 9721 } | |
| 9722 | |
| 9723 } | |
| 9724 | |
| 9725 | |
| 9726 class ReportsCompatibleFieldsResourceApi { | |
| 9727 final commons.ApiRequester _requester; | |
| 9728 | |
| 9729 ReportsCompatibleFieldsResourceApi(commons.ApiRequester client) : | |
| 9730 _requester = client; | |
| 9731 | |
| 9732 /** | |
| 9733 * Returns the fields that are compatible to be selected in the respective | |
| 9734 * sections of a report criteria, given the fields already selected in the | |
| 9735 * input report and user permissions. | |
| 9736 * | |
| 9737 * [request] - The metadata request object. | |
| 9738 * | |
| 9739 * Request parameters: | |
| 9740 * | |
| 9741 * [profileId] - The DFA user profile ID. | |
| 9742 * | |
| 9743 * Completes with a [CompatibleFields]. | |
| 9744 * | |
| 9745 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 9746 * error. | |
| 9747 * | |
| 9748 * If the used [http.Client] completes with an error when making a REST call, | |
| 9749 * this method will complete with the same error. | |
| 9750 */ | |
| 9751 async.Future<CompatibleFields> query(Report request, core.String profileId) { | |
| 9752 var _url = null; | |
| 9753 var _queryParams = new core.Map(); | |
| 9754 var _uploadMedia = null; | |
| 9755 var _uploadOptions = null; | |
| 9756 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 9757 var _body = null; | |
| 9758 | |
| 9759 if (request != null) { | |
| 9760 _body = convert.JSON.encode((request).toJson()); | |
| 9761 } | |
| 9762 if (profileId == null) { | |
| 9763 throw new core.ArgumentError("Parameter profileId is required."); | |
| 9764 } | |
| 9765 | |
| 9766 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rep
orts/compatiblefields/query'; | |
| 9767 | |
| 9768 var _response = _requester.request(_url, | |
| 9769 "POST", | |
| 9770 body: _body, | |
| 9771 queryParams: _queryParams, | |
| 9772 uploadOptions: _uploadOptions, | |
| 9773 uploadMedia: _uploadMedia, | |
| 9774 downloadOptions: _downloadOptions); | |
| 9775 return _response.then((data) => new CompatibleFields.fromJson(data)); | |
| 9776 } | |
| 9777 | |
| 9778 } | |
| 9779 | |
| 9780 | |
| 9781 class ReportsFilesResourceApi { | |
| 9782 final commons.ApiRequester _requester; | |
| 9783 | |
| 9784 ReportsFilesResourceApi(commons.ApiRequester client) : | |
| 9785 _requester = client; | |
| 9786 | |
| 9787 /** | |
| 9788 * Retrieves a report file. | |
| 9789 * | |
| 9790 * Request parameters: | |
| 9791 * | |
| 9792 * [profileId] - The DFA profile ID. | |
| 9793 * | |
| 9794 * [reportId] - The ID of the report. | |
| 9795 * | |
| 9796 * [fileId] - The ID of the report file. | |
| 9797 * | |
| 9798 * [downloadOptions] - Options for downloading. A download can be either a | |
| 9799 * Metadata (default) or Media download. Partial Media downloads are possible | |
| 9800 * as well. | |
| 9801 * | |
| 9802 * Completes with a | |
| 9803 * | |
| 9804 * - [File] for Metadata downloads (see [downloadOptions]). | |
| 9805 * | |
| 9806 * - [commons.Media] for Media downloads (see [downloadOptions]). | |
| 9807 * | |
| 9808 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 9809 * error. | |
| 9810 * | |
| 9811 * If the used [http.Client] completes with an error when making a REST call, | |
| 9812 * this method will complete with the same error. | |
| 9813 */ | |
| 9814 async.Future get(core.String profileId, core.String reportId, core.String file
Id, {commons.DownloadOptions downloadOptions: commons.DownloadOptions.Metadata})
{ | |
| 9815 var _url = null; | |
| 9816 var _queryParams = new core.Map(); | |
| 9817 var _uploadMedia = null; | |
| 9818 var _uploadOptions = null; | |
| 9819 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 9820 var _body = null; | |
| 9821 | |
| 9822 if (profileId == null) { | |
| 9823 throw new core.ArgumentError("Parameter profileId is required."); | |
| 9824 } | |
| 9825 if (reportId == null) { | |
| 9826 throw new core.ArgumentError("Parameter reportId is required."); | |
| 9827 } | |
| 9828 if (fileId == null) { | |
| 9829 throw new core.ArgumentError("Parameter fileId is required."); | |
| 9830 } | |
| 9831 | |
| 9832 _downloadOptions = downloadOptions; | |
| 9833 | |
| 9834 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rep
orts/' + commons.Escaper.ecapeVariable('$reportId') + '/files/' + commons.Escape
r.ecapeVariable('$fileId'); | |
| 9835 | |
| 9836 var _response = _requester.request(_url, | |
| 9837 "GET", | |
| 9838 body: _body, | |
| 9839 queryParams: _queryParams, | |
| 9840 uploadOptions: _uploadOptions, | |
| 9841 uploadMedia: _uploadMedia, | |
| 9842 downloadOptions: _downloadOptions); | |
| 9843 if (_downloadOptions == null || | |
| 9844 _downloadOptions == commons.DownloadOptions.Metadata) { | |
| 9845 return _response.then((data) => new File.fromJson(data)); | |
| 9846 } else { | |
| 9847 return _response; | |
| 9848 } | |
| 9849 } | |
| 9850 | |
| 9851 /** | |
| 9852 * Lists files for a report. | |
| 9853 * | |
| 9854 * Request parameters: | |
| 9855 * | |
| 9856 * [profileId] - The DFA profile ID. | |
| 9857 * | |
| 9858 * [reportId] - The ID of the parent report. | |
| 9859 * | |
| 9860 * [maxResults] - Maximum number of results to return. | |
| 9861 * Value must be between "0" and "10". | |
| 9862 * | |
| 9863 * [pageToken] - The value of the nextToken from the previous result page. | |
| 9864 * | |
| 9865 * [sortField] - The field by which to sort the list. | |
| 9866 * Possible string values are: | |
| 9867 * - "ID" : Sort by file ID. | |
| 9868 * - "LAST_MODIFIED_TIME" : Sort by 'lastmodifiedAt' field. | |
| 9869 * | |
| 9870 * [sortOrder] - Order of sorted results, default is 'DESCENDING'. | |
| 9871 * Possible string values are: | |
| 9872 * - "ASCENDING" : Ascending order. | |
| 9873 * - "DESCENDING" : Descending order. | |
| 9874 * | |
| 9875 * Completes with a [FileList]. | |
| 9876 * | |
| 9877 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 9878 * error. | |
| 9879 * | |
| 9880 * If the used [http.Client] completes with an error when making a REST call, | |
| 9881 * this method will complete with the same error. | |
| 9882 */ | |
| 9883 async.Future<FileList> list(core.String profileId, core.String reportId, {core
.int maxResults, core.String pageToken, core.String sortField, core.String sortO
rder}) { | |
| 9884 var _url = null; | |
| 9885 var _queryParams = new core.Map(); | |
| 9886 var _uploadMedia = null; | |
| 9887 var _uploadOptions = null; | |
| 9888 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 9889 var _body = null; | |
| 9890 | |
| 9891 if (profileId == null) { | |
| 9892 throw new core.ArgumentError("Parameter profileId is required."); | |
| 9893 } | |
| 9894 if (reportId == null) { | |
| 9895 throw new core.ArgumentError("Parameter reportId is required."); | |
| 9896 } | |
| 9897 if (maxResults != null) { | |
| 9898 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 9899 } | |
| 9900 if (pageToken != null) { | |
| 9901 _queryParams["pageToken"] = [pageToken]; | |
| 9902 } | |
| 9903 if (sortField != null) { | |
| 9904 _queryParams["sortField"] = [sortField]; | |
| 9905 } | |
| 9906 if (sortOrder != null) { | |
| 9907 _queryParams["sortOrder"] = [sortOrder]; | |
| 9908 } | |
| 9909 | |
| 9910 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rep
orts/' + commons.Escaper.ecapeVariable('$reportId') + '/files'; | |
| 9911 | |
| 9912 var _response = _requester.request(_url, | |
| 9913 "GET", | |
| 9914 body: _body, | |
| 9915 queryParams: _queryParams, | |
| 9916 uploadOptions: _uploadOptions, | |
| 9917 uploadMedia: _uploadMedia, | |
| 9918 downloadOptions: _downloadOptions); | |
| 9919 return _response.then((data) => new FileList.fromJson(data)); | |
| 9920 } | |
| 9921 | |
| 9922 } | |
| 9923 | |
| 9924 | |
| 9925 class SitesResourceApi { | |
| 9926 final commons.ApiRequester _requester; | |
| 9927 | |
| 9928 SitesResourceApi(commons.ApiRequester client) : | |
| 9929 _requester = client; | |
| 9930 | |
| 9931 /** | |
| 9932 * Gets one site by ID. | |
| 9933 * | |
| 9934 * Request parameters: | |
| 9935 * | |
| 9936 * [profileId] - User profile ID associated with this request. | |
| 9937 * | |
| 9938 * [id] - Site ID. | |
| 9939 * | |
| 9940 * Completes with a [Site]. | |
| 9941 * | |
| 9942 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 9943 * error. | |
| 9944 * | |
| 9945 * If the used [http.Client] completes with an error when making a REST call, | |
| 9946 * this method will complete with the same error. | |
| 9947 */ | |
| 9948 async.Future<Site> get(core.String profileId, core.String id) { | |
| 9949 var _url = null; | |
| 9950 var _queryParams = new core.Map(); | |
| 9951 var _uploadMedia = null; | |
| 9952 var _uploadOptions = null; | |
| 9953 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 9954 var _body = null; | |
| 9955 | |
| 9956 if (profileId == null) { | |
| 9957 throw new core.ArgumentError("Parameter profileId is required."); | |
| 9958 } | |
| 9959 if (id == null) { | |
| 9960 throw new core.ArgumentError("Parameter id is required."); | |
| 9961 } | |
| 9962 | |
| 9963 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/sit
es/' + commons.Escaper.ecapeVariable('$id'); | |
| 9964 | |
| 9965 var _response = _requester.request(_url, | |
| 9966 "GET", | |
| 9967 body: _body, | |
| 9968 queryParams: _queryParams, | |
| 9969 uploadOptions: _uploadOptions, | |
| 9970 uploadMedia: _uploadMedia, | |
| 9971 downloadOptions: _downloadOptions); | |
| 9972 return _response.then((data) => new Site.fromJson(data)); | |
| 9973 } | |
| 9974 | |
| 9975 /** | |
| 9976 * Inserts a new site. | |
| 9977 * | |
| 9978 * [request] - The metadata request object. | |
| 9979 * | |
| 9980 * Request parameters: | |
| 9981 * | |
| 9982 * [profileId] - User profile ID associated with this request. | |
| 9983 * | |
| 9984 * Completes with a [Site]. | |
| 9985 * | |
| 9986 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 9987 * error. | |
| 9988 * | |
| 9989 * If the used [http.Client] completes with an error when making a REST call, | |
| 9990 * this method will complete with the same error. | |
| 9991 */ | |
| 9992 async.Future<Site> insert(Site request, core.String profileId) { | |
| 9993 var _url = null; | |
| 9994 var _queryParams = new core.Map(); | |
| 9995 var _uploadMedia = null; | |
| 9996 var _uploadOptions = null; | |
| 9997 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 9998 var _body = null; | |
| 9999 | |
| 10000 if (request != null) { | |
| 10001 _body = convert.JSON.encode((request).toJson()); | |
| 10002 } | |
| 10003 if (profileId == null) { | |
| 10004 throw new core.ArgumentError("Parameter profileId is required."); | |
| 10005 } | |
| 10006 | |
| 10007 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/sit
es'; | |
| 10008 | |
| 10009 var _response = _requester.request(_url, | |
| 10010 "POST", | |
| 10011 body: _body, | |
| 10012 queryParams: _queryParams, | |
| 10013 uploadOptions: _uploadOptions, | |
| 10014 uploadMedia: _uploadMedia, | |
| 10015 downloadOptions: _downloadOptions); | |
| 10016 return _response.then((data) => new Site.fromJson(data)); | |
| 10017 } | |
| 10018 | |
| 10019 /** | |
| 10020 * Retrieves a list of sites, possibly filtered. | |
| 10021 * | |
| 10022 * Request parameters: | |
| 10023 * | |
| 10024 * [profileId] - User profile ID associated with this request. | |
| 10025 * | |
| 10026 * [acceptsInStreamVideoPlacements] - This search filter is no longer | |
| 10027 * supported and will have no effect on the results returned. | |
| 10028 * | |
| 10029 * [acceptsInterstitialPlacements] - This search filter is no longer supported | |
| 10030 * and will have no effect on the results returned. | |
| 10031 * | |
| 10032 * [acceptsPublisherPaidPlacements] - Select only sites that accept publisher | |
| 10033 * paid placements. | |
| 10034 * | |
| 10035 * [adWordsSite] - Select only AdWords sites. | |
| 10036 * | |
| 10037 * [approved] - Select only approved sites. | |
| 10038 * | |
| 10039 * [campaignIds] - Select only sites with these campaign IDs. | |
| 10040 * | |
| 10041 * [directorySiteIds] - Select only sites with these directory site IDs. | |
| 10042 * | |
| 10043 * [ids] - Select only sites with these IDs. | |
| 10044 * | |
| 10045 * [maxResults] - Maximum number of results to return. | |
| 10046 * | |
| 10047 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 10048 * | |
| 10049 * [searchString] - Allows searching for objects by name, ID or keyName. | |
| 10050 * Wildcards (*) are allowed. For example, "site*2015" will return objects | |
| 10051 * with names like "site June 2015", "site April 2015", or simply "site 2015". | |
| 10052 * Most of the searches also add wildcards implicitly at the start and the end | |
| 10053 * of the search string. For example, a search string of "site" will match | |
| 10054 * objects with name "my site", "site 2015", or simply "site". | |
| 10055 * | |
| 10056 * [sortField] - Field by which to sort the list. | |
| 10057 * Possible string values are: | |
| 10058 * - "ID" | |
| 10059 * - "NAME" | |
| 10060 * | |
| 10061 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 10062 * Possible string values are: | |
| 10063 * - "ASCENDING" | |
| 10064 * - "DESCENDING" | |
| 10065 * | |
| 10066 * [subaccountId] - Select only sites with this subaccount ID. | |
| 10067 * | |
| 10068 * [unmappedSite] - Select only sites that have not been mapped to a directory | |
| 10069 * site. | |
| 10070 * | |
| 10071 * Completes with a [SitesListResponse]. | |
| 10072 * | |
| 10073 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 10074 * error. | |
| 10075 * | |
| 10076 * If the used [http.Client] completes with an error when making a REST call, | |
| 10077 * this method will complete with the same error. | |
| 10078 */ | |
| 10079 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}) { | |
| 10080 var _url = null; | |
| 10081 var _queryParams = new core.Map(); | |
| 10082 var _uploadMedia = null; | |
| 10083 var _uploadOptions = null; | |
| 10084 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 10085 var _body = null; | |
| 10086 | |
| 10087 if (profileId == null) { | |
| 10088 throw new core.ArgumentError("Parameter profileId is required."); | |
| 10089 } | |
| 10090 if (acceptsInStreamVideoPlacements != null) { | |
| 10091 _queryParams["acceptsInStreamVideoPlacements"] = ["${acceptsInStreamVideoP
lacements}"]; | |
| 10092 } | |
| 10093 if (acceptsInterstitialPlacements != null) { | |
| 10094 _queryParams["acceptsInterstitialPlacements"] = ["${acceptsInterstitialPla
cements}"]; | |
| 10095 } | |
| 10096 if (acceptsPublisherPaidPlacements != null) { | |
| 10097 _queryParams["acceptsPublisherPaidPlacements"] = ["${acceptsPublisherPaidP
lacements}"]; | |
| 10098 } | |
| 10099 if (adWordsSite != null) { | |
| 10100 _queryParams["adWordsSite"] = ["${adWordsSite}"]; | |
| 10101 } | |
| 10102 if (approved != null) { | |
| 10103 _queryParams["approved"] = ["${approved}"]; | |
| 10104 } | |
| 10105 if (campaignIds != null) { | |
| 10106 _queryParams["campaignIds"] = campaignIds; | |
| 10107 } | |
| 10108 if (directorySiteIds != null) { | |
| 10109 _queryParams["directorySiteIds"] = directorySiteIds; | |
| 10110 } | |
| 10111 if (ids != null) { | |
| 10112 _queryParams["ids"] = ids; | |
| 10113 } | |
| 10114 if (maxResults != null) { | |
| 10115 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 10116 } | |
| 10117 if (pageToken != null) { | |
| 10118 _queryParams["pageToken"] = [pageToken]; | |
| 10119 } | |
| 10120 if (searchString != null) { | |
| 10121 _queryParams["searchString"] = [searchString]; | |
| 10122 } | |
| 10123 if (sortField != null) { | |
| 10124 _queryParams["sortField"] = [sortField]; | |
| 10125 } | |
| 10126 if (sortOrder != null) { | |
| 10127 _queryParams["sortOrder"] = [sortOrder]; | |
| 10128 } | |
| 10129 if (subaccountId != null) { | |
| 10130 _queryParams["subaccountId"] = [subaccountId]; | |
| 10131 } | |
| 10132 if (unmappedSite != null) { | |
| 10133 _queryParams["unmappedSite"] = ["${unmappedSite}"]; | |
| 10134 } | |
| 10135 | |
| 10136 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/sit
es'; | |
| 10137 | |
| 10138 var _response = _requester.request(_url, | |
| 10139 "GET", | |
| 10140 body: _body, | |
| 10141 queryParams: _queryParams, | |
| 10142 uploadOptions: _uploadOptions, | |
| 10143 uploadMedia: _uploadMedia, | |
| 10144 downloadOptions: _downloadOptions); | |
| 10145 return _response.then((data) => new SitesListResponse.fromJson(data)); | |
| 10146 } | |
| 10147 | |
| 10148 /** | |
| 10149 * Updates an existing site. This method supports patch semantics. | |
| 10150 * | |
| 10151 * [request] - The metadata request object. | |
| 10152 * | |
| 10153 * Request parameters: | |
| 10154 * | |
| 10155 * [profileId] - User profile ID associated with this request. | |
| 10156 * | |
| 10157 * [id] - Site ID. | |
| 10158 * | |
| 10159 * Completes with a [Site]. | |
| 10160 * | |
| 10161 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 10162 * error. | |
| 10163 * | |
| 10164 * If the used [http.Client] completes with an error when making a REST call, | |
| 10165 * this method will complete with the same error. | |
| 10166 */ | |
| 10167 async.Future<Site> patch(Site request, core.String profileId, core.String id)
{ | |
| 10168 var _url = null; | |
| 10169 var _queryParams = new core.Map(); | |
| 10170 var _uploadMedia = null; | |
| 10171 var _uploadOptions = null; | |
| 10172 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 10173 var _body = null; | |
| 10174 | |
| 10175 if (request != null) { | |
| 10176 _body = convert.JSON.encode((request).toJson()); | |
| 10177 } | |
| 10178 if (profileId == null) { | |
| 10179 throw new core.ArgumentError("Parameter profileId is required."); | |
| 10180 } | |
| 10181 if (id == null) { | |
| 10182 throw new core.ArgumentError("Parameter id is required."); | |
| 10183 } | |
| 10184 _queryParams["id"] = [id]; | |
| 10185 | |
| 10186 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/sit
es'; | |
| 10187 | |
| 10188 var _response = _requester.request(_url, | |
| 10189 "PATCH", | |
| 10190 body: _body, | |
| 10191 queryParams: _queryParams, | |
| 10192 uploadOptions: _uploadOptions, | |
| 10193 uploadMedia: _uploadMedia, | |
| 10194 downloadOptions: _downloadOptions); | |
| 10195 return _response.then((data) => new Site.fromJson(data)); | |
| 10196 } | |
| 10197 | |
| 10198 /** | |
| 10199 * Updates an existing site. | |
| 10200 * | |
| 10201 * [request] - The metadata request object. | |
| 10202 * | |
| 10203 * Request parameters: | |
| 10204 * | |
| 10205 * [profileId] - User profile ID associated with this request. | |
| 10206 * | |
| 10207 * Completes with a [Site]. | |
| 10208 * | |
| 10209 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 10210 * error. | |
| 10211 * | |
| 10212 * If the used [http.Client] completes with an error when making a REST call, | |
| 10213 * this method will complete with the same error. | |
| 10214 */ | |
| 10215 async.Future<Site> update(Site request, core.String profileId) { | |
| 10216 var _url = null; | |
| 10217 var _queryParams = new core.Map(); | |
| 10218 var _uploadMedia = null; | |
| 10219 var _uploadOptions = null; | |
| 10220 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 10221 var _body = null; | |
| 10222 | |
| 10223 if (request != null) { | |
| 10224 _body = convert.JSON.encode((request).toJson()); | |
| 10225 } | |
| 10226 if (profileId == null) { | |
| 10227 throw new core.ArgumentError("Parameter profileId is required."); | |
| 10228 } | |
| 10229 | |
| 10230 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/sit
es'; | |
| 10231 | |
| 10232 var _response = _requester.request(_url, | |
| 10233 "PUT", | |
| 10234 body: _body, | |
| 10235 queryParams: _queryParams, | |
| 10236 uploadOptions: _uploadOptions, | |
| 10237 uploadMedia: _uploadMedia, | |
| 10238 downloadOptions: _downloadOptions); | |
| 10239 return _response.then((data) => new Site.fromJson(data)); | |
| 10240 } | |
| 10241 | |
| 10242 } | |
| 10243 | |
| 10244 | |
| 10245 class SizesResourceApi { | |
| 10246 final commons.ApiRequester _requester; | |
| 10247 | |
| 10248 SizesResourceApi(commons.ApiRequester client) : | |
| 10249 _requester = client; | |
| 10250 | |
| 10251 /** | |
| 10252 * Gets one size by ID. | |
| 10253 * | |
| 10254 * Request parameters: | |
| 10255 * | |
| 10256 * [profileId] - User profile ID associated with this request. | |
| 10257 * | |
| 10258 * [id] - Size ID. | |
| 10259 * | |
| 10260 * Completes with a [Size]. | |
| 10261 * | |
| 10262 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 10263 * error. | |
| 10264 * | |
| 10265 * If the used [http.Client] completes with an error when making a REST call, | |
| 10266 * this method will complete with the same error. | |
| 10267 */ | |
| 10268 async.Future<Size> get(core.String profileId, core.String id) { | |
| 10269 var _url = null; | |
| 10270 var _queryParams = new core.Map(); | |
| 10271 var _uploadMedia = null; | |
| 10272 var _uploadOptions = null; | |
| 10273 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 10274 var _body = null; | |
| 10275 | |
| 10276 if (profileId == null) { | |
| 10277 throw new core.ArgumentError("Parameter profileId is required."); | |
| 10278 } | |
| 10279 if (id == null) { | |
| 10280 throw new core.ArgumentError("Parameter id is required."); | |
| 10281 } | |
| 10282 | |
| 10283 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/siz
es/' + commons.Escaper.ecapeVariable('$id'); | |
| 10284 | |
| 10285 var _response = _requester.request(_url, | |
| 10286 "GET", | |
| 10287 body: _body, | |
| 10288 queryParams: _queryParams, | |
| 10289 uploadOptions: _uploadOptions, | |
| 10290 uploadMedia: _uploadMedia, | |
| 10291 downloadOptions: _downloadOptions); | |
| 10292 return _response.then((data) => new Size.fromJson(data)); | |
| 10293 } | |
| 10294 | |
| 10295 /** | |
| 10296 * Inserts a new size. | |
| 10297 * | |
| 10298 * [request] - The metadata request object. | |
| 10299 * | |
| 10300 * Request parameters: | |
| 10301 * | |
| 10302 * [profileId] - User profile ID associated with this request. | |
| 10303 * | |
| 10304 * Completes with a [Size]. | |
| 10305 * | |
| 10306 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 10307 * error. | |
| 10308 * | |
| 10309 * If the used [http.Client] completes with an error when making a REST call, | |
| 10310 * this method will complete with the same error. | |
| 10311 */ | |
| 10312 async.Future<Size> insert(Size request, core.String profileId) { | |
| 10313 var _url = null; | |
| 10314 var _queryParams = new core.Map(); | |
| 10315 var _uploadMedia = null; | |
| 10316 var _uploadOptions = null; | |
| 10317 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 10318 var _body = null; | |
| 10319 | |
| 10320 if (request != null) { | |
| 10321 _body = convert.JSON.encode((request).toJson()); | |
| 10322 } | |
| 10323 if (profileId == null) { | |
| 10324 throw new core.ArgumentError("Parameter profileId is required."); | |
| 10325 } | |
| 10326 | |
| 10327 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/siz
es'; | |
| 10328 | |
| 10329 var _response = _requester.request(_url, | |
| 10330 "POST", | |
| 10331 body: _body, | |
| 10332 queryParams: _queryParams, | |
| 10333 uploadOptions: _uploadOptions, | |
| 10334 uploadMedia: _uploadMedia, | |
| 10335 downloadOptions: _downloadOptions); | |
| 10336 return _response.then((data) => new Size.fromJson(data)); | |
| 10337 } | |
| 10338 | |
| 10339 /** | |
| 10340 * Retrieves a list of sizes, possibly filtered. | |
| 10341 * | |
| 10342 * Request parameters: | |
| 10343 * | |
| 10344 * [profileId] - User profile ID associated with this request. | |
| 10345 * | |
| 10346 * [height] - Select only sizes with this height. | |
| 10347 * | |
| 10348 * [iabStandard] - Select only IAB standard sizes. | |
| 10349 * | |
| 10350 * [ids] - Select only sizes with these IDs. | |
| 10351 * | |
| 10352 * [width] - Select only sizes with this width. | |
| 10353 * | |
| 10354 * Completes with a [SizesListResponse]. | |
| 10355 * | |
| 10356 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 10357 * error. | |
| 10358 * | |
| 10359 * If the used [http.Client] completes with an error when making a REST call, | |
| 10360 * this method will complete with the same error. | |
| 10361 */ | |
| 10362 async.Future<SizesListResponse> list(core.String profileId, {core.int height,
core.bool iabStandard, core.List<core.String> ids, core.int width}) { | |
| 10363 var _url = null; | |
| 10364 var _queryParams = new core.Map(); | |
| 10365 var _uploadMedia = null; | |
| 10366 var _uploadOptions = null; | |
| 10367 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 10368 var _body = null; | |
| 10369 | |
| 10370 if (profileId == null) { | |
| 10371 throw new core.ArgumentError("Parameter profileId is required."); | |
| 10372 } | |
| 10373 if (height != null) { | |
| 10374 _queryParams["height"] = ["${height}"]; | |
| 10375 } | |
| 10376 if (iabStandard != null) { | |
| 10377 _queryParams["iabStandard"] = ["${iabStandard}"]; | |
| 10378 } | |
| 10379 if (ids != null) { | |
| 10380 _queryParams["ids"] = ids; | |
| 10381 } | |
| 10382 if (width != null) { | |
| 10383 _queryParams["width"] = ["${width}"]; | |
| 10384 } | |
| 10385 | |
| 10386 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/siz
es'; | |
| 10387 | |
| 10388 var _response = _requester.request(_url, | |
| 10389 "GET", | |
| 10390 body: _body, | |
| 10391 queryParams: _queryParams, | |
| 10392 uploadOptions: _uploadOptions, | |
| 10393 uploadMedia: _uploadMedia, | |
| 10394 downloadOptions: _downloadOptions); | |
| 10395 return _response.then((data) => new SizesListResponse.fromJson(data)); | |
| 10396 } | |
| 10397 | |
| 10398 } | |
| 10399 | |
| 10400 | |
| 10401 class SubaccountsResourceApi { | |
| 10402 final commons.ApiRequester _requester; | |
| 10403 | |
| 10404 SubaccountsResourceApi(commons.ApiRequester client) : | |
| 10405 _requester = client; | |
| 10406 | |
| 10407 /** | |
| 10408 * Gets one subaccount by ID. | |
| 10409 * | |
| 10410 * Request parameters: | |
| 10411 * | |
| 10412 * [profileId] - User profile ID associated with this request. | |
| 10413 * | |
| 10414 * [id] - Subaccount ID. | |
| 10415 * | |
| 10416 * Completes with a [Subaccount]. | |
| 10417 * | |
| 10418 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 10419 * error. | |
| 10420 * | |
| 10421 * If the used [http.Client] completes with an error when making a REST call, | |
| 10422 * this method will complete with the same error. | |
| 10423 */ | |
| 10424 async.Future<Subaccount> get(core.String profileId, core.String id) { | |
| 10425 var _url = null; | |
| 10426 var _queryParams = new core.Map(); | |
| 10427 var _uploadMedia = null; | |
| 10428 var _uploadOptions = null; | |
| 10429 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 10430 var _body = null; | |
| 10431 | |
| 10432 if (profileId == null) { | |
| 10433 throw new core.ArgumentError("Parameter profileId is required."); | |
| 10434 } | |
| 10435 if (id == null) { | |
| 10436 throw new core.ArgumentError("Parameter id is required."); | |
| 10437 } | |
| 10438 | |
| 10439 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/sub
accounts/' + commons.Escaper.ecapeVariable('$id'); | |
| 10440 | |
| 10441 var _response = _requester.request(_url, | |
| 10442 "GET", | |
| 10443 body: _body, | |
| 10444 queryParams: _queryParams, | |
| 10445 uploadOptions: _uploadOptions, | |
| 10446 uploadMedia: _uploadMedia, | |
| 10447 downloadOptions: _downloadOptions); | |
| 10448 return _response.then((data) => new Subaccount.fromJson(data)); | |
| 10449 } | |
| 10450 | |
| 10451 /** | |
| 10452 * Inserts a new subaccount. | |
| 10453 * | |
| 10454 * [request] - The metadata request object. | |
| 10455 * | |
| 10456 * Request parameters: | |
| 10457 * | |
| 10458 * [profileId] - User profile ID associated with this request. | |
| 10459 * | |
| 10460 * Completes with a [Subaccount]. | |
| 10461 * | |
| 10462 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 10463 * error. | |
| 10464 * | |
| 10465 * If the used [http.Client] completes with an error when making a REST call, | |
| 10466 * this method will complete with the same error. | |
| 10467 */ | |
| 10468 async.Future<Subaccount> insert(Subaccount request, core.String profileId) { | |
| 10469 var _url = null; | |
| 10470 var _queryParams = new core.Map(); | |
| 10471 var _uploadMedia = null; | |
| 10472 var _uploadOptions = null; | |
| 10473 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 10474 var _body = null; | |
| 10475 | |
| 10476 if (request != null) { | |
| 10477 _body = convert.JSON.encode((request).toJson()); | |
| 10478 } | |
| 10479 if (profileId == null) { | |
| 10480 throw new core.ArgumentError("Parameter profileId is required."); | |
| 10481 } | |
| 10482 | |
| 10483 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/sub
accounts'; | |
| 10484 | |
| 10485 var _response = _requester.request(_url, | |
| 10486 "POST", | |
| 10487 body: _body, | |
| 10488 queryParams: _queryParams, | |
| 10489 uploadOptions: _uploadOptions, | |
| 10490 uploadMedia: _uploadMedia, | |
| 10491 downloadOptions: _downloadOptions); | |
| 10492 return _response.then((data) => new Subaccount.fromJson(data)); | |
| 10493 } | |
| 10494 | |
| 10495 /** | |
| 10496 * Gets a list of subaccounts, possibly filtered. | |
| 10497 * | |
| 10498 * Request parameters: | |
| 10499 * | |
| 10500 * [profileId] - User profile ID associated with this request. | |
| 10501 * | |
| 10502 * [ids] - Select only subaccounts with these IDs. | |
| 10503 * | |
| 10504 * [maxResults] - Maximum number of results to return. | |
| 10505 * | |
| 10506 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 10507 * | |
| 10508 * [searchString] - Allows searching for objects by name or ID. Wildcards (*) | |
| 10509 * are allowed. For example, "subaccount*2015" will return objects with names | |
| 10510 * like "subaccount June 2015", "subaccount April 2015", or simply "subaccount | |
| 10511 * 2015". Most of the searches also add wildcards implicitly at the start and | |
| 10512 * the end of the search string. For example, a search string of "subaccount" | |
| 10513 * will match objects with name "my subaccount", "subaccount 2015", or simply | |
| 10514 * "subaccount". | |
| 10515 * | |
| 10516 * [sortField] - Field by which to sort the list. | |
| 10517 * Possible string values are: | |
| 10518 * - "ID" | |
| 10519 * - "NAME" | |
| 10520 * | |
| 10521 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 10522 * Possible string values are: | |
| 10523 * - "ASCENDING" | |
| 10524 * - "DESCENDING" | |
| 10525 * | |
| 10526 * Completes with a [SubaccountsListResponse]. | |
| 10527 * | |
| 10528 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 10529 * error. | |
| 10530 * | |
| 10531 * If the used [http.Client] completes with an error when making a REST call, | |
| 10532 * this method will complete with the same error. | |
| 10533 */ | |
| 10534 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}) { | |
| 10535 var _url = null; | |
| 10536 var _queryParams = new core.Map(); | |
| 10537 var _uploadMedia = null; | |
| 10538 var _uploadOptions = null; | |
| 10539 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 10540 var _body = null; | |
| 10541 | |
| 10542 if (profileId == null) { | |
| 10543 throw new core.ArgumentError("Parameter profileId is required."); | |
| 10544 } | |
| 10545 if (ids != null) { | |
| 10546 _queryParams["ids"] = ids; | |
| 10547 } | |
| 10548 if (maxResults != null) { | |
| 10549 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 10550 } | |
| 10551 if (pageToken != null) { | |
| 10552 _queryParams["pageToken"] = [pageToken]; | |
| 10553 } | |
| 10554 if (searchString != null) { | |
| 10555 _queryParams["searchString"] = [searchString]; | |
| 10556 } | |
| 10557 if (sortField != null) { | |
| 10558 _queryParams["sortField"] = [sortField]; | |
| 10559 } | |
| 10560 if (sortOrder != null) { | |
| 10561 _queryParams["sortOrder"] = [sortOrder]; | |
| 10562 } | |
| 10563 | |
| 10564 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/sub
accounts'; | |
| 10565 | |
| 10566 var _response = _requester.request(_url, | |
| 10567 "GET", | |
| 10568 body: _body, | |
| 10569 queryParams: _queryParams, | |
| 10570 uploadOptions: _uploadOptions, | |
| 10571 uploadMedia: _uploadMedia, | |
| 10572 downloadOptions: _downloadOptions); | |
| 10573 return _response.then((data) => new SubaccountsListResponse.fromJson(data)); | |
| 10574 } | |
| 10575 | |
| 10576 /** | |
| 10577 * Updates an existing subaccount. This method supports patch semantics. | |
| 10578 * | |
| 10579 * [request] - The metadata request object. | |
| 10580 * | |
| 10581 * Request parameters: | |
| 10582 * | |
| 10583 * [profileId] - User profile ID associated with this request. | |
| 10584 * | |
| 10585 * [id] - Subaccount ID. | |
| 10586 * | |
| 10587 * Completes with a [Subaccount]. | |
| 10588 * | |
| 10589 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 10590 * error. | |
| 10591 * | |
| 10592 * If the used [http.Client] completes with an error when making a REST call, | |
| 10593 * this method will complete with the same error. | |
| 10594 */ | |
| 10595 async.Future<Subaccount> patch(Subaccount request, core.String profileId, core
.String id) { | |
| 10596 var _url = null; | |
| 10597 var _queryParams = new core.Map(); | |
| 10598 var _uploadMedia = null; | |
| 10599 var _uploadOptions = null; | |
| 10600 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 10601 var _body = null; | |
| 10602 | |
| 10603 if (request != null) { | |
| 10604 _body = convert.JSON.encode((request).toJson()); | |
| 10605 } | |
| 10606 if (profileId == null) { | |
| 10607 throw new core.ArgumentError("Parameter profileId is required."); | |
| 10608 } | |
| 10609 if (id == null) { | |
| 10610 throw new core.ArgumentError("Parameter id is required."); | |
| 10611 } | |
| 10612 _queryParams["id"] = [id]; | |
| 10613 | |
| 10614 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/sub
accounts'; | |
| 10615 | |
| 10616 var _response = _requester.request(_url, | |
| 10617 "PATCH", | |
| 10618 body: _body, | |
| 10619 queryParams: _queryParams, | |
| 10620 uploadOptions: _uploadOptions, | |
| 10621 uploadMedia: _uploadMedia, | |
| 10622 downloadOptions: _downloadOptions); | |
| 10623 return _response.then((data) => new Subaccount.fromJson(data)); | |
| 10624 } | |
| 10625 | |
| 10626 /** | |
| 10627 * Updates an existing subaccount. | |
| 10628 * | |
| 10629 * [request] - The metadata request object. | |
| 10630 * | |
| 10631 * Request parameters: | |
| 10632 * | |
| 10633 * [profileId] - User profile ID associated with this request. | |
| 10634 * | |
| 10635 * Completes with a [Subaccount]. | |
| 10636 * | |
| 10637 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 10638 * error. | |
| 10639 * | |
| 10640 * If the used [http.Client] completes with an error when making a REST call, | |
| 10641 * this method will complete with the same error. | |
| 10642 */ | |
| 10643 async.Future<Subaccount> update(Subaccount request, core.String profileId) { | |
| 10644 var _url = null; | |
| 10645 var _queryParams = new core.Map(); | |
| 10646 var _uploadMedia = null; | |
| 10647 var _uploadOptions = null; | |
| 10648 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 10649 var _body = null; | |
| 10650 | |
| 10651 if (request != null) { | |
| 10652 _body = convert.JSON.encode((request).toJson()); | |
| 10653 } | |
| 10654 if (profileId == null) { | |
| 10655 throw new core.ArgumentError("Parameter profileId is required."); | |
| 10656 } | |
| 10657 | |
| 10658 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/sub
accounts'; | |
| 10659 | |
| 10660 var _response = _requester.request(_url, | |
| 10661 "PUT", | |
| 10662 body: _body, | |
| 10663 queryParams: _queryParams, | |
| 10664 uploadOptions: _uploadOptions, | |
| 10665 uploadMedia: _uploadMedia, | |
| 10666 downloadOptions: _downloadOptions); | |
| 10667 return _response.then((data) => new Subaccount.fromJson(data)); | |
| 10668 } | |
| 10669 | |
| 10670 } | |
| 10671 | |
| 10672 | |
| 10673 class TargetableRemarketingListsResourceApi { | |
| 10674 final commons.ApiRequester _requester; | |
| 10675 | |
| 10676 TargetableRemarketingListsResourceApi(commons.ApiRequester client) : | |
| 10677 _requester = client; | |
| 10678 | |
| 10679 /** | |
| 10680 * Gets one remarketing list by ID. | |
| 10681 * | |
| 10682 * Request parameters: | |
| 10683 * | |
| 10684 * [profileId] - User profile ID associated with this request. | |
| 10685 * | |
| 10686 * [id] - Remarketing list ID. | |
| 10687 * | |
| 10688 * Completes with a [TargetableRemarketingList]. | |
| 10689 * | |
| 10690 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 10691 * error. | |
| 10692 * | |
| 10693 * If the used [http.Client] completes with an error when making a REST call, | |
| 10694 * this method will complete with the same error. | |
| 10695 */ | |
| 10696 async.Future<TargetableRemarketingList> get(core.String profileId, core.String
id) { | |
| 10697 var _url = null; | |
| 10698 var _queryParams = new core.Map(); | |
| 10699 var _uploadMedia = null; | |
| 10700 var _uploadOptions = null; | |
| 10701 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 10702 var _body = null; | |
| 10703 | |
| 10704 if (profileId == null) { | |
| 10705 throw new core.ArgumentError("Parameter profileId is required."); | |
| 10706 } | |
| 10707 if (id == null) { | |
| 10708 throw new core.ArgumentError("Parameter id is required."); | |
| 10709 } | |
| 10710 | |
| 10711 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/tar
getableRemarketingLists/' + commons.Escaper.ecapeVariable('$id'); | |
| 10712 | |
| 10713 var _response = _requester.request(_url, | |
| 10714 "GET", | |
| 10715 body: _body, | |
| 10716 queryParams: _queryParams, | |
| 10717 uploadOptions: _uploadOptions, | |
| 10718 uploadMedia: _uploadMedia, | |
| 10719 downloadOptions: _downloadOptions); | |
| 10720 return _response.then((data) => new TargetableRemarketingList.fromJson(data)
); | |
| 10721 } | |
| 10722 | |
| 10723 /** | |
| 10724 * Retrieves a list of targetable remarketing lists, possibly filtered. | |
| 10725 * | |
| 10726 * Request parameters: | |
| 10727 * | |
| 10728 * [profileId] - User profile ID associated with this request. | |
| 10729 * | |
| 10730 * [advertiserId] - Select only targetable remarketing lists targetable by | |
| 10731 * these advertisers. | |
| 10732 * | |
| 10733 * [active] - Select only active or only inactive targetable remarketing | |
| 10734 * lists. | |
| 10735 * | |
| 10736 * [maxResults] - Maximum number of results to return. | |
| 10737 * | |
| 10738 * [name] - Allows searching for objects by name or ID. Wildcards (*) are | |
| 10739 * allowed. For example, "remarketing list*2015" will return objects with | |
| 10740 * names like "remarketing list June 2015", "remarketing list April 2015", or | |
| 10741 * simply "remarketing list 2015". Most of the searches also add wildcards | |
| 10742 * implicitly at the start and the end of the search string. For example, a | |
| 10743 * search string of "remarketing list" will match objects with name "my | |
| 10744 * remarketing list", "remarketing list 2015", or simply "remarketing list". | |
| 10745 * | |
| 10746 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 10747 * | |
| 10748 * [sortField] - Field by which to sort the list. | |
| 10749 * Possible string values are: | |
| 10750 * - "ID" | |
| 10751 * - "NAME" | |
| 10752 * | |
| 10753 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 10754 * Possible string values are: | |
| 10755 * - "ASCENDING" | |
| 10756 * - "DESCENDING" | |
| 10757 * | |
| 10758 * Completes with a [TargetableRemarketingListsListResponse]. | |
| 10759 * | |
| 10760 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 10761 * error. | |
| 10762 * | |
| 10763 * If the used [http.Client] completes with an error when making a REST call, | |
| 10764 * this method will complete with the same error. | |
| 10765 */ | |
| 10766 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}) { | |
| 10767 var _url = null; | |
| 10768 var _queryParams = new core.Map(); | |
| 10769 var _uploadMedia = null; | |
| 10770 var _uploadOptions = null; | |
| 10771 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 10772 var _body = null; | |
| 10773 | |
| 10774 if (profileId == null) { | |
| 10775 throw new core.ArgumentError("Parameter profileId is required."); | |
| 10776 } | |
| 10777 if (advertiserId == null) { | |
| 10778 throw new core.ArgumentError("Parameter advertiserId is required."); | |
| 10779 } | |
| 10780 _queryParams["advertiserId"] = [advertiserId]; | |
| 10781 if (active != null) { | |
| 10782 _queryParams["active"] = ["${active}"]; | |
| 10783 } | |
| 10784 if (maxResults != null) { | |
| 10785 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 10786 } | |
| 10787 if (name != null) { | |
| 10788 _queryParams["name"] = [name]; | |
| 10789 } | |
| 10790 if (pageToken != null) { | |
| 10791 _queryParams["pageToken"] = [pageToken]; | |
| 10792 } | |
| 10793 if (sortField != null) { | |
| 10794 _queryParams["sortField"] = [sortField]; | |
| 10795 } | |
| 10796 if (sortOrder != null) { | |
| 10797 _queryParams["sortOrder"] = [sortOrder]; | |
| 10798 } | |
| 10799 | |
| 10800 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/tar
getableRemarketingLists'; | |
| 10801 | |
| 10802 var _response = _requester.request(_url, | |
| 10803 "GET", | |
| 10804 body: _body, | |
| 10805 queryParams: _queryParams, | |
| 10806 uploadOptions: _uploadOptions, | |
| 10807 uploadMedia: _uploadMedia, | |
| 10808 downloadOptions: _downloadOptions); | |
| 10809 return _response.then((data) => new TargetableRemarketingListsListResponse.f
romJson(data)); | |
| 10810 } | |
| 10811 | |
| 10812 } | |
| 10813 | |
| 10814 | |
| 10815 class UserProfilesResourceApi { | |
| 10816 final commons.ApiRequester _requester; | |
| 10817 | |
| 10818 UserProfilesResourceApi(commons.ApiRequester client) : | |
| 10819 _requester = client; | |
| 10820 | |
| 10821 /** | |
| 10822 * Gets one user profile by ID. | |
| 10823 * | |
| 10824 * Request parameters: | |
| 10825 * | |
| 10826 * [profileId] - The user profile ID. | |
| 10827 * | |
| 10828 * Completes with a [UserProfile]. | |
| 10829 * | |
| 10830 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 10831 * error. | |
| 10832 * | |
| 10833 * If the used [http.Client] completes with an error when making a REST call, | |
| 10834 * this method will complete with the same error. | |
| 10835 */ | |
| 10836 async.Future<UserProfile> get(core.String profileId) { | |
| 10837 var _url = null; | |
| 10838 var _queryParams = new core.Map(); | |
| 10839 var _uploadMedia = null; | |
| 10840 var _uploadOptions = null; | |
| 10841 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 10842 var _body = null; | |
| 10843 | |
| 10844 if (profileId == null) { | |
| 10845 throw new core.ArgumentError("Parameter profileId is required."); | |
| 10846 } | |
| 10847 | |
| 10848 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId'); | |
| 10849 | |
| 10850 var _response = _requester.request(_url, | |
| 10851 "GET", | |
| 10852 body: _body, | |
| 10853 queryParams: _queryParams, | |
| 10854 uploadOptions: _uploadOptions, | |
| 10855 uploadMedia: _uploadMedia, | |
| 10856 downloadOptions: _downloadOptions); | |
| 10857 return _response.then((data) => new UserProfile.fromJson(data)); | |
| 10858 } | |
| 10859 | |
| 10860 /** | |
| 10861 * Retrieves list of user profiles for a user. | |
| 10862 * | |
| 10863 * Request parameters: | |
| 10864 * | |
| 10865 * Completes with a [UserProfileList]. | |
| 10866 * | |
| 10867 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 10868 * error. | |
| 10869 * | |
| 10870 * If the used [http.Client] completes with an error when making a REST call, | |
| 10871 * this method will complete with the same error. | |
| 10872 */ | |
| 10873 async.Future<UserProfileList> list() { | |
| 10874 var _url = null; | |
| 10875 var _queryParams = new core.Map(); | |
| 10876 var _uploadMedia = null; | |
| 10877 var _uploadOptions = null; | |
| 10878 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 10879 var _body = null; | |
| 10880 | |
| 10881 | |
| 10882 _url = 'userprofiles'; | |
| 10883 | |
| 10884 var _response = _requester.request(_url, | |
| 10885 "GET", | |
| 10886 body: _body, | |
| 10887 queryParams: _queryParams, | |
| 10888 uploadOptions: _uploadOptions, | |
| 10889 uploadMedia: _uploadMedia, | |
| 10890 downloadOptions: _downloadOptions); | |
| 10891 return _response.then((data) => new UserProfileList.fromJson(data)); | |
| 10892 } | |
| 10893 | |
| 10894 } | |
| 10895 | |
| 10896 | |
| 10897 class UserRolePermissionGroupsResourceApi { | |
| 10898 final commons.ApiRequester _requester; | |
| 10899 | |
| 10900 UserRolePermissionGroupsResourceApi(commons.ApiRequester client) : | |
| 10901 _requester = client; | |
| 10902 | |
| 10903 /** | |
| 10904 * Gets one user role permission group by ID. | |
| 10905 * | |
| 10906 * Request parameters: | |
| 10907 * | |
| 10908 * [profileId] - User profile ID associated with this request. | |
| 10909 * | |
| 10910 * [id] - User role permission group ID. | |
| 10911 * | |
| 10912 * Completes with a [UserRolePermissionGroup]. | |
| 10913 * | |
| 10914 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 10915 * error. | |
| 10916 * | |
| 10917 * If the used [http.Client] completes with an error when making a REST call, | |
| 10918 * this method will complete with the same error. | |
| 10919 */ | |
| 10920 async.Future<UserRolePermissionGroup> get(core.String profileId, core.String i
d) { | |
| 10921 var _url = null; | |
| 10922 var _queryParams = new core.Map(); | |
| 10923 var _uploadMedia = null; | |
| 10924 var _uploadOptions = null; | |
| 10925 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 10926 var _body = null; | |
| 10927 | |
| 10928 if (profileId == null) { | |
| 10929 throw new core.ArgumentError("Parameter profileId is required."); | |
| 10930 } | |
| 10931 if (id == null) { | |
| 10932 throw new core.ArgumentError("Parameter id is required."); | |
| 10933 } | |
| 10934 | |
| 10935 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/use
rRolePermissionGroups/' + commons.Escaper.ecapeVariable('$id'); | |
| 10936 | |
| 10937 var _response = _requester.request(_url, | |
| 10938 "GET", | |
| 10939 body: _body, | |
| 10940 queryParams: _queryParams, | |
| 10941 uploadOptions: _uploadOptions, | |
| 10942 uploadMedia: _uploadMedia, | |
| 10943 downloadOptions: _downloadOptions); | |
| 10944 return _response.then((data) => new UserRolePermissionGroup.fromJson(data)); | |
| 10945 } | |
| 10946 | |
| 10947 /** | |
| 10948 * Gets a list of all supported user role permission groups. | |
| 10949 * | |
| 10950 * Request parameters: | |
| 10951 * | |
| 10952 * [profileId] - User profile ID associated with this request. | |
| 10953 * | |
| 10954 * Completes with a [UserRolePermissionGroupsListResponse]. | |
| 10955 * | |
| 10956 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 10957 * error. | |
| 10958 * | |
| 10959 * If the used [http.Client] completes with an error when making a REST call, | |
| 10960 * this method will complete with the same error. | |
| 10961 */ | |
| 10962 async.Future<UserRolePermissionGroupsListResponse> list(core.String profileId)
{ | |
| 10963 var _url = null; | |
| 10964 var _queryParams = new core.Map(); | |
| 10965 var _uploadMedia = null; | |
| 10966 var _uploadOptions = null; | |
| 10967 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 10968 var _body = null; | |
| 10969 | |
| 10970 if (profileId == null) { | |
| 10971 throw new core.ArgumentError("Parameter profileId is required."); | |
| 10972 } | |
| 10973 | |
| 10974 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/use
rRolePermissionGroups'; | |
| 10975 | |
| 10976 var _response = _requester.request(_url, | |
| 10977 "GET", | |
| 10978 body: _body, | |
| 10979 queryParams: _queryParams, | |
| 10980 uploadOptions: _uploadOptions, | |
| 10981 uploadMedia: _uploadMedia, | |
| 10982 downloadOptions: _downloadOptions); | |
| 10983 return _response.then((data) => new UserRolePermissionGroupsListResponse.fro
mJson(data)); | |
| 10984 } | |
| 10985 | |
| 10986 } | |
| 10987 | |
| 10988 | |
| 10989 class UserRolePermissionsResourceApi { | |
| 10990 final commons.ApiRequester _requester; | |
| 10991 | |
| 10992 UserRolePermissionsResourceApi(commons.ApiRequester client) : | |
| 10993 _requester = client; | |
| 10994 | |
| 10995 /** | |
| 10996 * Gets one user role permission by ID. | |
| 10997 * | |
| 10998 * Request parameters: | |
| 10999 * | |
| 11000 * [profileId] - User profile ID associated with this request. | |
| 11001 * | |
| 11002 * [id] - User role permission ID. | |
| 11003 * | |
| 11004 * Completes with a [UserRolePermission]. | |
| 11005 * | |
| 11006 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 11007 * error. | |
| 11008 * | |
| 11009 * If the used [http.Client] completes with an error when making a REST call, | |
| 11010 * this method will complete with the same error. | |
| 11011 */ | |
| 11012 async.Future<UserRolePermission> get(core.String profileId, core.String id) { | |
| 11013 var _url = null; | |
| 11014 var _queryParams = new core.Map(); | |
| 11015 var _uploadMedia = null; | |
| 11016 var _uploadOptions = null; | |
| 11017 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 11018 var _body = null; | |
| 11019 | |
| 11020 if (profileId == null) { | |
| 11021 throw new core.ArgumentError("Parameter profileId is required."); | |
| 11022 } | |
| 11023 if (id == null) { | |
| 11024 throw new core.ArgumentError("Parameter id is required."); | |
| 11025 } | |
| 11026 | |
| 11027 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/use
rRolePermissions/' + commons.Escaper.ecapeVariable('$id'); | |
| 11028 | |
| 11029 var _response = _requester.request(_url, | |
| 11030 "GET", | |
| 11031 body: _body, | |
| 11032 queryParams: _queryParams, | |
| 11033 uploadOptions: _uploadOptions, | |
| 11034 uploadMedia: _uploadMedia, | |
| 11035 downloadOptions: _downloadOptions); | |
| 11036 return _response.then((data) => new UserRolePermission.fromJson(data)); | |
| 11037 } | |
| 11038 | |
| 11039 /** | |
| 11040 * Gets a list of user role permissions, possibly filtered. | |
| 11041 * | |
| 11042 * Request parameters: | |
| 11043 * | |
| 11044 * [profileId] - User profile ID associated with this request. | |
| 11045 * | |
| 11046 * [ids] - Select only user role permissions with these IDs. | |
| 11047 * | |
| 11048 * Completes with a [UserRolePermissionsListResponse]. | |
| 11049 * | |
| 11050 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 11051 * error. | |
| 11052 * | |
| 11053 * If the used [http.Client] completes with an error when making a REST call, | |
| 11054 * this method will complete with the same error. | |
| 11055 */ | |
| 11056 async.Future<UserRolePermissionsListResponse> list(core.String profileId, {cor
e.List<core.String> ids}) { | |
| 11057 var _url = null; | |
| 11058 var _queryParams = new core.Map(); | |
| 11059 var _uploadMedia = null; | |
| 11060 var _uploadOptions = null; | |
| 11061 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 11062 var _body = null; | |
| 11063 | |
| 11064 if (profileId == null) { | |
| 11065 throw new core.ArgumentError("Parameter profileId is required."); | |
| 11066 } | |
| 11067 if (ids != null) { | |
| 11068 _queryParams["ids"] = ids; | |
| 11069 } | |
| 11070 | |
| 11071 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/use
rRolePermissions'; | |
| 11072 | |
| 11073 var _response = _requester.request(_url, | |
| 11074 "GET", | |
| 11075 body: _body, | |
| 11076 queryParams: _queryParams, | |
| 11077 uploadOptions: _uploadOptions, | |
| 11078 uploadMedia: _uploadMedia, | |
| 11079 downloadOptions: _downloadOptions); | |
| 11080 return _response.then((data) => new UserRolePermissionsListResponse.fromJson
(data)); | |
| 11081 } | |
| 11082 | |
| 11083 } | |
| 11084 | |
| 11085 | |
| 11086 class UserRolesResourceApi { | |
| 11087 final commons.ApiRequester _requester; | |
| 11088 | |
| 11089 UserRolesResourceApi(commons.ApiRequester client) : | |
| 11090 _requester = client; | |
| 11091 | |
| 11092 /** | |
| 11093 * Deletes an existing user role. | |
| 11094 * | |
| 11095 * Request parameters: | |
| 11096 * | |
| 11097 * [profileId] - User profile ID associated with this request. | |
| 11098 * | |
| 11099 * [id] - User role ID. | |
| 11100 * | |
| 11101 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 11102 * error. | |
| 11103 * | |
| 11104 * If the used [http.Client] completes with an error when making a REST call, | |
| 11105 * this method will complete with the same error. | |
| 11106 */ | |
| 11107 async.Future delete(core.String profileId, core.String id) { | |
| 11108 var _url = null; | |
| 11109 var _queryParams = new core.Map(); | |
| 11110 var _uploadMedia = null; | |
| 11111 var _uploadOptions = null; | |
| 11112 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 11113 var _body = null; | |
| 11114 | |
| 11115 if (profileId == null) { | |
| 11116 throw new core.ArgumentError("Parameter profileId is required."); | |
| 11117 } | |
| 11118 if (id == null) { | |
| 11119 throw new core.ArgumentError("Parameter id is required."); | |
| 11120 } | |
| 11121 | |
| 11122 _downloadOptions = null; | |
| 11123 | |
| 11124 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/use
rRoles/' + commons.Escaper.ecapeVariable('$id'); | |
| 11125 | |
| 11126 var _response = _requester.request(_url, | |
| 11127 "DELETE", | |
| 11128 body: _body, | |
| 11129 queryParams: _queryParams, | |
| 11130 uploadOptions: _uploadOptions, | |
| 11131 uploadMedia: _uploadMedia, | |
| 11132 downloadOptions: _downloadOptions); | |
| 11133 return _response.then((data) => null); | |
| 11134 } | |
| 11135 | |
| 11136 /** | |
| 11137 * Gets one user role by ID. | |
| 11138 * | |
| 11139 * Request parameters: | |
| 11140 * | |
| 11141 * [profileId] - User profile ID associated with this request. | |
| 11142 * | |
| 11143 * [id] - User role ID. | |
| 11144 * | |
| 11145 * Completes with a [UserRole]. | |
| 11146 * | |
| 11147 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 11148 * error. | |
| 11149 * | |
| 11150 * If the used [http.Client] completes with an error when making a REST call, | |
| 11151 * this method will complete with the same error. | |
| 11152 */ | |
| 11153 async.Future<UserRole> get(core.String profileId, core.String id) { | |
| 11154 var _url = null; | |
| 11155 var _queryParams = new core.Map(); | |
| 11156 var _uploadMedia = null; | |
| 11157 var _uploadOptions = null; | |
| 11158 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 11159 var _body = null; | |
| 11160 | |
| 11161 if (profileId == null) { | |
| 11162 throw new core.ArgumentError("Parameter profileId is required."); | |
| 11163 } | |
| 11164 if (id == null) { | |
| 11165 throw new core.ArgumentError("Parameter id is required."); | |
| 11166 } | |
| 11167 | |
| 11168 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/use
rRoles/' + commons.Escaper.ecapeVariable('$id'); | |
| 11169 | |
| 11170 var _response = _requester.request(_url, | |
| 11171 "GET", | |
| 11172 body: _body, | |
| 11173 queryParams: _queryParams, | |
| 11174 uploadOptions: _uploadOptions, | |
| 11175 uploadMedia: _uploadMedia, | |
| 11176 downloadOptions: _downloadOptions); | |
| 11177 return _response.then((data) => new UserRole.fromJson(data)); | |
| 11178 } | |
| 11179 | |
| 11180 /** | |
| 11181 * Inserts a new user role. | |
| 11182 * | |
| 11183 * [request] - The metadata request object. | |
| 11184 * | |
| 11185 * Request parameters: | |
| 11186 * | |
| 11187 * [profileId] - User profile ID associated with this request. | |
| 11188 * | |
| 11189 * Completes with a [UserRole]. | |
| 11190 * | |
| 11191 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 11192 * error. | |
| 11193 * | |
| 11194 * If the used [http.Client] completes with an error when making a REST call, | |
| 11195 * this method will complete with the same error. | |
| 11196 */ | |
| 11197 async.Future<UserRole> insert(UserRole request, core.String profileId) { | |
| 11198 var _url = null; | |
| 11199 var _queryParams = new core.Map(); | |
| 11200 var _uploadMedia = null; | |
| 11201 var _uploadOptions = null; | |
| 11202 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 11203 var _body = null; | |
| 11204 | |
| 11205 if (request != null) { | |
| 11206 _body = convert.JSON.encode((request).toJson()); | |
| 11207 } | |
| 11208 if (profileId == null) { | |
| 11209 throw new core.ArgumentError("Parameter profileId is required."); | |
| 11210 } | |
| 11211 | |
| 11212 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/use
rRoles'; | |
| 11213 | |
| 11214 var _response = _requester.request(_url, | |
| 11215 "POST", | |
| 11216 body: _body, | |
| 11217 queryParams: _queryParams, | |
| 11218 uploadOptions: _uploadOptions, | |
| 11219 uploadMedia: _uploadMedia, | |
| 11220 downloadOptions: _downloadOptions); | |
| 11221 return _response.then((data) => new UserRole.fromJson(data)); | |
| 11222 } | |
| 11223 | |
| 11224 /** | |
| 11225 * Retrieves a list of user roles, possibly filtered. | |
| 11226 * | |
| 11227 * Request parameters: | |
| 11228 * | |
| 11229 * [profileId] - User profile ID associated with this request. | |
| 11230 * | |
| 11231 * [accountUserRoleOnly] - Select only account level user roles not associated | |
| 11232 * with any specific subaccount. | |
| 11233 * | |
| 11234 * [ids] - Select only user roles with the specified IDs. | |
| 11235 * | |
| 11236 * [maxResults] - Maximum number of results to return. | |
| 11237 * | |
| 11238 * [pageToken] - Value of the nextPageToken from the previous result page. | |
| 11239 * | |
| 11240 * [searchString] - Allows searching for objects by name or ID. Wildcards (*) | |
| 11241 * are allowed. For example, "userrole*2015" will return objects with names | |
| 11242 * like "userrole June 2015", "userrole April 2015", or simply "userrole | |
| 11243 * 2015". Most of the searches also add wildcards implicitly at the start and | |
| 11244 * the end of the search string. For example, a search string of "userrole" | |
| 11245 * will match objects with name "my userrole", "userrole 2015", or simply | |
| 11246 * "userrole". | |
| 11247 * | |
| 11248 * [sortField] - Field by which to sort the list. | |
| 11249 * Possible string values are: | |
| 11250 * - "ID" | |
| 11251 * - "NAME" | |
| 11252 * | |
| 11253 * [sortOrder] - Order of sorted results, default is ASCENDING. | |
| 11254 * Possible string values are: | |
| 11255 * - "ASCENDING" | |
| 11256 * - "DESCENDING" | |
| 11257 * | |
| 11258 * [subaccountId] - Select only user roles that belong to this subaccount. | |
| 11259 * | |
| 11260 * Completes with a [UserRolesListResponse]. | |
| 11261 * | |
| 11262 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 11263 * error. | |
| 11264 * | |
| 11265 * If the used [http.Client] completes with an error when making a REST call, | |
| 11266 * this method will complete with the same error. | |
| 11267 */ | |
| 11268 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}) { | |
| 11269 var _url = null; | |
| 11270 var _queryParams = new core.Map(); | |
| 11271 var _uploadMedia = null; | |
| 11272 var _uploadOptions = null; | |
| 11273 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 11274 var _body = null; | |
| 11275 | |
| 11276 if (profileId == null) { | |
| 11277 throw new core.ArgumentError("Parameter profileId is required."); | |
| 11278 } | |
| 11279 if (accountUserRoleOnly != null) { | |
| 11280 _queryParams["accountUserRoleOnly"] = ["${accountUserRoleOnly}"]; | |
| 11281 } | |
| 11282 if (ids != null) { | |
| 11283 _queryParams["ids"] = ids; | |
| 11284 } | |
| 11285 if (maxResults != null) { | |
| 11286 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 11287 } | |
| 11288 if (pageToken != null) { | |
| 11289 _queryParams["pageToken"] = [pageToken]; | |
| 11290 } | |
| 11291 if (searchString != null) { | |
| 11292 _queryParams["searchString"] = [searchString]; | |
| 11293 } | |
| 11294 if (sortField != null) { | |
| 11295 _queryParams["sortField"] = [sortField]; | |
| 11296 } | |
| 11297 if (sortOrder != null) { | |
| 11298 _queryParams["sortOrder"] = [sortOrder]; | |
| 11299 } | |
| 11300 if (subaccountId != null) { | |
| 11301 _queryParams["subaccountId"] = [subaccountId]; | |
| 11302 } | |
| 11303 | |
| 11304 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/use
rRoles'; | |
| 11305 | |
| 11306 var _response = _requester.request(_url, | |
| 11307 "GET", | |
| 11308 body: _body, | |
| 11309 queryParams: _queryParams, | |
| 11310 uploadOptions: _uploadOptions, | |
| 11311 uploadMedia: _uploadMedia, | |
| 11312 downloadOptions: _downloadOptions); | |
| 11313 return _response.then((data) => new UserRolesListResponse.fromJson(data)); | |
| 11314 } | |
| 11315 | |
| 11316 /** | |
| 11317 * Updates an existing user role. This method supports patch semantics. | |
| 11318 * | |
| 11319 * [request] - The metadata request object. | |
| 11320 * | |
| 11321 * Request parameters: | |
| 11322 * | |
| 11323 * [profileId] - User profile ID associated with this request. | |
| 11324 * | |
| 11325 * [id] - User role ID. | |
| 11326 * | |
| 11327 * Completes with a [UserRole]. | |
| 11328 * | |
| 11329 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 11330 * error. | |
| 11331 * | |
| 11332 * If the used [http.Client] completes with an error when making a REST call, | |
| 11333 * this method will complete with the same error. | |
| 11334 */ | |
| 11335 async.Future<UserRole> patch(UserRole request, core.String profileId, core.Str
ing id) { | |
| 11336 var _url = null; | |
| 11337 var _queryParams = new core.Map(); | |
| 11338 var _uploadMedia = null; | |
| 11339 var _uploadOptions = null; | |
| 11340 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 11341 var _body = null; | |
| 11342 | |
| 11343 if (request != null) { | |
| 11344 _body = convert.JSON.encode((request).toJson()); | |
| 11345 } | |
| 11346 if (profileId == null) { | |
| 11347 throw new core.ArgumentError("Parameter profileId is required."); | |
| 11348 } | |
| 11349 if (id == null) { | |
| 11350 throw new core.ArgumentError("Parameter id is required."); | |
| 11351 } | |
| 11352 _queryParams["id"] = [id]; | |
| 11353 | |
| 11354 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/use
rRoles'; | |
| 11355 | |
| 11356 var _response = _requester.request(_url, | |
| 11357 "PATCH", | |
| 11358 body: _body, | |
| 11359 queryParams: _queryParams, | |
| 11360 uploadOptions: _uploadOptions, | |
| 11361 uploadMedia: _uploadMedia, | |
| 11362 downloadOptions: _downloadOptions); | |
| 11363 return _response.then((data) => new UserRole.fromJson(data)); | |
| 11364 } | |
| 11365 | |
| 11366 /** | |
| 11367 * Updates an existing user role. | |
| 11368 * | |
| 11369 * [request] - The metadata request object. | |
| 11370 * | |
| 11371 * Request parameters: | |
| 11372 * | |
| 11373 * [profileId] - User profile ID associated with this request. | |
| 11374 * | |
| 11375 * Completes with a [UserRole]. | |
| 11376 * | |
| 11377 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 11378 * error. | |
| 11379 * | |
| 11380 * If the used [http.Client] completes with an error when making a REST call, | |
| 11381 * this method will complete with the same error. | |
| 11382 */ | |
| 11383 async.Future<UserRole> update(UserRole request, core.String profileId) { | |
| 11384 var _url = null; | |
| 11385 var _queryParams = new core.Map(); | |
| 11386 var _uploadMedia = null; | |
| 11387 var _uploadOptions = null; | |
| 11388 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 11389 var _body = null; | |
| 11390 | |
| 11391 if (request != null) { | |
| 11392 _body = convert.JSON.encode((request).toJson()); | |
| 11393 } | |
| 11394 if (profileId == null) { | |
| 11395 throw new core.ArgumentError("Parameter profileId is required."); | |
| 11396 } | |
| 11397 | |
| 11398 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/use
rRoles'; | |
| 11399 | |
| 11400 var _response = _requester.request(_url, | |
| 11401 "PUT", | |
| 11402 body: _body, | |
| 11403 queryParams: _queryParams, | |
| 11404 uploadOptions: _uploadOptions, | |
| 11405 uploadMedia: _uploadMedia, | |
| 11406 downloadOptions: _downloadOptions); | |
| 11407 return _response.then((data) => new UserRole.fromJson(data)); | |
| 11408 } | |
| 11409 | |
| 11410 } | |
| 11411 | |
| 11412 | |
| 11413 | |
| 11414 /** Contains properties of a DCM account. */ | |
| 11415 class Account { | |
| 11416 /** Account permissions assigned to this account. */ | |
| 11417 core.List<core.String> accountPermissionIds; | |
| 11418 /** | |
| 11419 * Profile for this account. This is a read-only field that can be left blank. | |
| 11420 * Possible string values are: | |
| 11421 * - "ACCOUNT_PROFILE_BASIC" | |
| 11422 * - "ACCOUNT_PROFILE_STANDARD" | |
| 11423 */ | |
| 11424 core.String accountProfile; | |
| 11425 /** Whether this account is active. */ | |
| 11426 core.bool active; | |
| 11427 /** | |
| 11428 * Maximum number of active ads allowed for this account. | |
| 11429 * Possible string values are: | |
| 11430 * - "ACTIVE_ADS_TIER_100K" | |
| 11431 * - "ACTIVE_ADS_TIER_200K" | |
| 11432 * - "ACTIVE_ADS_TIER_300K" | |
| 11433 * - "ACTIVE_ADS_TIER_40K" | |
| 11434 * - "ACTIVE_ADS_TIER_500K" | |
| 11435 * - "ACTIVE_ADS_TIER_75K" | |
| 11436 */ | |
| 11437 core.String activeAdsLimitTier; | |
| 11438 /** | |
| 11439 * Whether to serve creatives with Active View tags. If disabled, viewability | |
| 11440 * data will not be available for any impressions. | |
| 11441 */ | |
| 11442 core.bool activeViewOptOut; | |
| 11443 /** User role permissions available to the user roles of this account. */ | |
| 11444 core.List<core.String> availablePermissionIds; | |
| 11445 /** | |
| 11446 * Whether campaigns created in this account will be enabled for comScore vCE | |
| 11447 * by default. | |
| 11448 */ | |
| 11449 core.bool comscoreVceEnabled; | |
| 11450 /** ID of the country associated with this account. */ | |
| 11451 core.String countryId; | |
| 11452 /** | |
| 11453 * ID of currency associated with this account. This is a required field. | |
| 11454 * Acceptable values are: | |
| 11455 * - "1" for USD | |
| 11456 * - "2" for GBP | |
| 11457 * - "3" for ESP | |
| 11458 * - "4" for SEK | |
| 11459 * - "5" for CAD | |
| 11460 * - "6" for JPY | |
| 11461 * - "7" for DEM | |
| 11462 * - "8" for AUD | |
| 11463 * - "9" for FRF | |
| 11464 * - "10" for ITL | |
| 11465 * - "11" for DKK | |
| 11466 * - "12" for NOK | |
| 11467 * - "13" for FIM | |
| 11468 * - "14" for ZAR | |
| 11469 * - "15" for IEP | |
| 11470 * - "16" for NLG | |
| 11471 * - "17" for EUR | |
| 11472 * - "18" for KRW | |
| 11473 * - "19" for TWD | |
| 11474 * - "20" for SGD | |
| 11475 * - "21" for CNY | |
| 11476 * - "22" for HKD | |
| 11477 * - "23" for NZD | |
| 11478 * - "24" for MYR | |
| 11479 * - "25" for BRL | |
| 11480 * - "26" for PTE | |
| 11481 * - "27" for MXP | |
| 11482 * - "28" for CLP | |
| 11483 * - "29" for TRY | |
| 11484 * - "30" for ARS | |
| 11485 * - "31" for PEN | |
| 11486 * - "32" for ILS | |
| 11487 * - "33" for CHF | |
| 11488 * - "34" for VEF | |
| 11489 * - "35" for COP | |
| 11490 * - "36" for GTQ | |
| 11491 * - "37" for PLN | |
| 11492 * - "39" for INR | |
| 11493 * - "40" for THB | |
| 11494 * - "41" for IDR | |
| 11495 * - "42" for CZK | |
| 11496 * - "43" for RON | |
| 11497 * - "44" for HUF | |
| 11498 * - "45" for RUB | |
| 11499 * - "46" for AED | |
| 11500 * - "47" for BGN | |
| 11501 * - "48" for HRK | |
| 11502 */ | |
| 11503 core.String currencyId; | |
| 11504 /** Default placement dimensions for this account. */ | |
| 11505 core.String defaultCreativeSizeId; | |
| 11506 /** Description of this account. */ | |
| 11507 core.String description; | |
| 11508 /** ID of this account. This is a read-only, auto-generated field. */ | |
| 11509 core.String id; | |
| 11510 /** | |
| 11511 * Identifies what kind of resource this is. Value: the fixed string | |
| 11512 * "dfareporting#account". | |
| 11513 */ | |
| 11514 core.String kind; | |
| 11515 /** | |
| 11516 * Locale of this account. | |
| 11517 * Acceptable values are: | |
| 11518 * - "cs" (Czech) | |
| 11519 * - "de" (German) | |
| 11520 * - "en" (English) | |
| 11521 * - "en-GB" (English United Kingdom) | |
| 11522 * - "es" (Spanish) | |
| 11523 * - "fr" (French) | |
| 11524 * - "it" (Italian) | |
| 11525 * - "ja" (Japanese) | |
| 11526 * - "ko" (Korean) | |
| 11527 * - "pl" (Polish) | |
| 11528 * - "pt-BR" (Portuguese Brazil) | |
| 11529 * - "ru" (Russian) | |
| 11530 * - "sv" (Swedish) | |
| 11531 * - "tr" (Turkish) | |
| 11532 * - "zh-CN" (Chinese Simplified) | |
| 11533 * - "zh-TW" (Chinese Traditional) | |
| 11534 */ | |
| 11535 core.String locale; | |
| 11536 /** Maximum image size allowed for this account. */ | |
| 11537 core.String maximumImageSize; | |
| 11538 /** | |
| 11539 * Name of this account. This is a required field, and must be less than 128 | |
| 11540 * characters long and be globally unique. | |
| 11541 */ | |
| 11542 core.String name; | |
| 11543 /** | |
| 11544 * Whether campaigns created in this account will be enabled for Nielsen OCR | |
| 11545 * reach ratings by default. | |
| 11546 */ | |
| 11547 core.bool nielsenOcrEnabled; | |
| 11548 /** Reporting configuration of this account. */ | |
| 11549 ReportsConfiguration reportsConfiguration; | |
| 11550 /** | |
| 11551 * File size limit in kilobytes of Rich Media teaser creatives. Must be | |
| 11552 * between 1 and 10240. | |
| 11553 */ | |
| 11554 core.String teaserSizeLimit; | |
| 11555 | |
| 11556 Account(); | |
| 11557 | |
| 11558 Account.fromJson(core.Map _json) { | |
| 11559 if (_json.containsKey("accountPermissionIds")) { | |
| 11560 accountPermissionIds = _json["accountPermissionIds"]; | |
| 11561 } | |
| 11562 if (_json.containsKey("accountProfile")) { | |
| 11563 accountProfile = _json["accountProfile"]; | |
| 11564 } | |
| 11565 if (_json.containsKey("active")) { | |
| 11566 active = _json["active"]; | |
| 11567 } | |
| 11568 if (_json.containsKey("activeAdsLimitTier")) { | |
| 11569 activeAdsLimitTier = _json["activeAdsLimitTier"]; | |
| 11570 } | |
| 11571 if (_json.containsKey("activeViewOptOut")) { | |
| 11572 activeViewOptOut = _json["activeViewOptOut"]; | |
| 11573 } | |
| 11574 if (_json.containsKey("availablePermissionIds")) { | |
| 11575 availablePermissionIds = _json["availablePermissionIds"]; | |
| 11576 } | |
| 11577 if (_json.containsKey("comscoreVceEnabled")) { | |
| 11578 comscoreVceEnabled = _json["comscoreVceEnabled"]; | |
| 11579 } | |
| 11580 if (_json.containsKey("countryId")) { | |
| 11581 countryId = _json["countryId"]; | |
| 11582 } | |
| 11583 if (_json.containsKey("currencyId")) { | |
| 11584 currencyId = _json["currencyId"]; | |
| 11585 } | |
| 11586 if (_json.containsKey("defaultCreativeSizeId")) { | |
| 11587 defaultCreativeSizeId = _json["defaultCreativeSizeId"]; | |
| 11588 } | |
| 11589 if (_json.containsKey("description")) { | |
| 11590 description = _json["description"]; | |
| 11591 } | |
| 11592 if (_json.containsKey("id")) { | |
| 11593 id = _json["id"]; | |
| 11594 } | |
| 11595 if (_json.containsKey("kind")) { | |
| 11596 kind = _json["kind"]; | |
| 11597 } | |
| 11598 if (_json.containsKey("locale")) { | |
| 11599 locale = _json["locale"]; | |
| 11600 } | |
| 11601 if (_json.containsKey("maximumImageSize")) { | |
| 11602 maximumImageSize = _json["maximumImageSize"]; | |
| 11603 } | |
| 11604 if (_json.containsKey("name")) { | |
| 11605 name = _json["name"]; | |
| 11606 } | |
| 11607 if (_json.containsKey("nielsenOcrEnabled")) { | |
| 11608 nielsenOcrEnabled = _json["nielsenOcrEnabled"]; | |
| 11609 } | |
| 11610 if (_json.containsKey("reportsConfiguration")) { | |
| 11611 reportsConfiguration = new ReportsConfiguration.fromJson(_json["reportsCon
figuration"]); | |
| 11612 } | |
| 11613 if (_json.containsKey("teaserSizeLimit")) { | |
| 11614 teaserSizeLimit = _json["teaserSizeLimit"]; | |
| 11615 } | |
| 11616 } | |
| 11617 | |
| 11618 core.Map toJson() { | |
| 11619 var _json = new core.Map(); | |
| 11620 if (accountPermissionIds != null) { | |
| 11621 _json["accountPermissionIds"] = accountPermissionIds; | |
| 11622 } | |
| 11623 if (accountProfile != null) { | |
| 11624 _json["accountProfile"] = accountProfile; | |
| 11625 } | |
| 11626 if (active != null) { | |
| 11627 _json["active"] = active; | |
| 11628 } | |
| 11629 if (activeAdsLimitTier != null) { | |
| 11630 _json["activeAdsLimitTier"] = activeAdsLimitTier; | |
| 11631 } | |
| 11632 if (activeViewOptOut != null) { | |
| 11633 _json["activeViewOptOut"] = activeViewOptOut; | |
| 11634 } | |
| 11635 if (availablePermissionIds != null) { | |
| 11636 _json["availablePermissionIds"] = availablePermissionIds; | |
| 11637 } | |
| 11638 if (comscoreVceEnabled != null) { | |
| 11639 _json["comscoreVceEnabled"] = comscoreVceEnabled; | |
| 11640 } | |
| 11641 if (countryId != null) { | |
| 11642 _json["countryId"] = countryId; | |
| 11643 } | |
| 11644 if (currencyId != null) { | |
| 11645 _json["currencyId"] = currencyId; | |
| 11646 } | |
| 11647 if (defaultCreativeSizeId != null) { | |
| 11648 _json["defaultCreativeSizeId"] = defaultCreativeSizeId; | |
| 11649 } | |
| 11650 if (description != null) { | |
| 11651 _json["description"] = description; | |
| 11652 } | |
| 11653 if (id != null) { | |
| 11654 _json["id"] = id; | |
| 11655 } | |
| 11656 if (kind != null) { | |
| 11657 _json["kind"] = kind; | |
| 11658 } | |
| 11659 if (locale != null) { | |
| 11660 _json["locale"] = locale; | |
| 11661 } | |
| 11662 if (maximumImageSize != null) { | |
| 11663 _json["maximumImageSize"] = maximumImageSize; | |
| 11664 } | |
| 11665 if (name != null) { | |
| 11666 _json["name"] = name; | |
| 11667 } | |
| 11668 if (nielsenOcrEnabled != null) { | |
| 11669 _json["nielsenOcrEnabled"] = nielsenOcrEnabled; | |
| 11670 } | |
| 11671 if (reportsConfiguration != null) { | |
| 11672 _json["reportsConfiguration"] = (reportsConfiguration).toJson(); | |
| 11673 } | |
| 11674 if (teaserSizeLimit != null) { | |
| 11675 _json["teaserSizeLimit"] = teaserSizeLimit; | |
| 11676 } | |
| 11677 return _json; | |
| 11678 } | |
| 11679 } | |
| 11680 | |
| 11681 /** Gets a summary of active ads in an account. */ | |
| 11682 class AccountActiveAdSummary { | |
| 11683 /** ID of the account. */ | |
| 11684 core.String accountId; | |
| 11685 /** Ads that have been activated for the account */ | |
| 11686 core.String activeAds; | |
| 11687 /** | |
| 11688 * Maximum number of active ads allowed for the account. | |
| 11689 * Possible string values are: | |
| 11690 * - "ACTIVE_ADS_TIER_100K" | |
| 11691 * - "ACTIVE_ADS_TIER_200K" | |
| 11692 * - "ACTIVE_ADS_TIER_300K" | |
| 11693 * - "ACTIVE_ADS_TIER_40K" | |
| 11694 * - "ACTIVE_ADS_TIER_500K" | |
| 11695 * - "ACTIVE_ADS_TIER_75K" | |
| 11696 */ | |
| 11697 core.String activeAdsLimitTier; | |
| 11698 /** Ads that can be activated for the account. */ | |
| 11699 core.String availableAds; | |
| 11700 /** | |
| 11701 * Identifies what kind of resource this is. Value: the fixed string | |
| 11702 * "dfareporting#accountActiveAdSummary". | |
| 11703 */ | |
| 11704 core.String kind; | |
| 11705 | |
| 11706 AccountActiveAdSummary(); | |
| 11707 | |
| 11708 AccountActiveAdSummary.fromJson(core.Map _json) { | |
| 11709 if (_json.containsKey("accountId")) { | |
| 11710 accountId = _json["accountId"]; | |
| 11711 } | |
| 11712 if (_json.containsKey("activeAds")) { | |
| 11713 activeAds = _json["activeAds"]; | |
| 11714 } | |
| 11715 if (_json.containsKey("activeAdsLimitTier")) { | |
| 11716 activeAdsLimitTier = _json["activeAdsLimitTier"]; | |
| 11717 } | |
| 11718 if (_json.containsKey("availableAds")) { | |
| 11719 availableAds = _json["availableAds"]; | |
| 11720 } | |
| 11721 if (_json.containsKey("kind")) { | |
| 11722 kind = _json["kind"]; | |
| 11723 } | |
| 11724 } | |
| 11725 | |
| 11726 core.Map toJson() { | |
| 11727 var _json = new core.Map(); | |
| 11728 if (accountId != null) { | |
| 11729 _json["accountId"] = accountId; | |
| 11730 } | |
| 11731 if (activeAds != null) { | |
| 11732 _json["activeAds"] = activeAds; | |
| 11733 } | |
| 11734 if (activeAdsLimitTier != null) { | |
| 11735 _json["activeAdsLimitTier"] = activeAdsLimitTier; | |
| 11736 } | |
| 11737 if (availableAds != null) { | |
| 11738 _json["availableAds"] = availableAds; | |
| 11739 } | |
| 11740 if (kind != null) { | |
| 11741 _json["kind"] = kind; | |
| 11742 } | |
| 11743 return _json; | |
| 11744 } | |
| 11745 } | |
| 11746 | |
| 11747 /** | |
| 11748 * AccountPermissions contains information about a particular account | |
| 11749 * permission. Some features of DCM require an account permission to be present | |
| 11750 * in the account. | |
| 11751 */ | |
| 11752 class AccountPermission { | |
| 11753 /** | |
| 11754 * Account profiles associated with this account permission. | |
| 11755 * | |
| 11756 * Possible values are: | |
| 11757 * - "ACCOUNT_PROFILE_BASIC" | |
| 11758 * - "ACCOUNT_PROFILE_STANDARD" | |
| 11759 */ | |
| 11760 core.List<core.String> accountProfiles; | |
| 11761 /** ID of this account permission. */ | |
| 11762 core.String id; | |
| 11763 /** | |
| 11764 * Identifies what kind of resource this is. Value: the fixed string | |
| 11765 * "dfareporting#accountPermission". | |
| 11766 */ | |
| 11767 core.String kind; | |
| 11768 /** | |
| 11769 * Administrative level required to enable this account permission. | |
| 11770 * Possible string values are: | |
| 11771 * - "ADMINISTRATOR" | |
| 11772 * - "USER" | |
| 11773 */ | |
| 11774 core.String level; | |
| 11775 /** Name of this account permission. */ | |
| 11776 core.String name; | |
| 11777 /** Permission group of this account permission. */ | |
| 11778 core.String permissionGroupId; | |
| 11779 | |
| 11780 AccountPermission(); | |
| 11781 | |
| 11782 AccountPermission.fromJson(core.Map _json) { | |
| 11783 if (_json.containsKey("accountProfiles")) { | |
| 11784 accountProfiles = _json["accountProfiles"]; | |
| 11785 } | |
| 11786 if (_json.containsKey("id")) { | |
| 11787 id = _json["id"]; | |
| 11788 } | |
| 11789 if (_json.containsKey("kind")) { | |
| 11790 kind = _json["kind"]; | |
| 11791 } | |
| 11792 if (_json.containsKey("level")) { | |
| 11793 level = _json["level"]; | |
| 11794 } | |
| 11795 if (_json.containsKey("name")) { | |
| 11796 name = _json["name"]; | |
| 11797 } | |
| 11798 if (_json.containsKey("permissionGroupId")) { | |
| 11799 permissionGroupId = _json["permissionGroupId"]; | |
| 11800 } | |
| 11801 } | |
| 11802 | |
| 11803 core.Map toJson() { | |
| 11804 var _json = new core.Map(); | |
| 11805 if (accountProfiles != null) { | |
| 11806 _json["accountProfiles"] = accountProfiles; | |
| 11807 } | |
| 11808 if (id != null) { | |
| 11809 _json["id"] = id; | |
| 11810 } | |
| 11811 if (kind != null) { | |
| 11812 _json["kind"] = kind; | |
| 11813 } | |
| 11814 if (level != null) { | |
| 11815 _json["level"] = level; | |
| 11816 } | |
| 11817 if (name != null) { | |
| 11818 _json["name"] = name; | |
| 11819 } | |
| 11820 if (permissionGroupId != null) { | |
| 11821 _json["permissionGroupId"] = permissionGroupId; | |
| 11822 } | |
| 11823 return _json; | |
| 11824 } | |
| 11825 } | |
| 11826 | |
| 11827 /** | |
| 11828 * AccountPermissionGroups contains a mapping of permission group IDs to names. | |
| 11829 * A permission group is a grouping of account permissions. | |
| 11830 */ | |
| 11831 class AccountPermissionGroup { | |
| 11832 /** ID of this account permission group. */ | |
| 11833 core.String id; | |
| 11834 /** | |
| 11835 * Identifies what kind of resource this is. Value: the fixed string | |
| 11836 * "dfareporting#accountPermissionGroup". | |
| 11837 */ | |
| 11838 core.String kind; | |
| 11839 /** Name of this account permission group. */ | |
| 11840 core.String name; | |
| 11841 | |
| 11842 AccountPermissionGroup(); | |
| 11843 | |
| 11844 AccountPermissionGroup.fromJson(core.Map _json) { | |
| 11845 if (_json.containsKey("id")) { | |
| 11846 id = _json["id"]; | |
| 11847 } | |
| 11848 if (_json.containsKey("kind")) { | |
| 11849 kind = _json["kind"]; | |
| 11850 } | |
| 11851 if (_json.containsKey("name")) { | |
| 11852 name = _json["name"]; | |
| 11853 } | |
| 11854 } | |
| 11855 | |
| 11856 core.Map toJson() { | |
| 11857 var _json = new core.Map(); | |
| 11858 if (id != null) { | |
| 11859 _json["id"] = id; | |
| 11860 } | |
| 11861 if (kind != null) { | |
| 11862 _json["kind"] = kind; | |
| 11863 } | |
| 11864 if (name != null) { | |
| 11865 _json["name"] = name; | |
| 11866 } | |
| 11867 return _json; | |
| 11868 } | |
| 11869 } | |
| 11870 | |
| 11871 /** Account Permission Group List Response */ | |
| 11872 class AccountPermissionGroupsListResponse { | |
| 11873 /** Account permission group collection. */ | |
| 11874 core.List<AccountPermissionGroup> accountPermissionGroups; | |
| 11875 /** | |
| 11876 * Identifies what kind of resource this is. Value: the fixed string | |
| 11877 * "dfareporting#accountPermissionGroupsListResponse". | |
| 11878 */ | |
| 11879 core.String kind; | |
| 11880 | |
| 11881 AccountPermissionGroupsListResponse(); | |
| 11882 | |
| 11883 AccountPermissionGroupsListResponse.fromJson(core.Map _json) { | |
| 11884 if (_json.containsKey("accountPermissionGroups")) { | |
| 11885 accountPermissionGroups = _json["accountPermissionGroups"].map((value) =>
new AccountPermissionGroup.fromJson(value)).toList(); | |
| 11886 } | |
| 11887 if (_json.containsKey("kind")) { | |
| 11888 kind = _json["kind"]; | |
| 11889 } | |
| 11890 } | |
| 11891 | |
| 11892 core.Map toJson() { | |
| 11893 var _json = new core.Map(); | |
| 11894 if (accountPermissionGroups != null) { | |
| 11895 _json["accountPermissionGroups"] = accountPermissionGroups.map((value) =>
(value).toJson()).toList(); | |
| 11896 } | |
| 11897 if (kind != null) { | |
| 11898 _json["kind"] = kind; | |
| 11899 } | |
| 11900 return _json; | |
| 11901 } | |
| 11902 } | |
| 11903 | |
| 11904 /** Account Permission List Response */ | |
| 11905 class AccountPermissionsListResponse { | |
| 11906 /** Account permission collection. */ | |
| 11907 core.List<AccountPermission> accountPermissions; | |
| 11908 /** | |
| 11909 * Identifies what kind of resource this is. Value: the fixed string | |
| 11910 * "dfareporting#accountPermissionsListResponse". | |
| 11911 */ | |
| 11912 core.String kind; | |
| 11913 | |
| 11914 AccountPermissionsListResponse(); | |
| 11915 | |
| 11916 AccountPermissionsListResponse.fromJson(core.Map _json) { | |
| 11917 if (_json.containsKey("accountPermissions")) { | |
| 11918 accountPermissions = _json["accountPermissions"].map((value) => new Accoun
tPermission.fromJson(value)).toList(); | |
| 11919 } | |
| 11920 if (_json.containsKey("kind")) { | |
| 11921 kind = _json["kind"]; | |
| 11922 } | |
| 11923 } | |
| 11924 | |
| 11925 core.Map toJson() { | |
| 11926 var _json = new core.Map(); | |
| 11927 if (accountPermissions != null) { | |
| 11928 _json["accountPermissions"] = accountPermissions.map((value) => (value).to
Json()).toList(); | |
| 11929 } | |
| 11930 if (kind != null) { | |
| 11931 _json["kind"] = kind; | |
| 11932 } | |
| 11933 return _json; | |
| 11934 } | |
| 11935 } | |
| 11936 | |
| 11937 /** | |
| 11938 * AccountUserProfiles contains properties of a DCM user profile. This resource | |
| 11939 * is specifically for managing user profiles, whereas UserProfiles is for | |
| 11940 * accessing the API. | |
| 11941 */ | |
| 11942 class AccountUserProfile { | |
| 11943 /** | |
| 11944 * Account ID of the user profile. This is a read-only field that can be left | |
| 11945 * blank. | |
| 11946 */ | |
| 11947 core.String accountId; | |
| 11948 /** | |
| 11949 * Whether this user profile is active. This defaults to false, and must be | |
| 11950 * set true on insert for the user profile to be usable. | |
| 11951 */ | |
| 11952 core.bool active; | |
| 11953 /** | |
| 11954 * Filter that describes which advertisers are visible to the user profile. | |
| 11955 */ | |
| 11956 ObjectFilter advertiserFilter; | |
| 11957 /** Filter that describes which campaigns are visible to the user profile. */ | |
| 11958 ObjectFilter campaignFilter; | |
| 11959 /** Comments for this user profile. */ | |
| 11960 core.String comments; | |
| 11961 /** | |
| 11962 * Email of the user profile. The email addresss must be linked to a Google | |
| 11963 * Account. This field is required on insertion and is read-only after | |
| 11964 * insertion. | |
| 11965 */ | |
| 11966 core.String email; | |
| 11967 /** ID of the user profile. This is a read-only, auto-generated field. */ | |
| 11968 core.String id; | |
| 11969 /** | |
| 11970 * Identifies what kind of resource this is. Value: the fixed string | |
| 11971 * "dfareporting#accountUserProfile". | |
| 11972 */ | |
| 11973 core.String kind; | |
| 11974 /** | |
| 11975 * Locale of the user profile. This is a required field. | |
| 11976 * Acceptable values are: | |
| 11977 * - "cs" (Czech) | |
| 11978 * - "de" (German) | |
| 11979 * - "en" (English) | |
| 11980 * - "en-GB" (English United Kingdom) | |
| 11981 * - "es" (Spanish) | |
| 11982 * - "fr" (French) | |
| 11983 * - "it" (Italian) | |
| 11984 * - "ja" (Japanese) | |
| 11985 * - "ko" (Korean) | |
| 11986 * - "pl" (Polish) | |
| 11987 * - "pt-BR" (Portuguese Brazil) | |
| 11988 * - "ru" (Russian) | |
| 11989 * - "sv" (Swedish) | |
| 11990 * - "tr" (Turkish) | |
| 11991 * - "zh-CN" (Chinese Simplified) | |
| 11992 * - "zh-TW" (Chinese Traditional) | |
| 11993 */ | |
| 11994 core.String locale; | |
| 11995 /** | |
| 11996 * Name of the user profile. This is a required field. Must be less than 64 | |
| 11997 * characters long, must be globally unique, and cannot contain whitespace or | |
| 11998 * any of the following characters: "&;"#%,". | |
| 11999 */ | |
| 12000 core.String name; | |
| 12001 /** Filter that describes which sites are visible to the user profile. */ | |
| 12002 ObjectFilter siteFilter; | |
| 12003 /** | |
| 12004 * Subaccount ID of the user profile. This is a read-only field that can be | |
| 12005 * left blank. | |
| 12006 */ | |
| 12007 core.String subaccountId; | |
| 12008 /** | |
| 12009 * Trafficker type of this user profile. | |
| 12010 * Possible string values are: | |
| 12011 * - "EXTERNAL_TRAFFICKER" | |
| 12012 * - "INTERNAL_NON_TRAFFICKER" | |
| 12013 * - "INTERNAL_TRAFFICKER" | |
| 12014 */ | |
| 12015 core.String traffickerType; | |
| 12016 /** | |
| 12017 * User type of the user profile. This is a read-only field that can be left | |
| 12018 * blank. | |
| 12019 * Possible string values are: | |
| 12020 * - "INTERNAL_ADMINISTRATOR" | |
| 12021 * - "NORMAL_USER" | |
| 12022 * - "READ_ONLY_SUPER_USER" | |
| 12023 * - "SUPER_USER" | |
| 12024 */ | |
| 12025 core.String userAccessType; | |
| 12026 /** | |
| 12027 * Filter that describes which user roles are visible to the user profile. | |
| 12028 */ | |
| 12029 ObjectFilter userRoleFilter; | |
| 12030 /** User role ID of the user profile. This is a required field. */ | |
| 12031 core.String userRoleId; | |
| 12032 | |
| 12033 AccountUserProfile(); | |
| 12034 | |
| 12035 AccountUserProfile.fromJson(core.Map _json) { | |
| 12036 if (_json.containsKey("accountId")) { | |
| 12037 accountId = _json["accountId"]; | |
| 12038 } | |
| 12039 if (_json.containsKey("active")) { | |
| 12040 active = _json["active"]; | |
| 12041 } | |
| 12042 if (_json.containsKey("advertiserFilter")) { | |
| 12043 advertiserFilter = new ObjectFilter.fromJson(_json["advertiserFilter"]); | |
| 12044 } | |
| 12045 if (_json.containsKey("campaignFilter")) { | |
| 12046 campaignFilter = new ObjectFilter.fromJson(_json["campaignFilter"]); | |
| 12047 } | |
| 12048 if (_json.containsKey("comments")) { | |
| 12049 comments = _json["comments"]; | |
| 12050 } | |
| 12051 if (_json.containsKey("email")) { | |
| 12052 email = _json["email"]; | |
| 12053 } | |
| 12054 if (_json.containsKey("id")) { | |
| 12055 id = _json["id"]; | |
| 12056 } | |
| 12057 if (_json.containsKey("kind")) { | |
| 12058 kind = _json["kind"]; | |
| 12059 } | |
| 12060 if (_json.containsKey("locale")) { | |
| 12061 locale = _json["locale"]; | |
| 12062 } | |
| 12063 if (_json.containsKey("name")) { | |
| 12064 name = _json["name"]; | |
| 12065 } | |
| 12066 if (_json.containsKey("siteFilter")) { | |
| 12067 siteFilter = new ObjectFilter.fromJson(_json["siteFilter"]); | |
| 12068 } | |
| 12069 if (_json.containsKey("subaccountId")) { | |
| 12070 subaccountId = _json["subaccountId"]; | |
| 12071 } | |
| 12072 if (_json.containsKey("traffickerType")) { | |
| 12073 traffickerType = _json["traffickerType"]; | |
| 12074 } | |
| 12075 if (_json.containsKey("userAccessType")) { | |
| 12076 userAccessType = _json["userAccessType"]; | |
| 12077 } | |
| 12078 if (_json.containsKey("userRoleFilter")) { | |
| 12079 userRoleFilter = new ObjectFilter.fromJson(_json["userRoleFilter"]); | |
| 12080 } | |
| 12081 if (_json.containsKey("userRoleId")) { | |
| 12082 userRoleId = _json["userRoleId"]; | |
| 12083 } | |
| 12084 } | |
| 12085 | |
| 12086 core.Map toJson() { | |
| 12087 var _json = new core.Map(); | |
| 12088 if (accountId != null) { | |
| 12089 _json["accountId"] = accountId; | |
| 12090 } | |
| 12091 if (active != null) { | |
| 12092 _json["active"] = active; | |
| 12093 } | |
| 12094 if (advertiserFilter != null) { | |
| 12095 _json["advertiserFilter"] = (advertiserFilter).toJson(); | |
| 12096 } | |
| 12097 if (campaignFilter != null) { | |
| 12098 _json["campaignFilter"] = (campaignFilter).toJson(); | |
| 12099 } | |
| 12100 if (comments != null) { | |
| 12101 _json["comments"] = comments; | |
| 12102 } | |
| 12103 if (email != null) { | |
| 12104 _json["email"] = email; | |
| 12105 } | |
| 12106 if (id != null) { | |
| 12107 _json["id"] = id; | |
| 12108 } | |
| 12109 if (kind != null) { | |
| 12110 _json["kind"] = kind; | |
| 12111 } | |
| 12112 if (locale != null) { | |
| 12113 _json["locale"] = locale; | |
| 12114 } | |
| 12115 if (name != null) { | |
| 12116 _json["name"] = name; | |
| 12117 } | |
| 12118 if (siteFilter != null) { | |
| 12119 _json["siteFilter"] = (siteFilter).toJson(); | |
| 12120 } | |
| 12121 if (subaccountId != null) { | |
| 12122 _json["subaccountId"] = subaccountId; | |
| 12123 } | |
| 12124 if (traffickerType != null) { | |
| 12125 _json["traffickerType"] = traffickerType; | |
| 12126 } | |
| 12127 if (userAccessType != null) { | |
| 12128 _json["userAccessType"] = userAccessType; | |
| 12129 } | |
| 12130 if (userRoleFilter != null) { | |
| 12131 _json["userRoleFilter"] = (userRoleFilter).toJson(); | |
| 12132 } | |
| 12133 if (userRoleId != null) { | |
| 12134 _json["userRoleId"] = userRoleId; | |
| 12135 } | |
| 12136 return _json; | |
| 12137 } | |
| 12138 } | |
| 12139 | |
| 12140 /** Account User Profile List Response */ | |
| 12141 class AccountUserProfilesListResponse { | |
| 12142 /** Account user profile collection. */ | |
| 12143 core.List<AccountUserProfile> accountUserProfiles; | |
| 12144 /** | |
| 12145 * Identifies what kind of resource this is. Value: the fixed string | |
| 12146 * "dfareporting#accountUserProfilesListResponse". | |
| 12147 */ | |
| 12148 core.String kind; | |
| 12149 /** Pagination token to be used for the next list operation. */ | |
| 12150 core.String nextPageToken; | |
| 12151 | |
| 12152 AccountUserProfilesListResponse(); | |
| 12153 | |
| 12154 AccountUserProfilesListResponse.fromJson(core.Map _json) { | |
| 12155 if (_json.containsKey("accountUserProfiles")) { | |
| 12156 accountUserProfiles = _json["accountUserProfiles"].map((value) => new Acco
untUserProfile.fromJson(value)).toList(); | |
| 12157 } | |
| 12158 if (_json.containsKey("kind")) { | |
| 12159 kind = _json["kind"]; | |
| 12160 } | |
| 12161 if (_json.containsKey("nextPageToken")) { | |
| 12162 nextPageToken = _json["nextPageToken"]; | |
| 12163 } | |
| 12164 } | |
| 12165 | |
| 12166 core.Map toJson() { | |
| 12167 var _json = new core.Map(); | |
| 12168 if (accountUserProfiles != null) { | |
| 12169 _json["accountUserProfiles"] = accountUserProfiles.map((value) => (value).
toJson()).toList(); | |
| 12170 } | |
| 12171 if (kind != null) { | |
| 12172 _json["kind"] = kind; | |
| 12173 } | |
| 12174 if (nextPageToken != null) { | |
| 12175 _json["nextPageToken"] = nextPageToken; | |
| 12176 } | |
| 12177 return _json; | |
| 12178 } | |
| 12179 } | |
| 12180 | |
| 12181 /** Account List Response */ | |
| 12182 class AccountsListResponse { | |
| 12183 /** Account collection. */ | |
| 12184 core.List<Account> accounts; | |
| 12185 /** | |
| 12186 * Identifies what kind of resource this is. Value: the fixed string | |
| 12187 * "dfareporting#accountsListResponse". | |
| 12188 */ | |
| 12189 core.String kind; | |
| 12190 /** Pagination token to be used for the next list operation. */ | |
| 12191 core.String nextPageToken; | |
| 12192 | |
| 12193 AccountsListResponse(); | |
| 12194 | |
| 12195 AccountsListResponse.fromJson(core.Map _json) { | |
| 12196 if (_json.containsKey("accounts")) { | |
| 12197 accounts = _json["accounts"].map((value) => new Account.fromJson(value)).t
oList(); | |
| 12198 } | |
| 12199 if (_json.containsKey("kind")) { | |
| 12200 kind = _json["kind"]; | |
| 12201 } | |
| 12202 if (_json.containsKey("nextPageToken")) { | |
| 12203 nextPageToken = _json["nextPageToken"]; | |
| 12204 } | |
| 12205 } | |
| 12206 | |
| 12207 core.Map toJson() { | |
| 12208 var _json = new core.Map(); | |
| 12209 if (accounts != null) { | |
| 12210 _json["accounts"] = accounts.map((value) => (value).toJson()).toList(); | |
| 12211 } | |
| 12212 if (kind != null) { | |
| 12213 _json["kind"] = kind; | |
| 12214 } | |
| 12215 if (nextPageToken != null) { | |
| 12216 _json["nextPageToken"] = nextPageToken; | |
| 12217 } | |
| 12218 return _json; | |
| 12219 } | |
| 12220 } | |
| 12221 | |
| 12222 /** Represents an activity group. */ | |
| 12223 class Activities { | |
| 12224 /** | |
| 12225 * List of activity filters. The dimension values need to be all either of | |
| 12226 * type "dfa:activity" or "dfa:activityGroup". | |
| 12227 */ | |
| 12228 core.List<DimensionValue> filters; | |
| 12229 /** The kind of resource this is, in this case dfareporting#activities. */ | |
| 12230 core.String kind; | |
| 12231 /** List of names of floodlight activity metrics. */ | |
| 12232 core.List<core.String> metricNames; | |
| 12233 | |
| 12234 Activities(); | |
| 12235 | |
| 12236 Activities.fromJson(core.Map _json) { | |
| 12237 if (_json.containsKey("filters")) { | |
| 12238 filters = _json["filters"].map((value) => new DimensionValue.fromJson(valu
e)).toList(); | |
| 12239 } | |
| 12240 if (_json.containsKey("kind")) { | |
| 12241 kind = _json["kind"]; | |
| 12242 } | |
| 12243 if (_json.containsKey("metricNames")) { | |
| 12244 metricNames = _json["metricNames"]; | |
| 12245 } | |
| 12246 } | |
| 12247 | |
| 12248 core.Map toJson() { | |
| 12249 var _json = new core.Map(); | |
| 12250 if (filters != null) { | |
| 12251 _json["filters"] = filters.map((value) => (value).toJson()).toList(); | |
| 12252 } | |
| 12253 if (kind != null) { | |
| 12254 _json["kind"] = kind; | |
| 12255 } | |
| 12256 if (metricNames != null) { | |
| 12257 _json["metricNames"] = metricNames; | |
| 12258 } | |
| 12259 return _json; | |
| 12260 } | |
| 12261 } | |
| 12262 | |
| 12263 /** Contains properties of a DCM ad. */ | |
| 12264 class Ad { | |
| 12265 /** | |
| 12266 * Account ID of this ad. This is a read-only field that can be left blank. | |
| 12267 */ | |
| 12268 core.String accountId; | |
| 12269 /** Whether this ad is active. */ | |
| 12270 core.bool active; | |
| 12271 /** Advertiser ID of this ad. This is a required field on insertion. */ | |
| 12272 core.String advertiserId; | |
| 12273 /** | |
| 12274 * Dimension value for the ID of the advertiser. This is a read-only, | |
| 12275 * auto-generated field. | |
| 12276 */ | |
| 12277 DimensionValue advertiserIdDimensionValue; | |
| 12278 /** Whether this ad is archived. */ | |
| 12279 core.bool archived; | |
| 12280 /** | |
| 12281 * Audience segment ID that is being targeted for this ad. Applicable when | |
| 12282 * type is AD_SERVING_STANDARD_AD. | |
| 12283 */ | |
| 12284 core.String audienceSegmentId; | |
| 12285 /** Campaign ID of this ad. This is a required field on insertion. */ | |
| 12286 core.String campaignId; | |
| 12287 /** | |
| 12288 * Dimension value for the ID of the campaign. This is a read-only, | |
| 12289 * auto-generated field. | |
| 12290 */ | |
| 12291 DimensionValue campaignIdDimensionValue; | |
| 12292 /** | |
| 12293 * Click-through URL for this ad. This is a required field on insertion. | |
| 12294 * Applicable when type is AD_SERVING_CLICK_TRACKER. | |
| 12295 */ | |
| 12296 ClickThroughUrl clickThroughUrl; | |
| 12297 /** | |
| 12298 * Click-through URL suffix properties for this ad. Applies to the URL in the | |
| 12299 * ad or (if overriding ad properties) the URL in the creative. | |
| 12300 */ | |
| 12301 ClickThroughUrlSuffixProperties clickThroughUrlSuffixProperties; | |
| 12302 /** Comments for this ad. */ | |
| 12303 core.String comments; | |
| 12304 /** | |
| 12305 * Compatibility of this ad. Applicable when type is AD_SERVING_DEFAULT_AD. | |
| 12306 * WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile | |
| 12307 * devices for regular or interstitial ads, respectively. APP and | |
| 12308 * APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers | |
| 12309 * to rendering an in-stream video ads developed with the VAST standard. | |
| 12310 * Possible string values are: | |
| 12311 * - "APP" | |
| 12312 * - "APP_INTERSTITIAL" | |
| 12313 * - "IN_STREAM_VIDEO" | |
| 12314 * - "WEB" | |
| 12315 * - "WEB_INTERSTITIAL" | |
| 12316 */ | |
| 12317 core.String compatibility; | |
| 12318 /** Information about the creation of this ad. This is a read-only field. */ | |
| 12319 LastModifiedInfo createInfo; | |
| 12320 /** | |
| 12321 * Creative group assignments for this ad. Applicable when type is | |
| 12322 * AD_SERVING_CLICK_TRACKER. Only one assignment per creative group number is | |
| 12323 * allowed for a maximum of two assignments. | |
| 12324 */ | |
| 12325 core.List<CreativeGroupAssignment> creativeGroupAssignments; | |
| 12326 /** | |
| 12327 * Creative rotation for this ad. Applicable when type is | |
| 12328 * AD_SERVING_DEFAULT_AD, AD_SERVING_STANDARD_AD, or AD_SERVING_TRACKING. When | |
| 12329 * type is AD_SERVING_DEFAULT_AD, this field should have exactly one | |
| 12330 * creativeAssignment. | |
| 12331 */ | |
| 12332 CreativeRotation creativeRotation; | |
| 12333 /** | |
| 12334 * Time and day targeting information for this ad. This field must be left | |
| 12335 * blank if the ad is using a targeting template. Applicable when type is | |
| 12336 * AD_SERVING_STANDARD_AD. | |
| 12337 */ | |
| 12338 DayPartTargeting dayPartTargeting; | |
| 12339 /** Default click-through event tag properties for this ad. */ | |
| 12340 DefaultClickThroughEventTagProperties defaultClickThroughEventTagProperties; | |
| 12341 /** | |
| 12342 * Delivery schedule information for this ad. Applicable when type is | |
| 12343 * AD_SERVING_STANDARD_AD or AD_SERVING_TRACKING. This field along with | |
| 12344 * subfields priority and impressionRatio are required on insertion when type | |
| 12345 * is AD_SERVING_STANDARD_AD. | |
| 12346 */ | |
| 12347 DeliverySchedule deliverySchedule; | |
| 12348 /** | |
| 12349 * Whether this ad is a dynamic click tracker. Applicable when type is | |
| 12350 * AD_SERVING_CLICK_TRACKER. This is a required field on insert, and is | |
| 12351 * read-only after insert. | |
| 12352 */ | |
| 12353 core.bool dynamicClickTracker; | |
| 12354 /** | |
| 12355 * Date and time that this ad should stop serving. Must be later than the | |
| 12356 * start time. This is a required field on insertion. | |
| 12357 */ | |
| 12358 core.DateTime endTime; | |
| 12359 /** Event tag overrides for this ad. */ | |
| 12360 core.List<EventTagOverride> eventTagOverrides; | |
| 12361 /** | |
| 12362 * Geographical targeting information for this ad. This field must be left | |
| 12363 * blank if the ad is using a targeting template. Applicable when type is | |
| 12364 * AD_SERVING_STANDARD_AD. | |
| 12365 */ | |
| 12366 GeoTargeting geoTargeting; | |
| 12367 /** ID of this ad. This is a read-only, auto-generated field. */ | |
| 12368 core.String id; | |
| 12369 /** | |
| 12370 * Dimension value for the ID of this ad. This is a read-only, auto-generated | |
| 12371 * field. | |
| 12372 */ | |
| 12373 DimensionValue idDimensionValue; | |
| 12374 /** | |
| 12375 * Key-value targeting information for this ad. This field must be left blank | |
| 12376 * if the ad is using a targeting template. Applicable when type is | |
| 12377 * AD_SERVING_STANDARD_AD. | |
| 12378 */ | |
| 12379 KeyValueTargetingExpression keyValueTargetingExpression; | |
| 12380 /** | |
| 12381 * Identifies what kind of resource this is. Value: the fixed string | |
| 12382 * "dfareporting#ad". | |
| 12383 */ | |
| 12384 core.String kind; | |
| 12385 /** | |
| 12386 * Information about the most recent modification of this ad. This is a | |
| 12387 * read-only field. | |
| 12388 */ | |
| 12389 LastModifiedInfo lastModifiedInfo; | |
| 12390 /** | |
| 12391 * Name of this ad. This is a required field and must be less than 256 | |
| 12392 * characters long. | |
| 12393 */ | |
| 12394 core.String name; | |
| 12395 /** Placement assignments for this ad. */ | |
| 12396 core.List<PlacementAssignment> placementAssignments; | |
| 12397 /** | |
| 12398 * Remarketing list targeting expression for this ad. This field must be left | |
| 12399 * blank if the ad is using a targeting template. Applicable when type is | |
| 12400 * AD_SERVING_STANDARD_AD. | |
| 12401 */ | |
| 12402 ListTargetingExpression remarketingListExpression; | |
| 12403 /** Size of this ad. Applicable when type is AD_SERVING_DEFAULT_AD. */ | |
| 12404 Size size; | |
| 12405 /** | |
| 12406 * Whether this ad is ssl compliant. This is a read-only field that is | |
| 12407 * auto-generated when the ad is inserted or updated. | |
| 12408 */ | |
| 12409 core.bool sslCompliant; | |
| 12410 /** | |
| 12411 * Whether this ad requires ssl. This is a read-only field that is | |
| 12412 * auto-generated when the ad is inserted or updated. | |
| 12413 */ | |
| 12414 core.bool sslRequired; | |
| 12415 /** | |
| 12416 * Date and time that this ad should start serving. If creating an ad, this | |
| 12417 * field must be a time in the future. This is a required field on insertion. | |
| 12418 */ | |
| 12419 core.DateTime startTime; | |
| 12420 /** | |
| 12421 * Subaccount ID of this ad. This is a read-only field that can be left blank. | |
| 12422 */ | |
| 12423 core.String subaccountId; | |
| 12424 /** | |
| 12425 * Technology platform targeting information for this ad. This field must be | |
| 12426 * left blank if the ad is using a targeting template. Applicable when type is | |
| 12427 * AD_SERVING_STANDARD_AD. | |
| 12428 */ | |
| 12429 TechnologyTargeting technologyTargeting; | |
| 12430 /** | |
| 12431 * Type of ad. This is a required field on insertion. Note that default ads | |
| 12432 * (AD_SERVING_DEFAULT_AD) cannot be created directly (see Creative resource). | |
| 12433 * Possible string values are: | |
| 12434 * - "AD_SERVING_CLICK_TRACKER" | |
| 12435 * - "AD_SERVING_DEFAULT_AD" | |
| 12436 * - "AD_SERVING_STANDARD_AD" | |
| 12437 * - "AD_SERVING_TRACKING" | |
| 12438 */ | |
| 12439 core.String type; | |
| 12440 | |
| 12441 Ad(); | |
| 12442 | |
| 12443 Ad.fromJson(core.Map _json) { | |
| 12444 if (_json.containsKey("accountId")) { | |
| 12445 accountId = _json["accountId"]; | |
| 12446 } | |
| 12447 if (_json.containsKey("active")) { | |
| 12448 active = _json["active"]; | |
| 12449 } | |
| 12450 if (_json.containsKey("advertiserId")) { | |
| 12451 advertiserId = _json["advertiserId"]; | |
| 12452 } | |
| 12453 if (_json.containsKey("advertiserIdDimensionValue")) { | |
| 12454 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser
IdDimensionValue"]); | |
| 12455 } | |
| 12456 if (_json.containsKey("archived")) { | |
| 12457 archived = _json["archived"]; | |
| 12458 } | |
| 12459 if (_json.containsKey("audienceSegmentId")) { | |
| 12460 audienceSegmentId = _json["audienceSegmentId"]; | |
| 12461 } | |
| 12462 if (_json.containsKey("campaignId")) { | |
| 12463 campaignId = _json["campaignId"]; | |
| 12464 } | |
| 12465 if (_json.containsKey("campaignIdDimensionValue")) { | |
| 12466 campaignIdDimensionValue = new DimensionValue.fromJson(_json["campaignIdDi
mensionValue"]); | |
| 12467 } | |
| 12468 if (_json.containsKey("clickThroughUrl")) { | |
| 12469 clickThroughUrl = new ClickThroughUrl.fromJson(_json["clickThroughUrl"]); | |
| 12470 } | |
| 12471 if (_json.containsKey("clickThroughUrlSuffixProperties")) { | |
| 12472 clickThroughUrlSuffixProperties = new ClickThroughUrlSuffixProperties.from
Json(_json["clickThroughUrlSuffixProperties"]); | |
| 12473 } | |
| 12474 if (_json.containsKey("comments")) { | |
| 12475 comments = _json["comments"]; | |
| 12476 } | |
| 12477 if (_json.containsKey("compatibility")) { | |
| 12478 compatibility = _json["compatibility"]; | |
| 12479 } | |
| 12480 if (_json.containsKey("createInfo")) { | |
| 12481 createInfo = new LastModifiedInfo.fromJson(_json["createInfo"]); | |
| 12482 } | |
| 12483 if (_json.containsKey("creativeGroupAssignments")) { | |
| 12484 creativeGroupAssignments = _json["creativeGroupAssignments"].map((value) =
> new CreativeGroupAssignment.fromJson(value)).toList(); | |
| 12485 } | |
| 12486 if (_json.containsKey("creativeRotation")) { | |
| 12487 creativeRotation = new CreativeRotation.fromJson(_json["creativeRotation"]
); | |
| 12488 } | |
| 12489 if (_json.containsKey("dayPartTargeting")) { | |
| 12490 dayPartTargeting = new DayPartTargeting.fromJson(_json["dayPartTargeting"]
); | |
| 12491 } | |
| 12492 if (_json.containsKey("defaultClickThroughEventTagProperties")) { | |
| 12493 defaultClickThroughEventTagProperties = new DefaultClickThroughEventTagPro
perties.fromJson(_json["defaultClickThroughEventTagProperties"]); | |
| 12494 } | |
| 12495 if (_json.containsKey("deliverySchedule")) { | |
| 12496 deliverySchedule = new DeliverySchedule.fromJson(_json["deliverySchedule"]
); | |
| 12497 } | |
| 12498 if (_json.containsKey("dynamicClickTracker")) { | |
| 12499 dynamicClickTracker = _json["dynamicClickTracker"]; | |
| 12500 } | |
| 12501 if (_json.containsKey("endTime")) { | |
| 12502 endTime = core.DateTime.parse(_json["endTime"]); | |
| 12503 } | |
| 12504 if (_json.containsKey("eventTagOverrides")) { | |
| 12505 eventTagOverrides = _json["eventTagOverrides"].map((value) => new EventTag
Override.fromJson(value)).toList(); | |
| 12506 } | |
| 12507 if (_json.containsKey("geoTargeting")) { | |
| 12508 geoTargeting = new GeoTargeting.fromJson(_json["geoTargeting"]); | |
| 12509 } | |
| 12510 if (_json.containsKey("id")) { | |
| 12511 id = _json["id"]; | |
| 12512 } | |
| 12513 if (_json.containsKey("idDimensionValue")) { | |
| 12514 idDimensionValue = new DimensionValue.fromJson(_json["idDimensionValue"]); | |
| 12515 } | |
| 12516 if (_json.containsKey("keyValueTargetingExpression")) { | |
| 12517 keyValueTargetingExpression = new KeyValueTargetingExpression.fromJson(_js
on["keyValueTargetingExpression"]); | |
| 12518 } | |
| 12519 if (_json.containsKey("kind")) { | |
| 12520 kind = _json["kind"]; | |
| 12521 } | |
| 12522 if (_json.containsKey("lastModifiedInfo")) { | |
| 12523 lastModifiedInfo = new LastModifiedInfo.fromJson(_json["lastModifiedInfo"]
); | |
| 12524 } | |
| 12525 if (_json.containsKey("name")) { | |
| 12526 name = _json["name"]; | |
| 12527 } | |
| 12528 if (_json.containsKey("placementAssignments")) { | |
| 12529 placementAssignments = _json["placementAssignments"].map((value) => new Pl
acementAssignment.fromJson(value)).toList(); | |
| 12530 } | |
| 12531 if (_json.containsKey("remarketingListExpression")) { | |
| 12532 remarketingListExpression = new ListTargetingExpression.fromJson(_json["re
marketingListExpression"]); | |
| 12533 } | |
| 12534 if (_json.containsKey("size")) { | |
| 12535 size = new Size.fromJson(_json["size"]); | |
| 12536 } | |
| 12537 if (_json.containsKey("sslCompliant")) { | |
| 12538 sslCompliant = _json["sslCompliant"]; | |
| 12539 } | |
| 12540 if (_json.containsKey("sslRequired")) { | |
| 12541 sslRequired = _json["sslRequired"]; | |
| 12542 } | |
| 12543 if (_json.containsKey("startTime")) { | |
| 12544 startTime = core.DateTime.parse(_json["startTime"]); | |
| 12545 } | |
| 12546 if (_json.containsKey("subaccountId")) { | |
| 12547 subaccountId = _json["subaccountId"]; | |
| 12548 } | |
| 12549 if (_json.containsKey("technologyTargeting")) { | |
| 12550 technologyTargeting = new TechnologyTargeting.fromJson(_json["technologyTa
rgeting"]); | |
| 12551 } | |
| 12552 if (_json.containsKey("type")) { | |
| 12553 type = _json["type"]; | |
| 12554 } | |
| 12555 } | |
| 12556 | |
| 12557 core.Map toJson() { | |
| 12558 var _json = new core.Map(); | |
| 12559 if (accountId != null) { | |
| 12560 _json["accountId"] = accountId; | |
| 12561 } | |
| 12562 if (active != null) { | |
| 12563 _json["active"] = active; | |
| 12564 } | |
| 12565 if (advertiserId != null) { | |
| 12566 _json["advertiserId"] = advertiserId; | |
| 12567 } | |
| 12568 if (advertiserIdDimensionValue != null) { | |
| 12569 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson(
); | |
| 12570 } | |
| 12571 if (archived != null) { | |
| 12572 _json["archived"] = archived; | |
| 12573 } | |
| 12574 if (audienceSegmentId != null) { | |
| 12575 _json["audienceSegmentId"] = audienceSegmentId; | |
| 12576 } | |
| 12577 if (campaignId != null) { | |
| 12578 _json["campaignId"] = campaignId; | |
| 12579 } | |
| 12580 if (campaignIdDimensionValue != null) { | |
| 12581 _json["campaignIdDimensionValue"] = (campaignIdDimensionValue).toJson(); | |
| 12582 } | |
| 12583 if (clickThroughUrl != null) { | |
| 12584 _json["clickThroughUrl"] = (clickThroughUrl).toJson(); | |
| 12585 } | |
| 12586 if (clickThroughUrlSuffixProperties != null) { | |
| 12587 _json["clickThroughUrlSuffixProperties"] = (clickThroughUrlSuffixPropertie
s).toJson(); | |
| 12588 } | |
| 12589 if (comments != null) { | |
| 12590 _json["comments"] = comments; | |
| 12591 } | |
| 12592 if (compatibility != null) { | |
| 12593 _json["compatibility"] = compatibility; | |
| 12594 } | |
| 12595 if (createInfo != null) { | |
| 12596 _json["createInfo"] = (createInfo).toJson(); | |
| 12597 } | |
| 12598 if (creativeGroupAssignments != null) { | |
| 12599 _json["creativeGroupAssignments"] = creativeGroupAssignments.map((value) =
> (value).toJson()).toList(); | |
| 12600 } | |
| 12601 if (creativeRotation != null) { | |
| 12602 _json["creativeRotation"] = (creativeRotation).toJson(); | |
| 12603 } | |
| 12604 if (dayPartTargeting != null) { | |
| 12605 _json["dayPartTargeting"] = (dayPartTargeting).toJson(); | |
| 12606 } | |
| 12607 if (defaultClickThroughEventTagProperties != null) { | |
| 12608 _json["defaultClickThroughEventTagProperties"] = (defaultClickThroughEvent
TagProperties).toJson(); | |
| 12609 } | |
| 12610 if (deliverySchedule != null) { | |
| 12611 _json["deliverySchedule"] = (deliverySchedule).toJson(); | |
| 12612 } | |
| 12613 if (dynamicClickTracker != null) { | |
| 12614 _json["dynamicClickTracker"] = dynamicClickTracker; | |
| 12615 } | |
| 12616 if (endTime != null) { | |
| 12617 _json["endTime"] = (endTime).toIso8601String(); | |
| 12618 } | |
| 12619 if (eventTagOverrides != null) { | |
| 12620 _json["eventTagOverrides"] = eventTagOverrides.map((value) => (value).toJs
on()).toList(); | |
| 12621 } | |
| 12622 if (geoTargeting != null) { | |
| 12623 _json["geoTargeting"] = (geoTargeting).toJson(); | |
| 12624 } | |
| 12625 if (id != null) { | |
| 12626 _json["id"] = id; | |
| 12627 } | |
| 12628 if (idDimensionValue != null) { | |
| 12629 _json["idDimensionValue"] = (idDimensionValue).toJson(); | |
| 12630 } | |
| 12631 if (keyValueTargetingExpression != null) { | |
| 12632 _json["keyValueTargetingExpression"] = (keyValueTargetingExpression).toJso
n(); | |
| 12633 } | |
| 12634 if (kind != null) { | |
| 12635 _json["kind"] = kind; | |
| 12636 } | |
| 12637 if (lastModifiedInfo != null) { | |
| 12638 _json["lastModifiedInfo"] = (lastModifiedInfo).toJson(); | |
| 12639 } | |
| 12640 if (name != null) { | |
| 12641 _json["name"] = name; | |
| 12642 } | |
| 12643 if (placementAssignments != null) { | |
| 12644 _json["placementAssignments"] = placementAssignments.map((value) => (value
).toJson()).toList(); | |
| 12645 } | |
| 12646 if (remarketingListExpression != null) { | |
| 12647 _json["remarketingListExpression"] = (remarketingListExpression).toJson(); | |
| 12648 } | |
| 12649 if (size != null) { | |
| 12650 _json["size"] = (size).toJson(); | |
| 12651 } | |
| 12652 if (sslCompliant != null) { | |
| 12653 _json["sslCompliant"] = sslCompliant; | |
| 12654 } | |
| 12655 if (sslRequired != null) { | |
| 12656 _json["sslRequired"] = sslRequired; | |
| 12657 } | |
| 12658 if (startTime != null) { | |
| 12659 _json["startTime"] = (startTime).toIso8601String(); | |
| 12660 } | |
| 12661 if (subaccountId != null) { | |
| 12662 _json["subaccountId"] = subaccountId; | |
| 12663 } | |
| 12664 if (technologyTargeting != null) { | |
| 12665 _json["technologyTargeting"] = (technologyTargeting).toJson(); | |
| 12666 } | |
| 12667 if (type != null) { | |
| 12668 _json["type"] = type; | |
| 12669 } | |
| 12670 return _json; | |
| 12671 } | |
| 12672 } | |
| 12673 | |
| 12674 /** Ad Slot */ | |
| 12675 class AdSlot { | |
| 12676 /** Comment for this ad slot. */ | |
| 12677 core.String comment; | |
| 12678 /** | |
| 12679 * Ad slot compatibility. WEB and WEB_INTERSTITIAL refer to rendering either | |
| 12680 * on desktop or on mobile devices for regular or interstitial ads | |
| 12681 * respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. | |
| 12682 * IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with | |
| 12683 * the VAST standard. | |
| 12684 * Possible string values are: | |
| 12685 * - "PLANNING_RENDERING_ENVIRONMENT_TYPE_APP" | |
| 12686 * - "PLANNING_RENDERING_ENVIRONMENT_TYPE_APP_INTERSTITIAL" | |
| 12687 * - "PLANNING_RENDERING_ENVIRONMENT_TYPE_IN_STREAM_VIDEO" | |
| 12688 * - "PLANNING_RENDERING_ENVIRONMENT_TYPE_WEB" | |
| 12689 * - "PLANNING_RENDERING_ENVIRONMENT_TYPE_WEB_INTERSTITIAL" | |
| 12690 */ | |
| 12691 core.String compatibility; | |
| 12692 /** Height of this ad slot. */ | |
| 12693 core.String height; | |
| 12694 /** | |
| 12695 * ID of the placement from an external platform that is linked to this ad | |
| 12696 * slot. | |
| 12697 */ | |
| 12698 core.String linkedPlacementId; | |
| 12699 /** Name of this ad slot. */ | |
| 12700 core.String name; | |
| 12701 /** | |
| 12702 * Payment source type of this ad slot. | |
| 12703 * Possible string values are: | |
| 12704 * - "PLANNING_PAYMENT_SOURCE_TYPE_AGENCY_PAID" | |
| 12705 * - "PLANNING_PAYMENT_SOURCE_TYPE_PUBLISHER_PAID" | |
| 12706 */ | |
| 12707 core.String paymentSourceType; | |
| 12708 /** Primary ad slot of a roadblock inventory item. */ | |
| 12709 core.bool primary; | |
| 12710 /** Width of this ad slot. */ | |
| 12711 core.String width; | |
| 12712 | |
| 12713 AdSlot(); | |
| 12714 | |
| 12715 AdSlot.fromJson(core.Map _json) { | |
| 12716 if (_json.containsKey("comment")) { | |
| 12717 comment = _json["comment"]; | |
| 12718 } | |
| 12719 if (_json.containsKey("compatibility")) { | |
| 12720 compatibility = _json["compatibility"]; | |
| 12721 } | |
| 12722 if (_json.containsKey("height")) { | |
| 12723 height = _json["height"]; | |
| 12724 } | |
| 12725 if (_json.containsKey("linkedPlacementId")) { | |
| 12726 linkedPlacementId = _json["linkedPlacementId"]; | |
| 12727 } | |
| 12728 if (_json.containsKey("name")) { | |
| 12729 name = _json["name"]; | |
| 12730 } | |
| 12731 if (_json.containsKey("paymentSourceType")) { | |
| 12732 paymentSourceType = _json["paymentSourceType"]; | |
| 12733 } | |
| 12734 if (_json.containsKey("primary")) { | |
| 12735 primary = _json["primary"]; | |
| 12736 } | |
| 12737 if (_json.containsKey("width")) { | |
| 12738 width = _json["width"]; | |
| 12739 } | |
| 12740 } | |
| 12741 | |
| 12742 core.Map toJson() { | |
| 12743 var _json = new core.Map(); | |
| 12744 if (comment != null) { | |
| 12745 _json["comment"] = comment; | |
| 12746 } | |
| 12747 if (compatibility != null) { | |
| 12748 _json["compatibility"] = compatibility; | |
| 12749 } | |
| 12750 if (height != null) { | |
| 12751 _json["height"] = height; | |
| 12752 } | |
| 12753 if (linkedPlacementId != null) { | |
| 12754 _json["linkedPlacementId"] = linkedPlacementId; | |
| 12755 } | |
| 12756 if (name != null) { | |
| 12757 _json["name"] = name; | |
| 12758 } | |
| 12759 if (paymentSourceType != null) { | |
| 12760 _json["paymentSourceType"] = paymentSourceType; | |
| 12761 } | |
| 12762 if (primary != null) { | |
| 12763 _json["primary"] = primary; | |
| 12764 } | |
| 12765 if (width != null) { | |
| 12766 _json["width"] = width; | |
| 12767 } | |
| 12768 return _json; | |
| 12769 } | |
| 12770 } | |
| 12771 | |
| 12772 /** Ad List Response */ | |
| 12773 class AdsListResponse { | |
| 12774 /** Ad collection. */ | |
| 12775 core.List<Ad> ads; | |
| 12776 /** | |
| 12777 * Identifies what kind of resource this is. Value: the fixed string | |
| 12778 * "dfareporting#adsListResponse". | |
| 12779 */ | |
| 12780 core.String kind; | |
| 12781 /** Pagination token to be used for the next list operation. */ | |
| 12782 core.String nextPageToken; | |
| 12783 | |
| 12784 AdsListResponse(); | |
| 12785 | |
| 12786 AdsListResponse.fromJson(core.Map _json) { | |
| 12787 if (_json.containsKey("ads")) { | |
| 12788 ads = _json["ads"].map((value) => new Ad.fromJson(value)).toList(); | |
| 12789 } | |
| 12790 if (_json.containsKey("kind")) { | |
| 12791 kind = _json["kind"]; | |
| 12792 } | |
| 12793 if (_json.containsKey("nextPageToken")) { | |
| 12794 nextPageToken = _json["nextPageToken"]; | |
| 12795 } | |
| 12796 } | |
| 12797 | |
| 12798 core.Map toJson() { | |
| 12799 var _json = new core.Map(); | |
| 12800 if (ads != null) { | |
| 12801 _json["ads"] = ads.map((value) => (value).toJson()).toList(); | |
| 12802 } | |
| 12803 if (kind != null) { | |
| 12804 _json["kind"] = kind; | |
| 12805 } | |
| 12806 if (nextPageToken != null) { | |
| 12807 _json["nextPageToken"] = nextPageToken; | |
| 12808 } | |
| 12809 return _json; | |
| 12810 } | |
| 12811 } | |
| 12812 | |
| 12813 /** Contains properties of a DCM advertiser. */ | |
| 12814 class Advertiser { | |
| 12815 /** | |
| 12816 * Account ID of this advertiser.This is a read-only field that can be left | |
| 12817 * blank. | |
| 12818 */ | |
| 12819 core.String accountId; | |
| 12820 /** | |
| 12821 * ID of the advertiser group this advertiser belongs to. You can group | |
| 12822 * advertisers for reporting purposes, allowing you to see aggregated | |
| 12823 * information for all advertisers in each group. | |
| 12824 */ | |
| 12825 core.String advertiserGroupId; | |
| 12826 /** | |
| 12827 * Suffix added to click-through URL of ad creative associations under this | |
| 12828 * advertiser. Must be less than 129 characters long. | |
| 12829 */ | |
| 12830 core.String clickThroughUrlSuffix; | |
| 12831 /** | |
| 12832 * ID of the click-through event tag to apply by default to the landing pages | |
| 12833 * of this advertiser's campaigns. | |
| 12834 */ | |
| 12835 core.String defaultClickThroughEventTagId; | |
| 12836 /** Default email address used in sender field for tag emails. */ | |
| 12837 core.String defaultEmail; | |
| 12838 /** | |
| 12839 * Floodlight configuration ID of this advertiser. The floodlight | |
| 12840 * configuration ID will be created automatically, so on insert this field | |
| 12841 * should be left blank. This field can be set to another advertiser's | |
| 12842 * floodlight configuration ID in order to share that advertiser's floodlight | |
| 12843 * configuration with this advertiser, so long as: | |
| 12844 * - This advertiser's original floodlight configuration is not already | |
| 12845 * associated with floodlight activities or floodlight activity groups. | |
| 12846 * - This advertiser's original floodlight configuration is not already shared | |
| 12847 * with another advertiser. | |
| 12848 */ | |
| 12849 core.String floodlightConfigurationId; | |
| 12850 /** | |
| 12851 * Dimension value for the ID of the floodlight configuration. This is a | |
| 12852 * read-only, auto-generated field. | |
| 12853 */ | |
| 12854 DimensionValue floodlightConfigurationIdDimensionValue; | |
| 12855 /** ID of this advertiser. This is a read-only, auto-generated field. */ | |
| 12856 core.String id; | |
| 12857 /** | |
| 12858 * Dimension value for the ID of this advertiser. This is a read-only, | |
| 12859 * auto-generated field. | |
| 12860 */ | |
| 12861 DimensionValue idDimensionValue; | |
| 12862 /** | |
| 12863 * Identifies what kind of resource this is. Value: the fixed string | |
| 12864 * "dfareporting#advertiser". | |
| 12865 */ | |
| 12866 core.String kind; | |
| 12867 /** | |
| 12868 * Name of this advertiser. This is a required field and must be less than 256 | |
| 12869 * characters long and unique among advertisers of the same account. | |
| 12870 */ | |
| 12871 core.String name; | |
| 12872 /** | |
| 12873 * Original floodlight configuration before any sharing occurred. Set the | |
| 12874 * floodlightConfigurationId of this advertiser to | |
| 12875 * originalFloodlightConfigurationId to unshare the advertiser's current | |
| 12876 * floodlight configuration. You cannot unshare an advertiser's floodlight | |
| 12877 * configuration if the shared configuration has activities associated with | |
| 12878 * any campaign or placement. | |
| 12879 */ | |
| 12880 core.String originalFloodlightConfigurationId; | |
| 12881 /** | |
| 12882 * Status of this advertiser. | |
| 12883 * Possible string values are: | |
| 12884 * - "APPROVED" | |
| 12885 * - "ON_HOLD" | |
| 12886 */ | |
| 12887 core.String status; | |
| 12888 /** | |
| 12889 * Subaccount ID of this advertiser.This is a read-only field that can be left | |
| 12890 * blank. | |
| 12891 */ | |
| 12892 core.String subaccountId; | |
| 12893 /** Suspension status of this advertiser. */ | |
| 12894 core.bool suspended; | |
| 12895 | |
| 12896 Advertiser(); | |
| 12897 | |
| 12898 Advertiser.fromJson(core.Map _json) { | |
| 12899 if (_json.containsKey("accountId")) { | |
| 12900 accountId = _json["accountId"]; | |
| 12901 } | |
| 12902 if (_json.containsKey("advertiserGroupId")) { | |
| 12903 advertiserGroupId = _json["advertiserGroupId"]; | |
| 12904 } | |
| 12905 if (_json.containsKey("clickThroughUrlSuffix")) { | |
| 12906 clickThroughUrlSuffix = _json["clickThroughUrlSuffix"]; | |
| 12907 } | |
| 12908 if (_json.containsKey("defaultClickThroughEventTagId")) { | |
| 12909 defaultClickThroughEventTagId = _json["defaultClickThroughEventTagId"]; | |
| 12910 } | |
| 12911 if (_json.containsKey("defaultEmail")) { | |
| 12912 defaultEmail = _json["defaultEmail"]; | |
| 12913 } | |
| 12914 if (_json.containsKey("floodlightConfigurationId")) { | |
| 12915 floodlightConfigurationId = _json["floodlightConfigurationId"]; | |
| 12916 } | |
| 12917 if (_json.containsKey("floodlightConfigurationIdDimensionValue")) { | |
| 12918 floodlightConfigurationIdDimensionValue = new DimensionValue.fromJson(_jso
n["floodlightConfigurationIdDimensionValue"]); | |
| 12919 } | |
| 12920 if (_json.containsKey("id")) { | |
| 12921 id = _json["id"]; | |
| 12922 } | |
| 12923 if (_json.containsKey("idDimensionValue")) { | |
| 12924 idDimensionValue = new DimensionValue.fromJson(_json["idDimensionValue"]); | |
| 12925 } | |
| 12926 if (_json.containsKey("kind")) { | |
| 12927 kind = _json["kind"]; | |
| 12928 } | |
| 12929 if (_json.containsKey("name")) { | |
| 12930 name = _json["name"]; | |
| 12931 } | |
| 12932 if (_json.containsKey("originalFloodlightConfigurationId")) { | |
| 12933 originalFloodlightConfigurationId = _json["originalFloodlightConfiguration
Id"]; | |
| 12934 } | |
| 12935 if (_json.containsKey("status")) { | |
| 12936 status = _json["status"]; | |
| 12937 } | |
| 12938 if (_json.containsKey("subaccountId")) { | |
| 12939 subaccountId = _json["subaccountId"]; | |
| 12940 } | |
| 12941 if (_json.containsKey("suspended")) { | |
| 12942 suspended = _json["suspended"]; | |
| 12943 } | |
| 12944 } | |
| 12945 | |
| 12946 core.Map toJson() { | |
| 12947 var _json = new core.Map(); | |
| 12948 if (accountId != null) { | |
| 12949 _json["accountId"] = accountId; | |
| 12950 } | |
| 12951 if (advertiserGroupId != null) { | |
| 12952 _json["advertiserGroupId"] = advertiserGroupId; | |
| 12953 } | |
| 12954 if (clickThroughUrlSuffix != null) { | |
| 12955 _json["clickThroughUrlSuffix"] = clickThroughUrlSuffix; | |
| 12956 } | |
| 12957 if (defaultClickThroughEventTagId != null) { | |
| 12958 _json["defaultClickThroughEventTagId"] = defaultClickThroughEventTagId; | |
| 12959 } | |
| 12960 if (defaultEmail != null) { | |
| 12961 _json["defaultEmail"] = defaultEmail; | |
| 12962 } | |
| 12963 if (floodlightConfigurationId != null) { | |
| 12964 _json["floodlightConfigurationId"] = floodlightConfigurationId; | |
| 12965 } | |
| 12966 if (floodlightConfigurationIdDimensionValue != null) { | |
| 12967 _json["floodlightConfigurationIdDimensionValue"] = (floodlightConfiguratio
nIdDimensionValue).toJson(); | |
| 12968 } | |
| 12969 if (id != null) { | |
| 12970 _json["id"] = id; | |
| 12971 } | |
| 12972 if (idDimensionValue != null) { | |
| 12973 _json["idDimensionValue"] = (idDimensionValue).toJson(); | |
| 12974 } | |
| 12975 if (kind != null) { | |
| 12976 _json["kind"] = kind; | |
| 12977 } | |
| 12978 if (name != null) { | |
| 12979 _json["name"] = name; | |
| 12980 } | |
| 12981 if (originalFloodlightConfigurationId != null) { | |
| 12982 _json["originalFloodlightConfigurationId"] = originalFloodlightConfigurati
onId; | |
| 12983 } | |
| 12984 if (status != null) { | |
| 12985 _json["status"] = status; | |
| 12986 } | |
| 12987 if (subaccountId != null) { | |
| 12988 _json["subaccountId"] = subaccountId; | |
| 12989 } | |
| 12990 if (suspended != null) { | |
| 12991 _json["suspended"] = suspended; | |
| 12992 } | |
| 12993 return _json; | |
| 12994 } | |
| 12995 } | |
| 12996 | |
| 12997 /** | |
| 12998 * Groups advertisers together so that reports can be generated for the entire | |
| 12999 * group at once. | |
| 13000 */ | |
| 13001 class AdvertiserGroup { | |
| 13002 /** | |
| 13003 * Account ID of this advertiser group. This is a read-only field that can be | |
| 13004 * left blank. | |
| 13005 */ | |
| 13006 core.String accountId; | |
| 13007 /** | |
| 13008 * ID of this advertiser group. This is a read-only, auto-generated field. | |
| 13009 */ | |
| 13010 core.String id; | |
| 13011 /** | |
| 13012 * Identifies what kind of resource this is. Value: the fixed string | |
| 13013 * "dfareporting#advertiserGroup". | |
| 13014 */ | |
| 13015 core.String kind; | |
| 13016 /** | |
| 13017 * Name of this advertiser group. This is a required field and must be less | |
| 13018 * than 256 characters long and unique among advertiser groups of the same | |
| 13019 * account. | |
| 13020 */ | |
| 13021 core.String name; | |
| 13022 | |
| 13023 AdvertiserGroup(); | |
| 13024 | |
| 13025 AdvertiserGroup.fromJson(core.Map _json) { | |
| 13026 if (_json.containsKey("accountId")) { | |
| 13027 accountId = _json["accountId"]; | |
| 13028 } | |
| 13029 if (_json.containsKey("id")) { | |
| 13030 id = _json["id"]; | |
| 13031 } | |
| 13032 if (_json.containsKey("kind")) { | |
| 13033 kind = _json["kind"]; | |
| 13034 } | |
| 13035 if (_json.containsKey("name")) { | |
| 13036 name = _json["name"]; | |
| 13037 } | |
| 13038 } | |
| 13039 | |
| 13040 core.Map toJson() { | |
| 13041 var _json = new core.Map(); | |
| 13042 if (accountId != null) { | |
| 13043 _json["accountId"] = accountId; | |
| 13044 } | |
| 13045 if (id != null) { | |
| 13046 _json["id"] = id; | |
| 13047 } | |
| 13048 if (kind != null) { | |
| 13049 _json["kind"] = kind; | |
| 13050 } | |
| 13051 if (name != null) { | |
| 13052 _json["name"] = name; | |
| 13053 } | |
| 13054 return _json; | |
| 13055 } | |
| 13056 } | |
| 13057 | |
| 13058 /** Advertiser Group List Response */ | |
| 13059 class AdvertiserGroupsListResponse { | |
| 13060 /** Advertiser group collection. */ | |
| 13061 core.List<AdvertiserGroup> advertiserGroups; | |
| 13062 /** | |
| 13063 * Identifies what kind of resource this is. Value: the fixed string | |
| 13064 * "dfareporting#advertiserGroupsListResponse". | |
| 13065 */ | |
| 13066 core.String kind; | |
| 13067 /** Pagination token to be used for the next list operation. */ | |
| 13068 core.String nextPageToken; | |
| 13069 | |
| 13070 AdvertiserGroupsListResponse(); | |
| 13071 | |
| 13072 AdvertiserGroupsListResponse.fromJson(core.Map _json) { | |
| 13073 if (_json.containsKey("advertiserGroups")) { | |
| 13074 advertiserGroups = _json["advertiserGroups"].map((value) => new Advertiser
Group.fromJson(value)).toList(); | |
| 13075 } | |
| 13076 if (_json.containsKey("kind")) { | |
| 13077 kind = _json["kind"]; | |
| 13078 } | |
| 13079 if (_json.containsKey("nextPageToken")) { | |
| 13080 nextPageToken = _json["nextPageToken"]; | |
| 13081 } | |
| 13082 } | |
| 13083 | |
| 13084 core.Map toJson() { | |
| 13085 var _json = new core.Map(); | |
| 13086 if (advertiserGroups != null) { | |
| 13087 _json["advertiserGroups"] = advertiserGroups.map((value) => (value).toJson
()).toList(); | |
| 13088 } | |
| 13089 if (kind != null) { | |
| 13090 _json["kind"] = kind; | |
| 13091 } | |
| 13092 if (nextPageToken != null) { | |
| 13093 _json["nextPageToken"] = nextPageToken; | |
| 13094 } | |
| 13095 return _json; | |
| 13096 } | |
| 13097 } | |
| 13098 | |
| 13099 /** Advertiser List Response */ | |
| 13100 class AdvertisersListResponse { | |
| 13101 /** Advertiser collection. */ | |
| 13102 core.List<Advertiser> advertisers; | |
| 13103 /** | |
| 13104 * Identifies what kind of resource this is. Value: the fixed string | |
| 13105 * "dfareporting#advertisersListResponse". | |
| 13106 */ | |
| 13107 core.String kind; | |
| 13108 /** Pagination token to be used for the next list operation. */ | |
| 13109 core.String nextPageToken; | |
| 13110 | |
| 13111 AdvertisersListResponse(); | |
| 13112 | |
| 13113 AdvertisersListResponse.fromJson(core.Map _json) { | |
| 13114 if (_json.containsKey("advertisers")) { | |
| 13115 advertisers = _json["advertisers"].map((value) => new Advertiser.fromJson(
value)).toList(); | |
| 13116 } | |
| 13117 if (_json.containsKey("kind")) { | |
| 13118 kind = _json["kind"]; | |
| 13119 } | |
| 13120 if (_json.containsKey("nextPageToken")) { | |
| 13121 nextPageToken = _json["nextPageToken"]; | |
| 13122 } | |
| 13123 } | |
| 13124 | |
| 13125 core.Map toJson() { | |
| 13126 var _json = new core.Map(); | |
| 13127 if (advertisers != null) { | |
| 13128 _json["advertisers"] = advertisers.map((value) => (value).toJson()).toList
(); | |
| 13129 } | |
| 13130 if (kind != null) { | |
| 13131 _json["kind"] = kind; | |
| 13132 } | |
| 13133 if (nextPageToken != null) { | |
| 13134 _json["nextPageToken"] = nextPageToken; | |
| 13135 } | |
| 13136 return _json; | |
| 13137 } | |
| 13138 } | |
| 13139 | |
| 13140 /** Audience Segment. */ | |
| 13141 class AudienceSegment { | |
| 13142 /** | |
| 13143 * Weight allocated to this segment. Must be between 1 and 1000. The weight | |
| 13144 * assigned will be understood in proportion to the weights assigned to other | |
| 13145 * segments in the same segment group. | |
| 13146 */ | |
| 13147 core.int allocation; | |
| 13148 /** | |
| 13149 * ID of this audience segment. This is a read-only, auto-generated field. | |
| 13150 */ | |
| 13151 core.String id; | |
| 13152 /** | |
| 13153 * Name of this audience segment. This is a required field and must be less | |
| 13154 * than 65 characters long. | |
| 13155 */ | |
| 13156 core.String name; | |
| 13157 | |
| 13158 AudienceSegment(); | |
| 13159 | |
| 13160 AudienceSegment.fromJson(core.Map _json) { | |
| 13161 if (_json.containsKey("allocation")) { | |
| 13162 allocation = _json["allocation"]; | |
| 13163 } | |
| 13164 if (_json.containsKey("id")) { | |
| 13165 id = _json["id"]; | |
| 13166 } | |
| 13167 if (_json.containsKey("name")) { | |
| 13168 name = _json["name"]; | |
| 13169 } | |
| 13170 } | |
| 13171 | |
| 13172 core.Map toJson() { | |
| 13173 var _json = new core.Map(); | |
| 13174 if (allocation != null) { | |
| 13175 _json["allocation"] = allocation; | |
| 13176 } | |
| 13177 if (id != null) { | |
| 13178 _json["id"] = id; | |
| 13179 } | |
| 13180 if (name != null) { | |
| 13181 _json["name"] = name; | |
| 13182 } | |
| 13183 return _json; | |
| 13184 } | |
| 13185 } | |
| 13186 | |
| 13187 /** Audience Segment Group. */ | |
| 13188 class AudienceSegmentGroup { | |
| 13189 /** | |
| 13190 * Audience segments assigned to this group. The number of segments must be | |
| 13191 * between 2 and 100. | |
| 13192 */ | |
| 13193 core.List<AudienceSegment> audienceSegments; | |
| 13194 /** | |
| 13195 * ID of this audience segment group. This is a read-only, auto-generated | |
| 13196 * field. | |
| 13197 */ | |
| 13198 core.String id; | |
| 13199 /** | |
| 13200 * Name of this audience segment group. This is a required field and must be | |
| 13201 * less than 65 characters long. | |
| 13202 */ | |
| 13203 core.String name; | |
| 13204 | |
| 13205 AudienceSegmentGroup(); | |
| 13206 | |
| 13207 AudienceSegmentGroup.fromJson(core.Map _json) { | |
| 13208 if (_json.containsKey("audienceSegments")) { | |
| 13209 audienceSegments = _json["audienceSegments"].map((value) => new AudienceSe
gment.fromJson(value)).toList(); | |
| 13210 } | |
| 13211 if (_json.containsKey("id")) { | |
| 13212 id = _json["id"]; | |
| 13213 } | |
| 13214 if (_json.containsKey("name")) { | |
| 13215 name = _json["name"]; | |
| 13216 } | |
| 13217 } | |
| 13218 | |
| 13219 core.Map toJson() { | |
| 13220 var _json = new core.Map(); | |
| 13221 if (audienceSegments != null) { | |
| 13222 _json["audienceSegments"] = audienceSegments.map((value) => (value).toJson
()).toList(); | |
| 13223 } | |
| 13224 if (id != null) { | |
| 13225 _json["id"] = id; | |
| 13226 } | |
| 13227 if (name != null) { | |
| 13228 _json["name"] = name; | |
| 13229 } | |
| 13230 return _json; | |
| 13231 } | |
| 13232 } | |
| 13233 | |
| 13234 /** Contains information about a browser that can be targeted by ads. */ | |
| 13235 class Browser { | |
| 13236 /** | |
| 13237 * ID referring to this grouping of browser and version numbers. This is the | |
| 13238 * ID used for targeting. | |
| 13239 */ | |
| 13240 core.String browserVersionId; | |
| 13241 /** DART ID of this browser. This is the ID used when generating reports. */ | |
| 13242 core.String dartId; | |
| 13243 /** | |
| 13244 * Identifies what kind of resource this is. Value: the fixed string | |
| 13245 * "dfareporting#browser". | |
| 13246 */ | |
| 13247 core.String kind; | |
| 13248 /** | |
| 13249 * Major version number (leftmost number) of this browser. For example, for | |
| 13250 * Chrome 5.0.376.86 beta, this field should be set to 5. An asterisk (*) may | |
| 13251 * be used to target any version number, and a question mark (?) may be used | |
| 13252 * to target cases where the version number cannot be identified. For example, | |
| 13253 * Chrome *.* targets any version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome | |
| 13254 * 3.* targets Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases where | |
| 13255 * the ad server knows the browser is Firefox but can't tell which version it | |
| 13256 * is. | |
| 13257 */ | |
| 13258 core.String majorVersion; | |
| 13259 /** | |
| 13260 * Minor version number (number after first dot on left) of this browser. For | |
| 13261 * example, for Chrome 5.0.375.86 beta, this field should be set to 0. An | |
| 13262 * asterisk (*) may be used to target any version number, and a question mark | |
| 13263 * (?) may be used to target cases where the version number cannot be | |
| 13264 * identified. For example, Chrome *.* targets any version of Chrome: 1.2, | |
| 13265 * 2.5, 3.5, and so on. Chrome 3.* targets Chrome 3.1, 3.5, but not 4.0. | |
| 13266 * Firefox ?.? targets cases where the ad server knows the browser is Firefox | |
| 13267 * but can't tell which version it is. | |
| 13268 */ | |
| 13269 core.String minorVersion; | |
| 13270 /** Name of this browser. */ | |
| 13271 core.String name; | |
| 13272 | |
| 13273 Browser(); | |
| 13274 | |
| 13275 Browser.fromJson(core.Map _json) { | |
| 13276 if (_json.containsKey("browserVersionId")) { | |
| 13277 browserVersionId = _json["browserVersionId"]; | |
| 13278 } | |
| 13279 if (_json.containsKey("dartId")) { | |
| 13280 dartId = _json["dartId"]; | |
| 13281 } | |
| 13282 if (_json.containsKey("kind")) { | |
| 13283 kind = _json["kind"]; | |
| 13284 } | |
| 13285 if (_json.containsKey("majorVersion")) { | |
| 13286 majorVersion = _json["majorVersion"]; | |
| 13287 } | |
| 13288 if (_json.containsKey("minorVersion")) { | |
| 13289 minorVersion = _json["minorVersion"]; | |
| 13290 } | |
| 13291 if (_json.containsKey("name")) { | |
| 13292 name = _json["name"]; | |
| 13293 } | |
| 13294 } | |
| 13295 | |
| 13296 core.Map toJson() { | |
| 13297 var _json = new core.Map(); | |
| 13298 if (browserVersionId != null) { | |
| 13299 _json["browserVersionId"] = browserVersionId; | |
| 13300 } | |
| 13301 if (dartId != null) { | |
| 13302 _json["dartId"] = dartId; | |
| 13303 } | |
| 13304 if (kind != null) { | |
| 13305 _json["kind"] = kind; | |
| 13306 } | |
| 13307 if (majorVersion != null) { | |
| 13308 _json["majorVersion"] = majorVersion; | |
| 13309 } | |
| 13310 if (minorVersion != null) { | |
| 13311 _json["minorVersion"] = minorVersion; | |
| 13312 } | |
| 13313 if (name != null) { | |
| 13314 _json["name"] = name; | |
| 13315 } | |
| 13316 return _json; | |
| 13317 } | |
| 13318 } | |
| 13319 | |
| 13320 /** Browser List Response */ | |
| 13321 class BrowsersListResponse { | |
| 13322 /** Browser collection. */ | |
| 13323 core.List<Browser> browsers; | |
| 13324 /** | |
| 13325 * Identifies what kind of resource this is. Value: the fixed string | |
| 13326 * "dfareporting#browsersListResponse". | |
| 13327 */ | |
| 13328 core.String kind; | |
| 13329 | |
| 13330 BrowsersListResponse(); | |
| 13331 | |
| 13332 BrowsersListResponse.fromJson(core.Map _json) { | |
| 13333 if (_json.containsKey("browsers")) { | |
| 13334 browsers = _json["browsers"].map((value) => new Browser.fromJson(value)).t
oList(); | |
| 13335 } | |
| 13336 if (_json.containsKey("kind")) { | |
| 13337 kind = _json["kind"]; | |
| 13338 } | |
| 13339 } | |
| 13340 | |
| 13341 core.Map toJson() { | |
| 13342 var _json = new core.Map(); | |
| 13343 if (browsers != null) { | |
| 13344 _json["browsers"] = browsers.map((value) => (value).toJson()).toList(); | |
| 13345 } | |
| 13346 if (kind != null) { | |
| 13347 _json["kind"] = kind; | |
| 13348 } | |
| 13349 return _json; | |
| 13350 } | |
| 13351 } | |
| 13352 | |
| 13353 /** Contains properties of a DCM campaign. */ | |
| 13354 class Campaign { | |
| 13355 /** | |
| 13356 * Account ID of this campaign. This is a read-only field that can be left | |
| 13357 * blank. | |
| 13358 */ | |
| 13359 core.String accountId; | |
| 13360 /** Additional creative optimization configurations for the campaign. */ | |
| 13361 core.List<CreativeOptimizationConfiguration> additionalCreativeOptimizationCon
figurations; | |
| 13362 /** Advertiser group ID of the associated advertiser. */ | |
| 13363 core.String advertiserGroupId; | |
| 13364 /** Advertiser ID of this campaign. This is a required field. */ | |
| 13365 core.String advertiserId; | |
| 13366 /** | |
| 13367 * Dimension value for the advertiser ID of this campaign. This is a | |
| 13368 * read-only, auto-generated field. | |
| 13369 */ | |
| 13370 DimensionValue advertiserIdDimensionValue; | |
| 13371 /** Whether this campaign has been archived. */ | |
| 13372 core.bool archived; | |
| 13373 /** | |
| 13374 * Audience segment groups assigned to this campaign. Cannot have more than | |
| 13375 * 300 segment groups. | |
| 13376 */ | |
| 13377 core.List<AudienceSegmentGroup> audienceSegmentGroups; | |
| 13378 /** | |
| 13379 * Billing invoice code included in the DCM client billing invoices associated | |
| 13380 * with the campaign. | |
| 13381 */ | |
| 13382 core.String billingInvoiceCode; | |
| 13383 /** Click-through URL suffix override properties for this campaign. */ | |
| 13384 ClickThroughUrlSuffixProperties clickThroughUrlSuffixProperties; | |
| 13385 /** | |
| 13386 * Arbitrary comments about this campaign. Must be less than 256 characters | |
| 13387 * long. | |
| 13388 */ | |
| 13389 core.String comment; | |
| 13390 /** Whether comScore vCE reports are enabled for this campaign. */ | |
| 13391 core.bool comscoreVceEnabled; | |
| 13392 /** | |
| 13393 * Information about the creation of this campaign. This is a read-only field. | |
| 13394 */ | |
| 13395 LastModifiedInfo createInfo; | |
| 13396 /** List of creative group IDs that are assigned to the campaign. */ | |
| 13397 core.List<core.String> creativeGroupIds; | |
| 13398 /** Creative optimization configuration for the campaign. */ | |
| 13399 CreativeOptimizationConfiguration creativeOptimizationConfiguration; | |
| 13400 /** Click-through event tag ID override properties for this campaign. */ | |
| 13401 DefaultClickThroughEventTagProperties defaultClickThroughEventTagProperties; | |
| 13402 /** | |
| 13403 * Date on which the campaign will stop running. On insert, the end date must | |
| 13404 * be today or a future date. The end date must be later than or be the same | |
| 13405 * as the start date. If, for example, you set 6/25/2015 as both the start and | |
| 13406 * end dates, the effective campaign run date is just that day only, | |
| 13407 * 6/25/2015. The hours, minutes, and seconds of the end date should not be | |
| 13408 * set, as doing so will result in an error. This is a required field. | |
| 13409 */ | |
| 13410 core.DateTime endDate; | |
| 13411 /** | |
| 13412 * Overrides that can be used to activate or deactivate advertiser event tags. | |
| 13413 */ | |
| 13414 core.List<EventTagOverride> eventTagOverrides; | |
| 13415 /** External ID for this campaign. */ | |
| 13416 core.String externalId; | |
| 13417 /** ID of this campaign. This is a read-only auto-generated field. */ | |
| 13418 core.String id; | |
| 13419 /** | |
| 13420 * Dimension value for the ID of this campaign. This is a read-only, | |
| 13421 * auto-generated field. | |
| 13422 */ | |
| 13423 DimensionValue idDimensionValue; | |
| 13424 /** | |
| 13425 * Identifies what kind of resource this is. Value: the fixed string | |
| 13426 * "dfareporting#campaign". | |
| 13427 */ | |
| 13428 core.String kind; | |
| 13429 /** | |
| 13430 * Information about the most recent modification of this campaign. This is a | |
| 13431 * read-only field. | |
| 13432 */ | |
| 13433 LastModifiedInfo lastModifiedInfo; | |
| 13434 /** Lookback window settings for the campaign. */ | |
| 13435 LookbackConfiguration lookbackConfiguration; | |
| 13436 /** | |
| 13437 * Name of this campaign. This is a required field and must be less than 256 | |
| 13438 * characters long and unique among campaigns of the same advertiser. | |
| 13439 */ | |
| 13440 core.String name; | |
| 13441 /** Whether Nielsen reports are enabled for this campaign. */ | |
| 13442 core.bool nielsenOcrEnabled; | |
| 13443 /** | |
| 13444 * Date on which the campaign starts running. The start date can be any date. | |
| 13445 * The hours, minutes, and seconds of the start date should not be set, as | |
| 13446 * doing so will result in an error. This is a required field. | |
| 13447 */ | |
| 13448 core.DateTime startDate; | |
| 13449 /** | |
| 13450 * Subaccount ID of this campaign. This is a read-only field that can be left | |
| 13451 * blank. | |
| 13452 */ | |
| 13453 core.String subaccountId; | |
| 13454 /** Campaign trafficker contact emails. */ | |
| 13455 core.List<core.String> traffickerEmails; | |
| 13456 | |
| 13457 Campaign(); | |
| 13458 | |
| 13459 Campaign.fromJson(core.Map _json) { | |
| 13460 if (_json.containsKey("accountId")) { | |
| 13461 accountId = _json["accountId"]; | |
| 13462 } | |
| 13463 if (_json.containsKey("additionalCreativeOptimizationConfigurations")) { | |
| 13464 additionalCreativeOptimizationConfigurations = _json["additionalCreativeOp
timizationConfigurations"].map((value) => new CreativeOptimizationConfiguration.
fromJson(value)).toList(); | |
| 13465 } | |
| 13466 if (_json.containsKey("advertiserGroupId")) { | |
| 13467 advertiserGroupId = _json["advertiserGroupId"]; | |
| 13468 } | |
| 13469 if (_json.containsKey("advertiserId")) { | |
| 13470 advertiserId = _json["advertiserId"]; | |
| 13471 } | |
| 13472 if (_json.containsKey("advertiserIdDimensionValue")) { | |
| 13473 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser
IdDimensionValue"]); | |
| 13474 } | |
| 13475 if (_json.containsKey("archived")) { | |
| 13476 archived = _json["archived"]; | |
| 13477 } | |
| 13478 if (_json.containsKey("audienceSegmentGroups")) { | |
| 13479 audienceSegmentGroups = _json["audienceSegmentGroups"].map((value) => new
AudienceSegmentGroup.fromJson(value)).toList(); | |
| 13480 } | |
| 13481 if (_json.containsKey("billingInvoiceCode")) { | |
| 13482 billingInvoiceCode = _json["billingInvoiceCode"]; | |
| 13483 } | |
| 13484 if (_json.containsKey("clickThroughUrlSuffixProperties")) { | |
| 13485 clickThroughUrlSuffixProperties = new ClickThroughUrlSuffixProperties.from
Json(_json["clickThroughUrlSuffixProperties"]); | |
| 13486 } | |
| 13487 if (_json.containsKey("comment")) { | |
| 13488 comment = _json["comment"]; | |
| 13489 } | |
| 13490 if (_json.containsKey("comscoreVceEnabled")) { | |
| 13491 comscoreVceEnabled = _json["comscoreVceEnabled"]; | |
| 13492 } | |
| 13493 if (_json.containsKey("createInfo")) { | |
| 13494 createInfo = new LastModifiedInfo.fromJson(_json["createInfo"]); | |
| 13495 } | |
| 13496 if (_json.containsKey("creativeGroupIds")) { | |
| 13497 creativeGroupIds = _json["creativeGroupIds"]; | |
| 13498 } | |
| 13499 if (_json.containsKey("creativeOptimizationConfiguration")) { | |
| 13500 creativeOptimizationConfiguration = new CreativeOptimizationConfiguration.
fromJson(_json["creativeOptimizationConfiguration"]); | |
| 13501 } | |
| 13502 if (_json.containsKey("defaultClickThroughEventTagProperties")) { | |
| 13503 defaultClickThroughEventTagProperties = new DefaultClickThroughEventTagPro
perties.fromJson(_json["defaultClickThroughEventTagProperties"]); | |
| 13504 } | |
| 13505 if (_json.containsKey("endDate")) { | |
| 13506 endDate = core.DateTime.parse(_json["endDate"]); | |
| 13507 } | |
| 13508 if (_json.containsKey("eventTagOverrides")) { | |
| 13509 eventTagOverrides = _json["eventTagOverrides"].map((value) => new EventTag
Override.fromJson(value)).toList(); | |
| 13510 } | |
| 13511 if (_json.containsKey("externalId")) { | |
| 13512 externalId = _json["externalId"]; | |
| 13513 } | |
| 13514 if (_json.containsKey("id")) { | |
| 13515 id = _json["id"]; | |
| 13516 } | |
| 13517 if (_json.containsKey("idDimensionValue")) { | |
| 13518 idDimensionValue = new DimensionValue.fromJson(_json["idDimensionValue"]); | |
| 13519 } | |
| 13520 if (_json.containsKey("kind")) { | |
| 13521 kind = _json["kind"]; | |
| 13522 } | |
| 13523 if (_json.containsKey("lastModifiedInfo")) { | |
| 13524 lastModifiedInfo = new LastModifiedInfo.fromJson(_json["lastModifiedInfo"]
); | |
| 13525 } | |
| 13526 if (_json.containsKey("lookbackConfiguration")) { | |
| 13527 lookbackConfiguration = new LookbackConfiguration.fromJson(_json["lookback
Configuration"]); | |
| 13528 } | |
| 13529 if (_json.containsKey("name")) { | |
| 13530 name = _json["name"]; | |
| 13531 } | |
| 13532 if (_json.containsKey("nielsenOcrEnabled")) { | |
| 13533 nielsenOcrEnabled = _json["nielsenOcrEnabled"]; | |
| 13534 } | |
| 13535 if (_json.containsKey("startDate")) { | |
| 13536 startDate = core.DateTime.parse(_json["startDate"]); | |
| 13537 } | |
| 13538 if (_json.containsKey("subaccountId")) { | |
| 13539 subaccountId = _json["subaccountId"]; | |
| 13540 } | |
| 13541 if (_json.containsKey("traffickerEmails")) { | |
| 13542 traffickerEmails = _json["traffickerEmails"]; | |
| 13543 } | |
| 13544 } | |
| 13545 | |
| 13546 core.Map toJson() { | |
| 13547 var _json = new core.Map(); | |
| 13548 if (accountId != null) { | |
| 13549 _json["accountId"] = accountId; | |
| 13550 } | |
| 13551 if (additionalCreativeOptimizationConfigurations != null) { | |
| 13552 _json["additionalCreativeOptimizationConfigurations"] = additionalCreative
OptimizationConfigurations.map((value) => (value).toJson()).toList(); | |
| 13553 } | |
| 13554 if (advertiserGroupId != null) { | |
| 13555 _json["advertiserGroupId"] = advertiserGroupId; | |
| 13556 } | |
| 13557 if (advertiserId != null) { | |
| 13558 _json["advertiserId"] = advertiserId; | |
| 13559 } | |
| 13560 if (advertiserIdDimensionValue != null) { | |
| 13561 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson(
); | |
| 13562 } | |
| 13563 if (archived != null) { | |
| 13564 _json["archived"] = archived; | |
| 13565 } | |
| 13566 if (audienceSegmentGroups != null) { | |
| 13567 _json["audienceSegmentGroups"] = audienceSegmentGroups.map((value) => (val
ue).toJson()).toList(); | |
| 13568 } | |
| 13569 if (billingInvoiceCode != null) { | |
| 13570 _json["billingInvoiceCode"] = billingInvoiceCode; | |
| 13571 } | |
| 13572 if (clickThroughUrlSuffixProperties != null) { | |
| 13573 _json["clickThroughUrlSuffixProperties"] = (clickThroughUrlSuffixPropertie
s).toJson(); | |
| 13574 } | |
| 13575 if (comment != null) { | |
| 13576 _json["comment"] = comment; | |
| 13577 } | |
| 13578 if (comscoreVceEnabled != null) { | |
| 13579 _json["comscoreVceEnabled"] = comscoreVceEnabled; | |
| 13580 } | |
| 13581 if (createInfo != null) { | |
| 13582 _json["createInfo"] = (createInfo).toJson(); | |
| 13583 } | |
| 13584 if (creativeGroupIds != null) { | |
| 13585 _json["creativeGroupIds"] = creativeGroupIds; | |
| 13586 } | |
| 13587 if (creativeOptimizationConfiguration != null) { | |
| 13588 _json["creativeOptimizationConfiguration"] = (creativeOptimizationConfigur
ation).toJson(); | |
| 13589 } | |
| 13590 if (defaultClickThroughEventTagProperties != null) { | |
| 13591 _json["defaultClickThroughEventTagProperties"] = (defaultClickThroughEvent
TagProperties).toJson(); | |
| 13592 } | |
| 13593 if (endDate != null) { | |
| 13594 _json["endDate"] = "${(endDate).year.toString().padLeft(4, '0')}-${(endDat
e).month.toString().padLeft(2, '0')}-${(endDate).day.toString().padLeft(2, '0')}
"; | |
| 13595 } | |
| 13596 if (eventTagOverrides != null) { | |
| 13597 _json["eventTagOverrides"] = eventTagOverrides.map((value) => (value).toJs
on()).toList(); | |
| 13598 } | |
| 13599 if (externalId != null) { | |
| 13600 _json["externalId"] = externalId; | |
| 13601 } | |
| 13602 if (id != null) { | |
| 13603 _json["id"] = id; | |
| 13604 } | |
| 13605 if (idDimensionValue != null) { | |
| 13606 _json["idDimensionValue"] = (idDimensionValue).toJson(); | |
| 13607 } | |
| 13608 if (kind != null) { | |
| 13609 _json["kind"] = kind; | |
| 13610 } | |
| 13611 if (lastModifiedInfo != null) { | |
| 13612 _json["lastModifiedInfo"] = (lastModifiedInfo).toJson(); | |
| 13613 } | |
| 13614 if (lookbackConfiguration != null) { | |
| 13615 _json["lookbackConfiguration"] = (lookbackConfiguration).toJson(); | |
| 13616 } | |
| 13617 if (name != null) { | |
| 13618 _json["name"] = name; | |
| 13619 } | |
| 13620 if (nielsenOcrEnabled != null) { | |
| 13621 _json["nielsenOcrEnabled"] = nielsenOcrEnabled; | |
| 13622 } | |
| 13623 if (startDate != null) { | |
| 13624 _json["startDate"] = "${(startDate).year.toString().padLeft(4, '0')}-${(st
artDate).month.toString().padLeft(2, '0')}-${(startDate).day.toString().padLeft(
2, '0')}"; | |
| 13625 } | |
| 13626 if (subaccountId != null) { | |
| 13627 _json["subaccountId"] = subaccountId; | |
| 13628 } | |
| 13629 if (traffickerEmails != null) { | |
| 13630 _json["traffickerEmails"] = traffickerEmails; | |
| 13631 } | |
| 13632 return _json; | |
| 13633 } | |
| 13634 } | |
| 13635 | |
| 13636 /** Identifies a creative which has been associated with a given campaign. */ | |
| 13637 class CampaignCreativeAssociation { | |
| 13638 /** | |
| 13639 * ID of the creative associated with the campaign. This is a required field. | |
| 13640 */ | |
| 13641 core.String creativeId; | |
| 13642 /** | |
| 13643 * Identifies what kind of resource this is. Value: the fixed string | |
| 13644 * "dfareporting#campaignCreativeAssociation". | |
| 13645 */ | |
| 13646 core.String kind; | |
| 13647 | |
| 13648 CampaignCreativeAssociation(); | |
| 13649 | |
| 13650 CampaignCreativeAssociation.fromJson(core.Map _json) { | |
| 13651 if (_json.containsKey("creativeId")) { | |
| 13652 creativeId = _json["creativeId"]; | |
| 13653 } | |
| 13654 if (_json.containsKey("kind")) { | |
| 13655 kind = _json["kind"]; | |
| 13656 } | |
| 13657 } | |
| 13658 | |
| 13659 core.Map toJson() { | |
| 13660 var _json = new core.Map(); | |
| 13661 if (creativeId != null) { | |
| 13662 _json["creativeId"] = creativeId; | |
| 13663 } | |
| 13664 if (kind != null) { | |
| 13665 _json["kind"] = kind; | |
| 13666 } | |
| 13667 return _json; | |
| 13668 } | |
| 13669 } | |
| 13670 | |
| 13671 /** Campaign Creative Association List Response */ | |
| 13672 class CampaignCreativeAssociationsListResponse { | |
| 13673 /** Campaign creative association collection */ | |
| 13674 core.List<CampaignCreativeAssociation> campaignCreativeAssociations; | |
| 13675 /** | |
| 13676 * Identifies what kind of resource this is. Value: the fixed string | |
| 13677 * "dfareporting#campaignCreativeAssociationsListResponse". | |
| 13678 */ | |
| 13679 core.String kind; | |
| 13680 /** Pagination token to be used for the next list operation. */ | |
| 13681 core.String nextPageToken; | |
| 13682 | |
| 13683 CampaignCreativeAssociationsListResponse(); | |
| 13684 | |
| 13685 CampaignCreativeAssociationsListResponse.fromJson(core.Map _json) { | |
| 13686 if (_json.containsKey("campaignCreativeAssociations")) { | |
| 13687 campaignCreativeAssociations = _json["campaignCreativeAssociations"].map((
value) => new CampaignCreativeAssociation.fromJson(value)).toList(); | |
| 13688 } | |
| 13689 if (_json.containsKey("kind")) { | |
| 13690 kind = _json["kind"]; | |
| 13691 } | |
| 13692 if (_json.containsKey("nextPageToken")) { | |
| 13693 nextPageToken = _json["nextPageToken"]; | |
| 13694 } | |
| 13695 } | |
| 13696 | |
| 13697 core.Map toJson() { | |
| 13698 var _json = new core.Map(); | |
| 13699 if (campaignCreativeAssociations != null) { | |
| 13700 _json["campaignCreativeAssociations"] = campaignCreativeAssociations.map((
value) => (value).toJson()).toList(); | |
| 13701 } | |
| 13702 if (kind != null) { | |
| 13703 _json["kind"] = kind; | |
| 13704 } | |
| 13705 if (nextPageToken != null) { | |
| 13706 _json["nextPageToken"] = nextPageToken; | |
| 13707 } | |
| 13708 return _json; | |
| 13709 } | |
| 13710 } | |
| 13711 | |
| 13712 /** Campaign List Response */ | |
| 13713 class CampaignsListResponse { | |
| 13714 /** Campaign collection. */ | |
| 13715 core.List<Campaign> campaigns; | |
| 13716 /** | |
| 13717 * Identifies what kind of resource this is. Value: the fixed string | |
| 13718 * "dfareporting#campaignsListResponse". | |
| 13719 */ | |
| 13720 core.String kind; | |
| 13721 /** Pagination token to be used for the next list operation. */ | |
| 13722 core.String nextPageToken; | |
| 13723 | |
| 13724 CampaignsListResponse(); | |
| 13725 | |
| 13726 CampaignsListResponse.fromJson(core.Map _json) { | |
| 13727 if (_json.containsKey("campaigns")) { | |
| 13728 campaigns = _json["campaigns"].map((value) => new Campaign.fromJson(value)
).toList(); | |
| 13729 } | |
| 13730 if (_json.containsKey("kind")) { | |
| 13731 kind = _json["kind"]; | |
| 13732 } | |
| 13733 if (_json.containsKey("nextPageToken")) { | |
| 13734 nextPageToken = _json["nextPageToken"]; | |
| 13735 } | |
| 13736 } | |
| 13737 | |
| 13738 core.Map toJson() { | |
| 13739 var _json = new core.Map(); | |
| 13740 if (campaigns != null) { | |
| 13741 _json["campaigns"] = campaigns.map((value) => (value).toJson()).toList(); | |
| 13742 } | |
| 13743 if (kind != null) { | |
| 13744 _json["kind"] = kind; | |
| 13745 } | |
| 13746 if (nextPageToken != null) { | |
| 13747 _json["nextPageToken"] = nextPageToken; | |
| 13748 } | |
| 13749 return _json; | |
| 13750 } | |
| 13751 } | |
| 13752 | |
| 13753 /** Describes a change that a user has made to a resource. */ | |
| 13754 class ChangeLog { | |
| 13755 /** Account ID of the modified object. */ | |
| 13756 core.String accountId; | |
| 13757 /** Action which caused the change. */ | |
| 13758 core.String action; | |
| 13759 /** Time when the object was modified. */ | |
| 13760 core.DateTime changeTime; | |
| 13761 /** Field name of the object which changed. */ | |
| 13762 core.String fieldName; | |
| 13763 /** ID of this change log. */ | |
| 13764 core.String id; | |
| 13765 /** | |
| 13766 * Identifies what kind of resource this is. Value: the fixed string | |
| 13767 * "dfareporting#changeLog". | |
| 13768 */ | |
| 13769 core.String kind; | |
| 13770 /** New value of the object field. */ | |
| 13771 core.String newValue; | |
| 13772 /** | |
| 13773 * ID of the object of this change log. The object could be a campaign, | |
| 13774 * placement, ad, or other type. | |
| 13775 */ | |
| 13776 core.String objectId; | |
| 13777 /** Object type of the change log. */ | |
| 13778 core.String objectType; | |
| 13779 /** Old value of the object field. */ | |
| 13780 core.String oldValue; | |
| 13781 /** Subaccount ID of the modified object. */ | |
| 13782 core.String subaccountId; | |
| 13783 /** | |
| 13784 * Transaction ID of this change log. When a single API call results in many | |
| 13785 * changes, each change will have a separate ID in the change log but will | |
| 13786 * share the same transactionId. | |
| 13787 */ | |
| 13788 core.String transactionId; | |
| 13789 /** ID of the user who modified the object. */ | |
| 13790 core.String userProfileId; | |
| 13791 /** User profile name of the user who modified the object. */ | |
| 13792 core.String userProfileName; | |
| 13793 | |
| 13794 ChangeLog(); | |
| 13795 | |
| 13796 ChangeLog.fromJson(core.Map _json) { | |
| 13797 if (_json.containsKey("accountId")) { | |
| 13798 accountId = _json["accountId"]; | |
| 13799 } | |
| 13800 if (_json.containsKey("action")) { | |
| 13801 action = _json["action"]; | |
| 13802 } | |
| 13803 if (_json.containsKey("changeTime")) { | |
| 13804 changeTime = core.DateTime.parse(_json["changeTime"]); | |
| 13805 } | |
| 13806 if (_json.containsKey("fieldName")) { | |
| 13807 fieldName = _json["fieldName"]; | |
| 13808 } | |
| 13809 if (_json.containsKey("id")) { | |
| 13810 id = _json["id"]; | |
| 13811 } | |
| 13812 if (_json.containsKey("kind")) { | |
| 13813 kind = _json["kind"]; | |
| 13814 } | |
| 13815 if (_json.containsKey("newValue")) { | |
| 13816 newValue = _json["newValue"]; | |
| 13817 } | |
| 13818 if (_json.containsKey("objectId")) { | |
| 13819 objectId = _json["objectId"]; | |
| 13820 } | |
| 13821 if (_json.containsKey("objectType")) { | |
| 13822 objectType = _json["objectType"]; | |
| 13823 } | |
| 13824 if (_json.containsKey("oldValue")) { | |
| 13825 oldValue = _json["oldValue"]; | |
| 13826 } | |
| 13827 if (_json.containsKey("subaccountId")) { | |
| 13828 subaccountId = _json["subaccountId"]; | |
| 13829 } | |
| 13830 if (_json.containsKey("transactionId")) { | |
| 13831 transactionId = _json["transactionId"]; | |
| 13832 } | |
| 13833 if (_json.containsKey("userProfileId")) { | |
| 13834 userProfileId = _json["userProfileId"]; | |
| 13835 } | |
| 13836 if (_json.containsKey("userProfileName")) { | |
| 13837 userProfileName = _json["userProfileName"]; | |
| 13838 } | |
| 13839 } | |
| 13840 | |
| 13841 core.Map toJson() { | |
| 13842 var _json = new core.Map(); | |
| 13843 if (accountId != null) { | |
| 13844 _json["accountId"] = accountId; | |
| 13845 } | |
| 13846 if (action != null) { | |
| 13847 _json["action"] = action; | |
| 13848 } | |
| 13849 if (changeTime != null) { | |
| 13850 _json["changeTime"] = (changeTime).toIso8601String(); | |
| 13851 } | |
| 13852 if (fieldName != null) { | |
| 13853 _json["fieldName"] = fieldName; | |
| 13854 } | |
| 13855 if (id != null) { | |
| 13856 _json["id"] = id; | |
| 13857 } | |
| 13858 if (kind != null) { | |
| 13859 _json["kind"] = kind; | |
| 13860 } | |
| 13861 if (newValue != null) { | |
| 13862 _json["newValue"] = newValue; | |
| 13863 } | |
| 13864 if (objectId != null) { | |
| 13865 _json["objectId"] = objectId; | |
| 13866 } | |
| 13867 if (objectType != null) { | |
| 13868 _json["objectType"] = objectType; | |
| 13869 } | |
| 13870 if (oldValue != null) { | |
| 13871 _json["oldValue"] = oldValue; | |
| 13872 } | |
| 13873 if (subaccountId != null) { | |
| 13874 _json["subaccountId"] = subaccountId; | |
| 13875 } | |
| 13876 if (transactionId != null) { | |
| 13877 _json["transactionId"] = transactionId; | |
| 13878 } | |
| 13879 if (userProfileId != null) { | |
| 13880 _json["userProfileId"] = userProfileId; | |
| 13881 } | |
| 13882 if (userProfileName != null) { | |
| 13883 _json["userProfileName"] = userProfileName; | |
| 13884 } | |
| 13885 return _json; | |
| 13886 } | |
| 13887 } | |
| 13888 | |
| 13889 /** Change Log List Response */ | |
| 13890 class ChangeLogsListResponse { | |
| 13891 /** Change log collection. */ | |
| 13892 core.List<ChangeLog> changeLogs; | |
| 13893 /** | |
| 13894 * Identifies what kind of resource this is. Value: the fixed string | |
| 13895 * "dfareporting#changeLogsListResponse". | |
| 13896 */ | |
| 13897 core.String kind; | |
| 13898 /** Pagination token to be used for the next list operation. */ | |
| 13899 core.String nextPageToken; | |
| 13900 | |
| 13901 ChangeLogsListResponse(); | |
| 13902 | |
| 13903 ChangeLogsListResponse.fromJson(core.Map _json) { | |
| 13904 if (_json.containsKey("changeLogs")) { | |
| 13905 changeLogs = _json["changeLogs"].map((value) => new ChangeLog.fromJson(val
ue)).toList(); | |
| 13906 } | |
| 13907 if (_json.containsKey("kind")) { | |
| 13908 kind = _json["kind"]; | |
| 13909 } | |
| 13910 if (_json.containsKey("nextPageToken")) { | |
| 13911 nextPageToken = _json["nextPageToken"]; | |
| 13912 } | |
| 13913 } | |
| 13914 | |
| 13915 core.Map toJson() { | |
| 13916 var _json = new core.Map(); | |
| 13917 if (changeLogs != null) { | |
| 13918 _json["changeLogs"] = changeLogs.map((value) => (value).toJson()).toList()
; | |
| 13919 } | |
| 13920 if (kind != null) { | |
| 13921 _json["kind"] = kind; | |
| 13922 } | |
| 13923 if (nextPageToken != null) { | |
| 13924 _json["nextPageToken"] = nextPageToken; | |
| 13925 } | |
| 13926 return _json; | |
| 13927 } | |
| 13928 } | |
| 13929 | |
| 13930 /** City List Response */ | |
| 13931 class CitiesListResponse { | |
| 13932 /** City collection. */ | |
| 13933 core.List<City> cities; | |
| 13934 /** | |
| 13935 * Identifies what kind of resource this is. Value: the fixed string | |
| 13936 * "dfareporting#citiesListResponse". | |
| 13937 */ | |
| 13938 core.String kind; | |
| 13939 | |
| 13940 CitiesListResponse(); | |
| 13941 | |
| 13942 CitiesListResponse.fromJson(core.Map _json) { | |
| 13943 if (_json.containsKey("cities")) { | |
| 13944 cities = _json["cities"].map((value) => new City.fromJson(value)).toList()
; | |
| 13945 } | |
| 13946 if (_json.containsKey("kind")) { | |
| 13947 kind = _json["kind"]; | |
| 13948 } | |
| 13949 } | |
| 13950 | |
| 13951 core.Map toJson() { | |
| 13952 var _json = new core.Map(); | |
| 13953 if (cities != null) { | |
| 13954 _json["cities"] = cities.map((value) => (value).toJson()).toList(); | |
| 13955 } | |
| 13956 if (kind != null) { | |
| 13957 _json["kind"] = kind; | |
| 13958 } | |
| 13959 return _json; | |
| 13960 } | |
| 13961 } | |
| 13962 | |
| 13963 /** Contains information about a city that can be targeted by ads. */ | |
| 13964 class City { | |
| 13965 /** Country code of the country to which this city belongs. */ | |
| 13966 core.String countryCode; | |
| 13967 /** DART ID of the country to which this city belongs. */ | |
| 13968 core.String countryDartId; | |
| 13969 /** | |
| 13970 * DART ID of this city. This is the ID used for targeting and generating | |
| 13971 * reports. | |
| 13972 */ | |
| 13973 core.String dartId; | |
| 13974 /** | |
| 13975 * Identifies what kind of resource this is. Value: the fixed string | |
| 13976 * "dfareporting#city". | |
| 13977 */ | |
| 13978 core.String kind; | |
| 13979 /** | |
| 13980 * Metro region code of the metro region (DMA) to which this city belongs. | |
| 13981 */ | |
| 13982 core.String metroCode; | |
| 13983 /** ID of the metro region (DMA) to which this city belongs. */ | |
| 13984 core.String metroDmaId; | |
| 13985 /** Name of this city. */ | |
| 13986 core.String name; | |
| 13987 /** Region code of the region to which this city belongs. */ | |
| 13988 core.String regionCode; | |
| 13989 /** DART ID of the region to which this city belongs. */ | |
| 13990 core.String regionDartId; | |
| 13991 | |
| 13992 City(); | |
| 13993 | |
| 13994 City.fromJson(core.Map _json) { | |
| 13995 if (_json.containsKey("countryCode")) { | |
| 13996 countryCode = _json["countryCode"]; | |
| 13997 } | |
| 13998 if (_json.containsKey("countryDartId")) { | |
| 13999 countryDartId = _json["countryDartId"]; | |
| 14000 } | |
| 14001 if (_json.containsKey("dartId")) { | |
| 14002 dartId = _json["dartId"]; | |
| 14003 } | |
| 14004 if (_json.containsKey("kind")) { | |
| 14005 kind = _json["kind"]; | |
| 14006 } | |
| 14007 if (_json.containsKey("metroCode")) { | |
| 14008 metroCode = _json["metroCode"]; | |
| 14009 } | |
| 14010 if (_json.containsKey("metroDmaId")) { | |
| 14011 metroDmaId = _json["metroDmaId"]; | |
| 14012 } | |
| 14013 if (_json.containsKey("name")) { | |
| 14014 name = _json["name"]; | |
| 14015 } | |
| 14016 if (_json.containsKey("regionCode")) { | |
| 14017 regionCode = _json["regionCode"]; | |
| 14018 } | |
| 14019 if (_json.containsKey("regionDartId")) { | |
| 14020 regionDartId = _json["regionDartId"]; | |
| 14021 } | |
| 14022 } | |
| 14023 | |
| 14024 core.Map toJson() { | |
| 14025 var _json = new core.Map(); | |
| 14026 if (countryCode != null) { | |
| 14027 _json["countryCode"] = countryCode; | |
| 14028 } | |
| 14029 if (countryDartId != null) { | |
| 14030 _json["countryDartId"] = countryDartId; | |
| 14031 } | |
| 14032 if (dartId != null) { | |
| 14033 _json["dartId"] = dartId; | |
| 14034 } | |
| 14035 if (kind != null) { | |
| 14036 _json["kind"] = kind; | |
| 14037 } | |
| 14038 if (metroCode != null) { | |
| 14039 _json["metroCode"] = metroCode; | |
| 14040 } | |
| 14041 if (metroDmaId != null) { | |
| 14042 _json["metroDmaId"] = metroDmaId; | |
| 14043 } | |
| 14044 if (name != null) { | |
| 14045 _json["name"] = name; | |
| 14046 } | |
| 14047 if (regionCode != null) { | |
| 14048 _json["regionCode"] = regionCode; | |
| 14049 } | |
| 14050 if (regionDartId != null) { | |
| 14051 _json["regionDartId"] = regionDartId; | |
| 14052 } | |
| 14053 return _json; | |
| 14054 } | |
| 14055 } | |
| 14056 | |
| 14057 /** Creative Click Tag. */ | |
| 14058 class ClickTag { | |
| 14059 /** | |
| 14060 * Advertiser event name associated with the click tag. This field is used by | |
| 14061 * ENHANCED_IMAGE, and HTML5_BANNER creatives. Applicable to ENHANCED_BANNER | |
| 14062 * when the primary asset type is not HTML_IMAGE | |
| 14063 */ | |
| 14064 core.String eventName; | |
| 14065 /** | |
| 14066 * Parameter name for the specified click tag. For ENHANCED_IMAGE creative | |
| 14067 * assets, this field must match the value of the creative asset's | |
| 14068 * creativeAssetId.name field. | |
| 14069 */ | |
| 14070 core.String name; | |
| 14071 /** | |
| 14072 * Parameter value for the specified click tag. This field contains a | |
| 14073 * click-through url. | |
| 14074 */ | |
| 14075 core.String value; | |
| 14076 | |
| 14077 ClickTag(); | |
| 14078 | |
| 14079 ClickTag.fromJson(core.Map _json) { | |
| 14080 if (_json.containsKey("eventName")) { | |
| 14081 eventName = _json["eventName"]; | |
| 14082 } | |
| 14083 if (_json.containsKey("name")) { | |
| 14084 name = _json["name"]; | |
| 14085 } | |
| 14086 if (_json.containsKey("value")) { | |
| 14087 value = _json["value"]; | |
| 14088 } | |
| 14089 } | |
| 14090 | |
| 14091 core.Map toJson() { | |
| 14092 var _json = new core.Map(); | |
| 14093 if (eventName != null) { | |
| 14094 _json["eventName"] = eventName; | |
| 14095 } | |
| 14096 if (name != null) { | |
| 14097 _json["name"] = name; | |
| 14098 } | |
| 14099 if (value != null) { | |
| 14100 _json["value"] = value; | |
| 14101 } | |
| 14102 return _json; | |
| 14103 } | |
| 14104 } | |
| 14105 | |
| 14106 /** Click-through URL */ | |
| 14107 class ClickThroughUrl { | |
| 14108 /** | |
| 14109 * Read-only convenience field representing the actual URL that will be used | |
| 14110 * for this click-through. The URL is computed as follows: | |
| 14111 * - If defaultLandingPage is enabled then the campaign's default landing page | |
| 14112 * URL is assigned to this field. | |
| 14113 * - If defaultLandingPage is not enabled and a landingPageId is specified | |
| 14114 * then that landing page's URL is assigned to this field. | |
| 14115 * - If neither of the above cases apply, then the customClickThroughUrl is | |
| 14116 * assigned to this field. | |
| 14117 */ | |
| 14118 core.String computedClickThroughUrl; | |
| 14119 /** | |
| 14120 * Custom click-through URL. Applicable if the defaultLandingPage field is set | |
| 14121 * to false and the landingPageId field is left unset. | |
| 14122 */ | |
| 14123 core.String customClickThroughUrl; | |
| 14124 /** Whether the campaign default landing page is used. */ | |
| 14125 core.bool defaultLandingPage; | |
| 14126 /** | |
| 14127 * ID of the landing page for the click-through URL. Applicable if the | |
| 14128 * defaultLandingPage field is set to false. | |
| 14129 */ | |
| 14130 core.String landingPageId; | |
| 14131 | |
| 14132 ClickThroughUrl(); | |
| 14133 | |
| 14134 ClickThroughUrl.fromJson(core.Map _json) { | |
| 14135 if (_json.containsKey("computedClickThroughUrl")) { | |
| 14136 computedClickThroughUrl = _json["computedClickThroughUrl"]; | |
| 14137 } | |
| 14138 if (_json.containsKey("customClickThroughUrl")) { | |
| 14139 customClickThroughUrl = _json["customClickThroughUrl"]; | |
| 14140 } | |
| 14141 if (_json.containsKey("defaultLandingPage")) { | |
| 14142 defaultLandingPage = _json["defaultLandingPage"]; | |
| 14143 } | |
| 14144 if (_json.containsKey("landingPageId")) { | |
| 14145 landingPageId = _json["landingPageId"]; | |
| 14146 } | |
| 14147 } | |
| 14148 | |
| 14149 core.Map toJson() { | |
| 14150 var _json = new core.Map(); | |
| 14151 if (computedClickThroughUrl != null) { | |
| 14152 _json["computedClickThroughUrl"] = computedClickThroughUrl; | |
| 14153 } | |
| 14154 if (customClickThroughUrl != null) { | |
| 14155 _json["customClickThroughUrl"] = customClickThroughUrl; | |
| 14156 } | |
| 14157 if (defaultLandingPage != null) { | |
| 14158 _json["defaultLandingPage"] = defaultLandingPage; | |
| 14159 } | |
| 14160 if (landingPageId != null) { | |
| 14161 _json["landingPageId"] = landingPageId; | |
| 14162 } | |
| 14163 return _json; | |
| 14164 } | |
| 14165 } | |
| 14166 | |
| 14167 /** Click Through URL Suffix settings. */ | |
| 14168 class ClickThroughUrlSuffixProperties { | |
| 14169 /** | |
| 14170 * Click-through URL suffix to apply to all ads in this entity's scope. Must | |
| 14171 * be less than 128 characters long. | |
| 14172 */ | |
| 14173 core.String clickThroughUrlSuffix; | |
| 14174 /** | |
| 14175 * Whether this entity should override the inherited click-through URL suffix | |
| 14176 * with its own defined value. | |
| 14177 */ | |
| 14178 core.bool overrideInheritedSuffix; | |
| 14179 | |
| 14180 ClickThroughUrlSuffixProperties(); | |
| 14181 | |
| 14182 ClickThroughUrlSuffixProperties.fromJson(core.Map _json) { | |
| 14183 if (_json.containsKey("clickThroughUrlSuffix")) { | |
| 14184 clickThroughUrlSuffix = _json["clickThroughUrlSuffix"]; | |
| 14185 } | |
| 14186 if (_json.containsKey("overrideInheritedSuffix")) { | |
| 14187 overrideInheritedSuffix = _json["overrideInheritedSuffix"]; | |
| 14188 } | |
| 14189 } | |
| 14190 | |
| 14191 core.Map toJson() { | |
| 14192 var _json = new core.Map(); | |
| 14193 if (clickThroughUrlSuffix != null) { | |
| 14194 _json["clickThroughUrlSuffix"] = clickThroughUrlSuffix; | |
| 14195 } | |
| 14196 if (overrideInheritedSuffix != null) { | |
| 14197 _json["overrideInheritedSuffix"] = overrideInheritedSuffix; | |
| 14198 } | |
| 14199 return _json; | |
| 14200 } | |
| 14201 } | |
| 14202 | |
| 14203 /** Companion Click-through override. */ | |
| 14204 class CompanionClickThroughOverride { | |
| 14205 /** Click-through URL of this companion click-through override. */ | |
| 14206 ClickThroughUrl clickThroughUrl; | |
| 14207 /** ID of the creative for this companion click-through override. */ | |
| 14208 core.String creativeId; | |
| 14209 | |
| 14210 CompanionClickThroughOverride(); | |
| 14211 | |
| 14212 CompanionClickThroughOverride.fromJson(core.Map _json) { | |
| 14213 if (_json.containsKey("clickThroughUrl")) { | |
| 14214 clickThroughUrl = new ClickThroughUrl.fromJson(_json["clickThroughUrl"]); | |
| 14215 } | |
| 14216 if (_json.containsKey("creativeId")) { | |
| 14217 creativeId = _json["creativeId"]; | |
| 14218 } | |
| 14219 } | |
| 14220 | |
| 14221 core.Map toJson() { | |
| 14222 var _json = new core.Map(); | |
| 14223 if (clickThroughUrl != null) { | |
| 14224 _json["clickThroughUrl"] = (clickThroughUrl).toJson(); | |
| 14225 } | |
| 14226 if (creativeId != null) { | |
| 14227 _json["creativeId"] = creativeId; | |
| 14228 } | |
| 14229 return _json; | |
| 14230 } | |
| 14231 } | |
| 14232 | |
| 14233 /** Represents a response to the queryCompatibleFields method. */ | |
| 14234 class CompatibleFields { | |
| 14235 /** | |
| 14236 * Contains items that are compatible to be selected for a report of type | |
| 14237 * "CROSS_DIMENSION_REACH". | |
| 14238 */ | |
| 14239 CrossDimensionReachReportCompatibleFields crossDimensionReachReportCompatibleF
ields; | |
| 14240 /** | |
| 14241 * Contains items that are compatible to be selected for a report of type | |
| 14242 * "FLOODLIGHT". | |
| 14243 */ | |
| 14244 FloodlightReportCompatibleFields floodlightReportCompatibleFields; | |
| 14245 /** | |
| 14246 * The kind of resource this is, in this case dfareporting#compatibleFields. | |
| 14247 */ | |
| 14248 core.String kind; | |
| 14249 /** | |
| 14250 * Contains items that are compatible to be selected for a report of type | |
| 14251 * "PATH_TO_CONVERSION". | |
| 14252 */ | |
| 14253 PathToConversionReportCompatibleFields pathToConversionReportCompatibleFields; | |
| 14254 /** | |
| 14255 * Contains items that are compatible to be selected for a report of type | |
| 14256 * "REACH". | |
| 14257 */ | |
| 14258 ReachReportCompatibleFields reachReportCompatibleFields; | |
| 14259 /** | |
| 14260 * Contains items that are compatible to be selected for a report of type | |
| 14261 * "STANDARD". | |
| 14262 */ | |
| 14263 ReportCompatibleFields reportCompatibleFields; | |
| 14264 | |
| 14265 CompatibleFields(); | |
| 14266 | |
| 14267 CompatibleFields.fromJson(core.Map _json) { | |
| 14268 if (_json.containsKey("crossDimensionReachReportCompatibleFields")) { | |
| 14269 crossDimensionReachReportCompatibleFields = new CrossDimensionReachReportC
ompatibleFields.fromJson(_json["crossDimensionReachReportCompatibleFields"]); | |
| 14270 } | |
| 14271 if (_json.containsKey("floodlightReportCompatibleFields")) { | |
| 14272 floodlightReportCompatibleFields = new FloodlightReportCompatibleFields.fr
omJson(_json["floodlightReportCompatibleFields"]); | |
| 14273 } | |
| 14274 if (_json.containsKey("kind")) { | |
| 14275 kind = _json["kind"]; | |
| 14276 } | |
| 14277 if (_json.containsKey("pathToConversionReportCompatibleFields")) { | |
| 14278 pathToConversionReportCompatibleFields = new PathToConversionReportCompati
bleFields.fromJson(_json["pathToConversionReportCompatibleFields"]); | |
| 14279 } | |
| 14280 if (_json.containsKey("reachReportCompatibleFields")) { | |
| 14281 reachReportCompatibleFields = new ReachReportCompatibleFields.fromJson(_js
on["reachReportCompatibleFields"]); | |
| 14282 } | |
| 14283 if (_json.containsKey("reportCompatibleFields")) { | |
| 14284 reportCompatibleFields = new ReportCompatibleFields.fromJson(_json["report
CompatibleFields"]); | |
| 14285 } | |
| 14286 } | |
| 14287 | |
| 14288 core.Map toJson() { | |
| 14289 var _json = new core.Map(); | |
| 14290 if (crossDimensionReachReportCompatibleFields != null) { | |
| 14291 _json["crossDimensionReachReportCompatibleFields"] = (crossDimensionReachR
eportCompatibleFields).toJson(); | |
| 14292 } | |
| 14293 if (floodlightReportCompatibleFields != null) { | |
| 14294 _json["floodlightReportCompatibleFields"] = (floodlightReportCompatibleFie
lds).toJson(); | |
| 14295 } | |
| 14296 if (kind != null) { | |
| 14297 _json["kind"] = kind; | |
| 14298 } | |
| 14299 if (pathToConversionReportCompatibleFields != null) { | |
| 14300 _json["pathToConversionReportCompatibleFields"] = (pathToConversionReportC
ompatibleFields).toJson(); | |
| 14301 } | |
| 14302 if (reachReportCompatibleFields != null) { | |
| 14303 _json["reachReportCompatibleFields"] = (reachReportCompatibleFields).toJso
n(); | |
| 14304 } | |
| 14305 if (reportCompatibleFields != null) { | |
| 14306 _json["reportCompatibleFields"] = (reportCompatibleFields).toJson(); | |
| 14307 } | |
| 14308 return _json; | |
| 14309 } | |
| 14310 } | |
| 14311 | |
| 14312 /** | |
| 14313 * Contains information about an internet connection type that can be targeted | |
| 14314 * by ads. Clients can use the connection type to target mobile vs. broadband | |
| 14315 * users. | |
| 14316 */ | |
| 14317 class ConnectionType { | |
| 14318 /** ID of this connection type. */ | |
| 14319 core.String id; | |
| 14320 /** | |
| 14321 * Identifies what kind of resource this is. Value: the fixed string | |
| 14322 * "dfareporting#connectionType". | |
| 14323 */ | |
| 14324 core.String kind; | |
| 14325 /** Name of this connection type. */ | |
| 14326 core.String name; | |
| 14327 | |
| 14328 ConnectionType(); | |
| 14329 | |
| 14330 ConnectionType.fromJson(core.Map _json) { | |
| 14331 if (_json.containsKey("id")) { | |
| 14332 id = _json["id"]; | |
| 14333 } | |
| 14334 if (_json.containsKey("kind")) { | |
| 14335 kind = _json["kind"]; | |
| 14336 } | |
| 14337 if (_json.containsKey("name")) { | |
| 14338 name = _json["name"]; | |
| 14339 } | |
| 14340 } | |
| 14341 | |
| 14342 core.Map toJson() { | |
| 14343 var _json = new core.Map(); | |
| 14344 if (id != null) { | |
| 14345 _json["id"] = id; | |
| 14346 } | |
| 14347 if (kind != null) { | |
| 14348 _json["kind"] = kind; | |
| 14349 } | |
| 14350 if (name != null) { | |
| 14351 _json["name"] = name; | |
| 14352 } | |
| 14353 return _json; | |
| 14354 } | |
| 14355 } | |
| 14356 | |
| 14357 /** Connection Type List Response */ | |
| 14358 class ConnectionTypesListResponse { | |
| 14359 /** Collection of connection types such as broadband and mobile. */ | |
| 14360 core.List<ConnectionType> connectionTypes; | |
| 14361 /** | |
| 14362 * Identifies what kind of resource this is. Value: the fixed string | |
| 14363 * "dfareporting#connectionTypesListResponse". | |
| 14364 */ | |
| 14365 core.String kind; | |
| 14366 | |
| 14367 ConnectionTypesListResponse(); | |
| 14368 | |
| 14369 ConnectionTypesListResponse.fromJson(core.Map _json) { | |
| 14370 if (_json.containsKey("connectionTypes")) { | |
| 14371 connectionTypes = _json["connectionTypes"].map((value) => new ConnectionTy
pe.fromJson(value)).toList(); | |
| 14372 } | |
| 14373 if (_json.containsKey("kind")) { | |
| 14374 kind = _json["kind"]; | |
| 14375 } | |
| 14376 } | |
| 14377 | |
| 14378 core.Map toJson() { | |
| 14379 var _json = new core.Map(); | |
| 14380 if (connectionTypes != null) { | |
| 14381 _json["connectionTypes"] = connectionTypes.map((value) => (value).toJson()
).toList(); | |
| 14382 } | |
| 14383 if (kind != null) { | |
| 14384 _json["kind"] = kind; | |
| 14385 } | |
| 14386 return _json; | |
| 14387 } | |
| 14388 } | |
| 14389 | |
| 14390 /** Content Category List Response */ | |
| 14391 class ContentCategoriesListResponse { | |
| 14392 /** Content category collection. */ | |
| 14393 core.List<ContentCategory> contentCategories; | |
| 14394 /** | |
| 14395 * Identifies what kind of resource this is. Value: the fixed string | |
| 14396 * "dfareporting#contentCategoriesListResponse". | |
| 14397 */ | |
| 14398 core.String kind; | |
| 14399 /** Pagination token to be used for the next list operation. */ | |
| 14400 core.String nextPageToken; | |
| 14401 | |
| 14402 ContentCategoriesListResponse(); | |
| 14403 | |
| 14404 ContentCategoriesListResponse.fromJson(core.Map _json) { | |
| 14405 if (_json.containsKey("contentCategories")) { | |
| 14406 contentCategories = _json["contentCategories"].map((value) => new ContentC
ategory.fromJson(value)).toList(); | |
| 14407 } | |
| 14408 if (_json.containsKey("kind")) { | |
| 14409 kind = _json["kind"]; | |
| 14410 } | |
| 14411 if (_json.containsKey("nextPageToken")) { | |
| 14412 nextPageToken = _json["nextPageToken"]; | |
| 14413 } | |
| 14414 } | |
| 14415 | |
| 14416 core.Map toJson() { | |
| 14417 var _json = new core.Map(); | |
| 14418 if (contentCategories != null) { | |
| 14419 _json["contentCategories"] = contentCategories.map((value) => (value).toJs
on()).toList(); | |
| 14420 } | |
| 14421 if (kind != null) { | |
| 14422 _json["kind"] = kind; | |
| 14423 } | |
| 14424 if (nextPageToken != null) { | |
| 14425 _json["nextPageToken"] = nextPageToken; | |
| 14426 } | |
| 14427 return _json; | |
| 14428 } | |
| 14429 } | |
| 14430 | |
| 14431 /** | |
| 14432 * Organizes placements according to the contents of their associated webpages. | |
| 14433 */ | |
| 14434 class ContentCategory { | |
| 14435 /** | |
| 14436 * Account ID of this content category. This is a read-only field that can be | |
| 14437 * left blank. | |
| 14438 */ | |
| 14439 core.String accountId; | |
| 14440 /** | |
| 14441 * ID of this content category. This is a read-only, auto-generated field. | |
| 14442 */ | |
| 14443 core.String id; | |
| 14444 /** | |
| 14445 * Identifies what kind of resource this is. Value: the fixed string | |
| 14446 * "dfareporting#contentCategory". | |
| 14447 */ | |
| 14448 core.String kind; | |
| 14449 /** | |
| 14450 * Name of this content category. This is a required field and must be less | |
| 14451 * than 256 characters long and unique among content categories of the same | |
| 14452 * account. | |
| 14453 */ | |
| 14454 core.String name; | |
| 14455 | |
| 14456 ContentCategory(); | |
| 14457 | |
| 14458 ContentCategory.fromJson(core.Map _json) { | |
| 14459 if (_json.containsKey("accountId")) { | |
| 14460 accountId = _json["accountId"]; | |
| 14461 } | |
| 14462 if (_json.containsKey("id")) { | |
| 14463 id = _json["id"]; | |
| 14464 } | |
| 14465 if (_json.containsKey("kind")) { | |
| 14466 kind = _json["kind"]; | |
| 14467 } | |
| 14468 if (_json.containsKey("name")) { | |
| 14469 name = _json["name"]; | |
| 14470 } | |
| 14471 } | |
| 14472 | |
| 14473 core.Map toJson() { | |
| 14474 var _json = new core.Map(); | |
| 14475 if (accountId != null) { | |
| 14476 _json["accountId"] = accountId; | |
| 14477 } | |
| 14478 if (id != null) { | |
| 14479 _json["id"] = id; | |
| 14480 } | |
| 14481 if (kind != null) { | |
| 14482 _json["kind"] = kind; | |
| 14483 } | |
| 14484 if (name != null) { | |
| 14485 _json["name"] = name; | |
| 14486 } | |
| 14487 return _json; | |
| 14488 } | |
| 14489 } | |
| 14490 | |
| 14491 /** Country List Response */ | |
| 14492 class CountriesListResponse { | |
| 14493 /** Country collection. */ | |
| 14494 core.List<Country> countries; | |
| 14495 /** | |
| 14496 * Identifies what kind of resource this is. Value: the fixed string | |
| 14497 * "dfareporting#countriesListResponse". | |
| 14498 */ | |
| 14499 core.String kind; | |
| 14500 | |
| 14501 CountriesListResponse(); | |
| 14502 | |
| 14503 CountriesListResponse.fromJson(core.Map _json) { | |
| 14504 if (_json.containsKey("countries")) { | |
| 14505 countries = _json["countries"].map((value) => new Country.fromJson(value))
.toList(); | |
| 14506 } | |
| 14507 if (_json.containsKey("kind")) { | |
| 14508 kind = _json["kind"]; | |
| 14509 } | |
| 14510 } | |
| 14511 | |
| 14512 core.Map toJson() { | |
| 14513 var _json = new core.Map(); | |
| 14514 if (countries != null) { | |
| 14515 _json["countries"] = countries.map((value) => (value).toJson()).toList(); | |
| 14516 } | |
| 14517 if (kind != null) { | |
| 14518 _json["kind"] = kind; | |
| 14519 } | |
| 14520 return _json; | |
| 14521 } | |
| 14522 } | |
| 14523 | |
| 14524 /** Contains information about a country that can be targeted by ads. */ | |
| 14525 class Country { | |
| 14526 /** Country code. */ | |
| 14527 core.String countryCode; | |
| 14528 /** | |
| 14529 * DART ID of this country. This is the ID used for targeting and generating | |
| 14530 * reports. | |
| 14531 */ | |
| 14532 core.String dartId; | |
| 14533 /** | |
| 14534 * Identifies what kind of resource this is. Value: the fixed string | |
| 14535 * "dfareporting#country". | |
| 14536 */ | |
| 14537 core.String kind; | |
| 14538 /** Name of this country. */ | |
| 14539 core.String name; | |
| 14540 /** Whether ad serving supports secure servers in this country. */ | |
| 14541 core.bool sslEnabled; | |
| 14542 | |
| 14543 Country(); | |
| 14544 | |
| 14545 Country.fromJson(core.Map _json) { | |
| 14546 if (_json.containsKey("countryCode")) { | |
| 14547 countryCode = _json["countryCode"]; | |
| 14548 } | |
| 14549 if (_json.containsKey("dartId")) { | |
| 14550 dartId = _json["dartId"]; | |
| 14551 } | |
| 14552 if (_json.containsKey("kind")) { | |
| 14553 kind = _json["kind"]; | |
| 14554 } | |
| 14555 if (_json.containsKey("name")) { | |
| 14556 name = _json["name"]; | |
| 14557 } | |
| 14558 if (_json.containsKey("sslEnabled")) { | |
| 14559 sslEnabled = _json["sslEnabled"]; | |
| 14560 } | |
| 14561 } | |
| 14562 | |
| 14563 core.Map toJson() { | |
| 14564 var _json = new core.Map(); | |
| 14565 if (countryCode != null) { | |
| 14566 _json["countryCode"] = countryCode; | |
| 14567 } | |
| 14568 if (dartId != null) { | |
| 14569 _json["dartId"] = dartId; | |
| 14570 } | |
| 14571 if (kind != null) { | |
| 14572 _json["kind"] = kind; | |
| 14573 } | |
| 14574 if (name != null) { | |
| 14575 _json["name"] = name; | |
| 14576 } | |
| 14577 if (sslEnabled != null) { | |
| 14578 _json["sslEnabled"] = sslEnabled; | |
| 14579 } | |
| 14580 return _json; | |
| 14581 } | |
| 14582 } | |
| 14583 | |
| 14584 /** Contains properties of a Creative. */ | |
| 14585 class Creative { | |
| 14586 /** | |
| 14587 * Account ID of this creative. This field, if left unset, will be | |
| 14588 * auto-generated for both insert and update operations. Applicable to all | |
| 14589 * creative types. | |
| 14590 */ | |
| 14591 core.String accountId; | |
| 14592 /** Whether the creative is active. Applicable to all creative types. */ | |
| 14593 core.bool active; | |
| 14594 /** | |
| 14595 * Ad parameters user for VPAID creative. This is a read-only field. | |
| 14596 * Applicable to the following creative types: all VPAID. | |
| 14597 */ | |
| 14598 core.String adParameters; | |
| 14599 /** | |
| 14600 * Keywords for a Rich Media creative. Keywords let you customize the creative | |
| 14601 * settings of a Rich Media ad running on your site without having to contact | |
| 14602 * the advertiser. You can use keywords to dynamically change the look or | |
| 14603 * functionality of a creative. Applicable to the following creative types: | |
| 14604 * all RICH_MEDIA, and all VPAID. | |
| 14605 */ | |
| 14606 core.List<core.String> adTagKeys; | |
| 14607 /** | |
| 14608 * Advertiser ID of this creative. This is a required field. Applicable to all | |
| 14609 * creative types. | |
| 14610 */ | |
| 14611 core.String advertiserId; | |
| 14612 /** | |
| 14613 * Whether script access is allowed for this creative. This is a read-only and | |
| 14614 * deprecated field which will automatically be set to true on update. | |
| 14615 * Applicable to the following creative types: FLASH_INPAGE. | |
| 14616 */ | |
| 14617 core.bool allowScriptAccess; | |
| 14618 /** Whether the creative is archived. Applicable to all creative types. */ | |
| 14619 core.bool archived; | |
| 14620 /** | |
| 14621 * Type of artwork used for the creative. This is a read-only field. | |
| 14622 * Applicable to the following creative types: all RICH_MEDIA, and all VPAID. | |
| 14623 * Possible string values are: | |
| 14624 * - "ARTWORK_TYPE_FLASH" | |
| 14625 * - "ARTWORK_TYPE_HTML5" | |
| 14626 * - "ARTWORK_TYPE_IMAGE" | |
| 14627 * - "ARTWORK_TYPE_MIXED" | |
| 14628 */ | |
| 14629 core.String artworkType; | |
| 14630 /** | |
| 14631 * Authoring tool for HTML5 banner creatives. This is a read-only field. | |
| 14632 * Applicable to the following creative types: HTML5_BANNER. | |
| 14633 * Possible string values are: | |
| 14634 * - "NINJA" | |
| 14635 * - "SWIFFY" | |
| 14636 */ | |
| 14637 core.String authoringTool; | |
| 14638 /** | |
| 14639 * Whether images are automatically advanced for enhanced image creatives. | |
| 14640 * Applicable to the following creative types: ENHANCED_IMAGE. | |
| 14641 */ | |
| 14642 core.bool autoAdvanceImages; | |
| 14643 /** | |
| 14644 * The 6-character HTML color code, beginning with #, for the background of | |
| 14645 * the window area where the Flash file is displayed. Default is white. | |
| 14646 * Applicable to the following creative types: FLASH_INPAGE. | |
| 14647 */ | |
| 14648 core.String backgroundColor; | |
| 14649 /** | |
| 14650 * Click-through URL for backup image. Applicable to the following creative | |
| 14651 * types: FLASH_INPAGE, and HTML5_BANNER. Applicable to ENHANCED_BANNER when | |
| 14652 * the primary asset type is not HTML_IMAGE. | |
| 14653 */ | |
| 14654 core.String backupImageClickThroughUrl; | |
| 14655 /** | |
| 14656 * List of feature dependencies that will cause a backup image to be served if | |
| 14657 * the browser that serves the ad does not support them. Feature dependencies | |
| 14658 * are features that a browser must be able to support in order to render your | |
| 14659 * HTML5 creative asset correctly. This field is initially auto-generated to | |
| 14660 * contain all features detected by DCM for all the assets of this creative | |
| 14661 * and can then be modified by the client. To reset this field, copy over all | |
| 14662 * the creativeAssets' detected features. Applicable to the following creative | |
| 14663 * types: HTML5_BANNER. Applicable to ENHANCED_BANNER when the primary asset | |
| 14664 * is not HTML_IMAGE. | |
| 14665 */ | |
| 14666 core.List<core.String> backupImageFeatures; | |
| 14667 /** | |
| 14668 * Reporting label used for HTML5 banner backup image. Applicable to | |
| 14669 * ENHANCED_BANNER when the primary asset type is not HTML_IMAGE. | |
| 14670 */ | |
| 14671 core.String backupImageReportingLabel; | |
| 14672 /** | |
| 14673 * Target window for backup image. Applicable to the following creative types: | |
| 14674 * FLASH_INPAGE, and HTML5_BANNER. Applicable to ENHANCED_BANNER when the | |
| 14675 * primary asset type is not HTML_IMAGE. | |
| 14676 */ | |
| 14677 TargetWindow backupImageTargetWindow; | |
| 14678 /** | |
| 14679 * Click tags of the creative. For ENHANCED_BANNER, FLASH_INPAGE, and | |
| 14680 * HTML5_BANNER creatives, this is a subset of detected click tags for the | |
| 14681 * assets associated with this creative. After creating a flash asset, | |
| 14682 * detected click tags will be returned in the creativeAssetMetadata. When | |
| 14683 * inserting the creative, populate the creative clickTags field using the | |
| 14684 * creativeAssetMetadata.clickTags field. For ENHANCED_IMAGE creatives, there | |
| 14685 * should be exactly one entry in this list for each image creative asset. A | |
| 14686 * click tag is matched with a corresponding creative asset by matching the | |
| 14687 * clickTag.name field with the creativeAsset.assetIdentifier.name field. | |
| 14688 * Applicable to the following creative types: ENHANCED_IMAGE, FLASH_INPAGE | |
| 14689 * HTML5_BANNER. Applicable to ENHANCED_BANNER when the primary asset type is | |
| 14690 * not HTML_IMAGE. | |
| 14691 */ | |
| 14692 core.List<ClickTag> clickTags; | |
| 14693 /** | |
| 14694 * Industry standard ID assigned to creative for reach and frequency. | |
| 14695 * Applicable to the following creative types: all INSTREAM_VIDEO and all | |
| 14696 * VPAID. | |
| 14697 */ | |
| 14698 core.String commercialId; | |
| 14699 /** | |
| 14700 * List of companion creatives assigned to an in-Stream videocreative. | |
| 14701 * Acceptable values include IDs of existing flash and image creatives. | |
| 14702 * Applicable to the following creative types: all INSTREAM_VIDEO and all | |
| 14703 * VPAID. | |
| 14704 */ | |
| 14705 core.List<core.String> companionCreatives; | |
| 14706 /** | |
| 14707 * Compatibilities associated with this creative. This is a read-only field. | |
| 14708 * WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile | |
| 14709 * devices for regular or interstitial ads, respectively. APP and | |
| 14710 * APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers | |
| 14711 * to rendering in in-stream video ads developed with the VAST standard. | |
| 14712 * Applicable to all creative types. | |
| 14713 * | |
| 14714 * Acceptable values are: | |
| 14715 * - "APP" | |
| 14716 * - "APP_INTERSTITIAL" | |
| 14717 * - "IN_STREAM_VIDEO" | |
| 14718 * - "WEB" | |
| 14719 * - "WEB_INTERSTITIAL" | |
| 14720 */ | |
| 14721 core.List<core.String> compatibility; | |
| 14722 /** | |
| 14723 * Whether Flash assets associated with the creative need to be automatically | |
| 14724 * converted to HTML5. This flag is enabled by default and users can choose to | |
| 14725 * disable it if they don't want the system to generate and use HTML5 asset | |
| 14726 * for this creative. Applicable to the following creative type: FLASH_INPAGE. | |
| 14727 * Applicable to ENHANCED_BANNER when the primary asset type is not | |
| 14728 * HTML_IMAGE. | |
| 14729 */ | |
| 14730 core.bool convertFlashToHtml5; | |
| 14731 /** | |
| 14732 * List of counter events configured for the creative. For ENHANCED_IMAGE | |
| 14733 * creatives, these are read-only and auto-generated from clickTags. | |
| 14734 * Applicable to the following creative types: ENHANCED_IMAGE, all RICH_MEDIA, | |
| 14735 * and all VPAID. | |
| 14736 */ | |
| 14737 core.List<CreativeCustomEvent> counterCustomEvents; | |
| 14738 /** | |
| 14739 * Assets associated with a creative. Applicable to all but the following | |
| 14740 * creative types: INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, and | |
| 14741 * REDIRECT | |
| 14742 */ | |
| 14743 core.List<CreativeAsset> creativeAssets; | |
| 14744 /** | |
| 14745 * Creative field assignments for this creative. Applicable to all creative | |
| 14746 * types. | |
| 14747 */ | |
| 14748 core.List<CreativeFieldAssignment> creativeFieldAssignments; | |
| 14749 /** | |
| 14750 * Custom key-values for a Rich Media creative. Key-values let you customize | |
| 14751 * the creative settings of a Rich Media ad running on your site without | |
| 14752 * having to contact the advertiser. You can use key-values to dynamically | |
| 14753 * change the look or functionality of a creative. Applicable to the following | |
| 14754 * creative types: all RICH_MEDIA, and all VPAID. | |
| 14755 */ | |
| 14756 core.List<core.String> customKeyValues; | |
| 14757 /** | |
| 14758 * List of exit events configured for the creative. For ENHANCED_BANNER and | |
| 14759 * ENHANCED_IMAGE creatives, these are read-only and auto-generated from | |
| 14760 * clickTags, For ENHANCED_BANNER, an event is also created from the | |
| 14761 * backupImageReportingLabel. Applicable to the following creative types: | |
| 14762 * ENHANCED_IMAGE, all RICH_MEDIA, and all VPAID. Applicable to | |
| 14763 * ENHANCED_BANNER when the primary asset is not HTML_IMAGE. | |
| 14764 */ | |
| 14765 core.List<CreativeCustomEvent> exitCustomEvents; | |
| 14766 /** | |
| 14767 * OpenWindow FSCommand of this creative. This lets the SWF file communicate | |
| 14768 * with either Flash Player or the program hosting Flash Player, such as a web | |
| 14769 * browser. This is only triggered if allowScriptAccess field is true. | |
| 14770 * Applicable to the following creative types: FLASH_INPAGE. | |
| 14771 */ | |
| 14772 FsCommand fsCommand; | |
| 14773 /** | |
| 14774 * HTML code for the creative. This is a required field when applicable. This | |
| 14775 * field is ignored if htmlCodeLocked is false. Applicable to the following | |
| 14776 * creative types: all CUSTOM, FLASH_INPAGE, and HTML5_BANNER, and all | |
| 14777 * RICH_MEDIA. | |
| 14778 */ | |
| 14779 core.String htmlCode; | |
| 14780 /** | |
| 14781 * Whether HTML code is DCM-generated or manually entered. Set to true to | |
| 14782 * ignore changes to htmlCode. Applicable to the following creative types: | |
| 14783 * FLASH_INPAGE and HTML5_BANNER. | |
| 14784 */ | |
| 14785 core.bool htmlCodeLocked; | |
| 14786 /** | |
| 14787 * ID of this creative. This is a read-only, auto-generated field. Applicable | |
| 14788 * to all creative types. | |
| 14789 */ | |
| 14790 core.String id; | |
| 14791 /** | |
| 14792 * Dimension value for the ID of this creative. This is a read-only field. | |
| 14793 * Applicable to all creative types. | |
| 14794 */ | |
| 14795 DimensionValue idDimensionValue; | |
| 14796 /** | |
| 14797 * Identifies what kind of resource this is. Value: the fixed string | |
| 14798 * "dfareporting#creative". | |
| 14799 */ | |
| 14800 core.String kind; | |
| 14801 /** | |
| 14802 * Creative last modification information. This is a read-only field. | |
| 14803 * Applicable to all creative types. | |
| 14804 */ | |
| 14805 LastModifiedInfo lastModifiedInfo; | |
| 14806 /** | |
| 14807 * Latest Studio trafficked creative ID associated with rich media and VPAID | |
| 14808 * creatives. This is a read-only field. Applicable to the following creative | |
| 14809 * types: all RICH_MEDIA, and all VPAID. | |
| 14810 */ | |
| 14811 core.String latestTraffickedCreativeId; | |
| 14812 /** | |
| 14813 * Name of the creative. This is a required field and must be less than 256 | |
| 14814 * characters long. Applicable to all creative types. | |
| 14815 */ | |
| 14816 core.String name; | |
| 14817 /** | |
| 14818 * Override CSS value for rich media creatives. Applicable to the following | |
| 14819 * creative types: all RICH_MEDIA. | |
| 14820 */ | |
| 14821 core.String overrideCss; | |
| 14822 /** | |
| 14823 * URL of hosted image or hosted video or another ad tag. For | |
| 14824 * INSTREAM_VIDEO_REDIRECT creatives this is the in-stream video redirect URL. | |
| 14825 * The standard for a VAST (Video Ad Serving Template) ad response allows for | |
| 14826 * a redirect link to another VAST 2.0 or 3.0 call. This is a required field | |
| 14827 * when applicable. Applicable to the following creative types: | |
| 14828 * INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, REDIRECT, and | |
| 14829 * INSTREAM_VIDEO_REDIRECT | |
| 14830 */ | |
| 14831 core.String redirectUrl; | |
| 14832 /** | |
| 14833 * ID of current rendering version. This is a read-only field. Applicable to | |
| 14834 * all creative types. | |
| 14835 */ | |
| 14836 core.String renderingId; | |
| 14837 /** | |
| 14838 * Dimension value for the rendering ID of this creative. This is a read-only | |
| 14839 * field. Applicable to all creative types. | |
| 14840 */ | |
| 14841 DimensionValue renderingIdDimensionValue; | |
| 14842 /** | |
| 14843 * The minimum required Flash plugin version for this creative. For example, | |
| 14844 * 11.2.202.235. This is a read-only field. Applicable to the following | |
| 14845 * creative types: all RICH_MEDIA, and all VPAID. | |
| 14846 */ | |
| 14847 core.String requiredFlashPluginVersion; | |
| 14848 /** | |
| 14849 * The internal Flash version for this creative as calculated by DoubleClick | |
| 14850 * Studio. This is a read-only field. Applicable to the following creative | |
| 14851 * types: FLASH_INPAGE, all RICH_MEDIA, and all VPAID. Applicable to | |
| 14852 * ENHANCED_BANNER when the primary asset type is not HTML_IMAGE. | |
| 14853 */ | |
| 14854 core.int requiredFlashVersion; | |
| 14855 /** | |
| 14856 * Size associated with this creative. When inserting or updating a creative | |
| 14857 * either the size ID field or size width and height fields can be used. This | |
| 14858 * is a required field when applicable; however for IMAGE and FLASH_INPAGE | |
| 14859 * creatives, and for ENHANCED_BANNER creatives with a primary asset of type | |
| 14860 * HTML_IMAGE, if left blank, this field will be automatically set using the | |
| 14861 * actual size of the associated image assets. Applicable to the following | |
| 14862 * creative types: ENHANCED_BANNER, ENHANCED_IMAGE, FLASH_INPAGE, | |
| 14863 * HTML5_BANNER, IMAGE, and all RICH_MEDIA. | |
| 14864 */ | |
| 14865 Size size; | |
| 14866 /** | |
| 14867 * Whether the user can choose to skip the creative. Applicable to the | |
| 14868 * following creative types: all INSTREAM_VIDEO and all VPAID. | |
| 14869 */ | |
| 14870 core.bool skippable; | |
| 14871 /** | |
| 14872 * Whether the creative is SSL-compliant. This is a read-only field. | |
| 14873 * Applicable to all creative types. | |
| 14874 */ | |
| 14875 core.bool sslCompliant; | |
| 14876 /** | |
| 14877 * Whether creative should be treated as SSL compliant even if the system scan | |
| 14878 * shows it's not. Applicable to all creative types. | |
| 14879 */ | |
| 14880 core.bool sslOverride; | |
| 14881 /** | |
| 14882 * Studio advertiser ID associated with rich media and VPAID creatives. This | |
| 14883 * is a read-only field. Applicable to the following creative types: all | |
| 14884 * RICH_MEDIA, and all VPAID. | |
| 14885 */ | |
| 14886 core.String studioAdvertiserId; | |
| 14887 /** | |
| 14888 * Studio creative ID associated with rich media and VPAID creatives. This is | |
| 14889 * a read-only field. Applicable to the following creative types: all | |
| 14890 * RICH_MEDIA, and all VPAID. | |
| 14891 */ | |
| 14892 core.String studioCreativeId; | |
| 14893 /** | |
| 14894 * Studio trafficked creative ID associated with rich media and VPAID | |
| 14895 * creatives. This is a read-only field. Applicable to the following creative | |
| 14896 * types: all RICH_MEDIA, and all VPAID. | |
| 14897 */ | |
| 14898 core.String studioTraffickedCreativeId; | |
| 14899 /** | |
| 14900 * Subaccount ID of this creative. This field, if left unset, will be | |
| 14901 * auto-generated for both insert and update operations. Applicable to all | |
| 14902 * creative types. | |
| 14903 */ | |
| 14904 core.String subaccountId; | |
| 14905 /** | |
| 14906 * Third-party URL used to record backup image impressions. Applicable to the | |
| 14907 * following creative types: all RICH_MEDIA. | |
| 14908 */ | |
| 14909 core.String thirdPartyBackupImageImpressionsUrl; | |
| 14910 /** | |
| 14911 * Third-party URL used to record rich media impressions. Applicable to the | |
| 14912 * following creative types: all RICH_MEDIA. | |
| 14913 */ | |
| 14914 core.String thirdPartyRichMediaImpressionsUrl; | |
| 14915 /** | |
| 14916 * Third-party URLs for tracking in-stream video creative events. Applicable | |
| 14917 * to the following creative types: all INSTREAM_VIDEO and all VPAID. | |
| 14918 */ | |
| 14919 core.List<ThirdPartyTrackingUrl> thirdPartyUrls; | |
| 14920 /** | |
| 14921 * List of timer events configured for the creative. For ENHANCED_IMAGE | |
| 14922 * creatives, these are read-only and auto-generated from clickTags. | |
| 14923 * Applicable to the following creative types: ENHANCED_IMAGE, all RICH_MEDIA, | |
| 14924 * and all VPAID. Applicable to ENHANCED_BANNER when the primary asset is not | |
| 14925 * HTML_IMAGE. | |
| 14926 */ | |
| 14927 core.List<CreativeCustomEvent> timerCustomEvents; | |
| 14928 /** | |
| 14929 * Combined size of all creative assets. This is a read-only field. Applicable | |
| 14930 * to the following creative types: all RICH_MEDIA, and all VPAID. | |
| 14931 */ | |
| 14932 core.String totalFileSize; | |
| 14933 /** | |
| 14934 * Type of this creative.This is a required field. Applicable to all creative | |
| 14935 * types. | |
| 14936 * Possible string values are: | |
| 14937 * - "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO" | |
| 14938 * - "CUSTOM_INPAGE" | |
| 14939 * - "CUSTOM_INTERSTITIAL" | |
| 14940 * - "ENHANCED_BANNER" | |
| 14941 * - "ENHANCED_IMAGE" | |
| 14942 * - "FLASH_INPAGE" | |
| 14943 * - "HTML5_BANNER" | |
| 14944 * - "IMAGE" | |
| 14945 * - "INSTREAM_VIDEO" | |
| 14946 * - "INTERNAL_REDIRECT" | |
| 14947 * - "INTERSTITIAL_INTERNAL_REDIRECT" | |
| 14948 * - "REDIRECT" | |
| 14949 * - "RICH_MEDIA_EXPANDING" | |
| 14950 * - "RICH_MEDIA_IM_EXPAND" | |
| 14951 * - "RICH_MEDIA_INPAGE" | |
| 14952 * - "RICH_MEDIA_INPAGE_FLOATING" | |
| 14953 * - "RICH_MEDIA_INTERSTITIAL_FLOAT" | |
| 14954 * - "RICH_MEDIA_MOBILE_IN_APP" | |
| 14955 * - "RICH_MEDIA_MULTI_FLOATING" | |
| 14956 * - "RICH_MEDIA_PEEL_DOWN" | |
| 14957 * - "TRACKING_TEXT" | |
| 14958 * - "VAST_REDIRECT" | |
| 14959 * - "VPAID_LINEAR" | |
| 14960 * - "VPAID_NON_LINEAR" | |
| 14961 */ | |
| 14962 core.String type; | |
| 14963 /** | |
| 14964 * The version number helps you keep track of multiple versions of your | |
| 14965 * creative in your reports. The version number will always be auto-generated | |
| 14966 * during insert operations to start at 1. For tracking creatives the version | |
| 14967 * cannot be incremented and will always remain at 1. For all other creative | |
| 14968 * types the version can be incremented only by 1 during update operations. In | |
| 14969 * addition, the version will be automatically incremented by 1 when | |
| 14970 * undergoing Rich Media creative merging. Applicable to all creative types. | |
| 14971 */ | |
| 14972 core.int version; | |
| 14973 /** | |
| 14974 * Description of the video ad. Applicable to the following creative types: | |
| 14975 * all INSTREAM_VIDEO and all VPAID. | |
| 14976 */ | |
| 14977 core.String videoDescription; | |
| 14978 /** | |
| 14979 * Creative video duration in seconds. This is a read-only field. Applicable | |
| 14980 * to the following creative types: INSTREAM_VIDEO, all RICH_MEDIA, and all | |
| 14981 * VPAID. | |
| 14982 */ | |
| 14983 core.double videoDuration; | |
| 14984 | |
| 14985 Creative(); | |
| 14986 | |
| 14987 Creative.fromJson(core.Map _json) { | |
| 14988 if (_json.containsKey("accountId")) { | |
| 14989 accountId = _json["accountId"]; | |
| 14990 } | |
| 14991 if (_json.containsKey("active")) { | |
| 14992 active = _json["active"]; | |
| 14993 } | |
| 14994 if (_json.containsKey("adParameters")) { | |
| 14995 adParameters = _json["adParameters"]; | |
| 14996 } | |
| 14997 if (_json.containsKey("adTagKeys")) { | |
| 14998 adTagKeys = _json["adTagKeys"]; | |
| 14999 } | |
| 15000 if (_json.containsKey("advertiserId")) { | |
| 15001 advertiserId = _json["advertiserId"]; | |
| 15002 } | |
| 15003 if (_json.containsKey("allowScriptAccess")) { | |
| 15004 allowScriptAccess = _json["allowScriptAccess"]; | |
| 15005 } | |
| 15006 if (_json.containsKey("archived")) { | |
| 15007 archived = _json["archived"]; | |
| 15008 } | |
| 15009 if (_json.containsKey("artworkType")) { | |
| 15010 artworkType = _json["artworkType"]; | |
| 15011 } | |
| 15012 if (_json.containsKey("authoringTool")) { | |
| 15013 authoringTool = _json["authoringTool"]; | |
| 15014 } | |
| 15015 if (_json.containsKey("auto_advance_images")) { | |
| 15016 autoAdvanceImages = _json["auto_advance_images"]; | |
| 15017 } | |
| 15018 if (_json.containsKey("backgroundColor")) { | |
| 15019 backgroundColor = _json["backgroundColor"]; | |
| 15020 } | |
| 15021 if (_json.containsKey("backupImageClickThroughUrl")) { | |
| 15022 backupImageClickThroughUrl = _json["backupImageClickThroughUrl"]; | |
| 15023 } | |
| 15024 if (_json.containsKey("backupImageFeatures")) { | |
| 15025 backupImageFeatures = _json["backupImageFeatures"]; | |
| 15026 } | |
| 15027 if (_json.containsKey("backupImageReportingLabel")) { | |
| 15028 backupImageReportingLabel = _json["backupImageReportingLabel"]; | |
| 15029 } | |
| 15030 if (_json.containsKey("backupImageTargetWindow")) { | |
| 15031 backupImageTargetWindow = new TargetWindow.fromJson(_json["backupImageTarg
etWindow"]); | |
| 15032 } | |
| 15033 if (_json.containsKey("clickTags")) { | |
| 15034 clickTags = _json["clickTags"].map((value) => new ClickTag.fromJson(value)
).toList(); | |
| 15035 } | |
| 15036 if (_json.containsKey("commercialId")) { | |
| 15037 commercialId = _json["commercialId"]; | |
| 15038 } | |
| 15039 if (_json.containsKey("companionCreatives")) { | |
| 15040 companionCreatives = _json["companionCreatives"]; | |
| 15041 } | |
| 15042 if (_json.containsKey("compatibility")) { | |
| 15043 compatibility = _json["compatibility"]; | |
| 15044 } | |
| 15045 if (_json.containsKey("convertFlashToHtml5")) { | |
| 15046 convertFlashToHtml5 = _json["convertFlashToHtml5"]; | |
| 15047 } | |
| 15048 if (_json.containsKey("counterCustomEvents")) { | |
| 15049 counterCustomEvents = _json["counterCustomEvents"].map((value) => new Crea
tiveCustomEvent.fromJson(value)).toList(); | |
| 15050 } | |
| 15051 if (_json.containsKey("creativeAssets")) { | |
| 15052 creativeAssets = _json["creativeAssets"].map((value) => new CreativeAsset.
fromJson(value)).toList(); | |
| 15053 } | |
| 15054 if (_json.containsKey("creativeFieldAssignments")) { | |
| 15055 creativeFieldAssignments = _json["creativeFieldAssignments"].map((value) =
> new CreativeFieldAssignment.fromJson(value)).toList(); | |
| 15056 } | |
| 15057 if (_json.containsKey("customKeyValues")) { | |
| 15058 customKeyValues = _json["customKeyValues"]; | |
| 15059 } | |
| 15060 if (_json.containsKey("exitCustomEvents")) { | |
| 15061 exitCustomEvents = _json["exitCustomEvents"].map((value) => new CreativeCu
stomEvent.fromJson(value)).toList(); | |
| 15062 } | |
| 15063 if (_json.containsKey("fsCommand")) { | |
| 15064 fsCommand = new FsCommand.fromJson(_json["fsCommand"]); | |
| 15065 } | |
| 15066 if (_json.containsKey("htmlCode")) { | |
| 15067 htmlCode = _json["htmlCode"]; | |
| 15068 } | |
| 15069 if (_json.containsKey("htmlCodeLocked")) { | |
| 15070 htmlCodeLocked = _json["htmlCodeLocked"]; | |
| 15071 } | |
| 15072 if (_json.containsKey("id")) { | |
| 15073 id = _json["id"]; | |
| 15074 } | |
| 15075 if (_json.containsKey("idDimensionValue")) { | |
| 15076 idDimensionValue = new DimensionValue.fromJson(_json["idDimensionValue"]); | |
| 15077 } | |
| 15078 if (_json.containsKey("kind")) { | |
| 15079 kind = _json["kind"]; | |
| 15080 } | |
| 15081 if (_json.containsKey("lastModifiedInfo")) { | |
| 15082 lastModifiedInfo = new LastModifiedInfo.fromJson(_json["lastModifiedInfo"]
); | |
| 15083 } | |
| 15084 if (_json.containsKey("latestTraffickedCreativeId")) { | |
| 15085 latestTraffickedCreativeId = _json["latestTraffickedCreativeId"]; | |
| 15086 } | |
| 15087 if (_json.containsKey("name")) { | |
| 15088 name = _json["name"]; | |
| 15089 } | |
| 15090 if (_json.containsKey("overrideCss")) { | |
| 15091 overrideCss = _json["overrideCss"]; | |
| 15092 } | |
| 15093 if (_json.containsKey("redirectUrl")) { | |
| 15094 redirectUrl = _json["redirectUrl"]; | |
| 15095 } | |
| 15096 if (_json.containsKey("renderingId")) { | |
| 15097 renderingId = _json["renderingId"]; | |
| 15098 } | |
| 15099 if (_json.containsKey("renderingIdDimensionValue")) { | |
| 15100 renderingIdDimensionValue = new DimensionValue.fromJson(_json["renderingId
DimensionValue"]); | |
| 15101 } | |
| 15102 if (_json.containsKey("requiredFlashPluginVersion")) { | |
| 15103 requiredFlashPluginVersion = _json["requiredFlashPluginVersion"]; | |
| 15104 } | |
| 15105 if (_json.containsKey("requiredFlashVersion")) { | |
| 15106 requiredFlashVersion = _json["requiredFlashVersion"]; | |
| 15107 } | |
| 15108 if (_json.containsKey("size")) { | |
| 15109 size = new Size.fromJson(_json["size"]); | |
| 15110 } | |
| 15111 if (_json.containsKey("skippable")) { | |
| 15112 skippable = _json["skippable"]; | |
| 15113 } | |
| 15114 if (_json.containsKey("sslCompliant")) { | |
| 15115 sslCompliant = _json["sslCompliant"]; | |
| 15116 } | |
| 15117 if (_json.containsKey("sslOverride")) { | |
| 15118 sslOverride = _json["sslOverride"]; | |
| 15119 } | |
| 15120 if (_json.containsKey("studioAdvertiserId")) { | |
| 15121 studioAdvertiserId = _json["studioAdvertiserId"]; | |
| 15122 } | |
| 15123 if (_json.containsKey("studioCreativeId")) { | |
| 15124 studioCreativeId = _json["studioCreativeId"]; | |
| 15125 } | |
| 15126 if (_json.containsKey("studioTraffickedCreativeId")) { | |
| 15127 studioTraffickedCreativeId = _json["studioTraffickedCreativeId"]; | |
| 15128 } | |
| 15129 if (_json.containsKey("subaccountId")) { | |
| 15130 subaccountId = _json["subaccountId"]; | |
| 15131 } | |
| 15132 if (_json.containsKey("thirdPartyBackupImageImpressionsUrl")) { | |
| 15133 thirdPartyBackupImageImpressionsUrl = _json["thirdPartyBackupImageImpressi
onsUrl"]; | |
| 15134 } | |
| 15135 if (_json.containsKey("thirdPartyRichMediaImpressionsUrl")) { | |
| 15136 thirdPartyRichMediaImpressionsUrl = _json["thirdPartyRichMediaImpressionsU
rl"]; | |
| 15137 } | |
| 15138 if (_json.containsKey("thirdPartyUrls")) { | |
| 15139 thirdPartyUrls = _json["thirdPartyUrls"].map((value) => new ThirdPartyTrac
kingUrl.fromJson(value)).toList(); | |
| 15140 } | |
| 15141 if (_json.containsKey("timerCustomEvents")) { | |
| 15142 timerCustomEvents = _json["timerCustomEvents"].map((value) => new Creative
CustomEvent.fromJson(value)).toList(); | |
| 15143 } | |
| 15144 if (_json.containsKey("totalFileSize")) { | |
| 15145 totalFileSize = _json["totalFileSize"]; | |
| 15146 } | |
| 15147 if (_json.containsKey("type")) { | |
| 15148 type = _json["type"]; | |
| 15149 } | |
| 15150 if (_json.containsKey("version")) { | |
| 15151 version = _json["version"]; | |
| 15152 } | |
| 15153 if (_json.containsKey("videoDescription")) { | |
| 15154 videoDescription = _json["videoDescription"]; | |
| 15155 } | |
| 15156 if (_json.containsKey("videoDuration")) { | |
| 15157 videoDuration = _json["videoDuration"]; | |
| 15158 } | |
| 15159 } | |
| 15160 | |
| 15161 core.Map toJson() { | |
| 15162 var _json = new core.Map(); | |
| 15163 if (accountId != null) { | |
| 15164 _json["accountId"] = accountId; | |
| 15165 } | |
| 15166 if (active != null) { | |
| 15167 _json["active"] = active; | |
| 15168 } | |
| 15169 if (adParameters != null) { | |
| 15170 _json["adParameters"] = adParameters; | |
| 15171 } | |
| 15172 if (adTagKeys != null) { | |
| 15173 _json["adTagKeys"] = adTagKeys; | |
| 15174 } | |
| 15175 if (advertiserId != null) { | |
| 15176 _json["advertiserId"] = advertiserId; | |
| 15177 } | |
| 15178 if (allowScriptAccess != null) { | |
| 15179 _json["allowScriptAccess"] = allowScriptAccess; | |
| 15180 } | |
| 15181 if (archived != null) { | |
| 15182 _json["archived"] = archived; | |
| 15183 } | |
| 15184 if (artworkType != null) { | |
| 15185 _json["artworkType"] = artworkType; | |
| 15186 } | |
| 15187 if (authoringTool != null) { | |
| 15188 _json["authoringTool"] = authoringTool; | |
| 15189 } | |
| 15190 if (autoAdvanceImages != null) { | |
| 15191 _json["auto_advance_images"] = autoAdvanceImages; | |
| 15192 } | |
| 15193 if (backgroundColor != null) { | |
| 15194 _json["backgroundColor"] = backgroundColor; | |
| 15195 } | |
| 15196 if (backupImageClickThroughUrl != null) { | |
| 15197 _json["backupImageClickThroughUrl"] = backupImageClickThroughUrl; | |
| 15198 } | |
| 15199 if (backupImageFeatures != null) { | |
| 15200 _json["backupImageFeatures"] = backupImageFeatures; | |
| 15201 } | |
| 15202 if (backupImageReportingLabel != null) { | |
| 15203 _json["backupImageReportingLabel"] = backupImageReportingLabel; | |
| 15204 } | |
| 15205 if (backupImageTargetWindow != null) { | |
| 15206 _json["backupImageTargetWindow"] = (backupImageTargetWindow).toJson(); | |
| 15207 } | |
| 15208 if (clickTags != null) { | |
| 15209 _json["clickTags"] = clickTags.map((value) => (value).toJson()).toList(); | |
| 15210 } | |
| 15211 if (commercialId != null) { | |
| 15212 _json["commercialId"] = commercialId; | |
| 15213 } | |
| 15214 if (companionCreatives != null) { | |
| 15215 _json["companionCreatives"] = companionCreatives; | |
| 15216 } | |
| 15217 if (compatibility != null) { | |
| 15218 _json["compatibility"] = compatibility; | |
| 15219 } | |
| 15220 if (convertFlashToHtml5 != null) { | |
| 15221 _json["convertFlashToHtml5"] = convertFlashToHtml5; | |
| 15222 } | |
| 15223 if (counterCustomEvents != null) { | |
| 15224 _json["counterCustomEvents"] = counterCustomEvents.map((value) => (value).
toJson()).toList(); | |
| 15225 } | |
| 15226 if (creativeAssets != null) { | |
| 15227 _json["creativeAssets"] = creativeAssets.map((value) => (value).toJson()).
toList(); | |
| 15228 } | |
| 15229 if (creativeFieldAssignments != null) { | |
| 15230 _json["creativeFieldAssignments"] = creativeFieldAssignments.map((value) =
> (value).toJson()).toList(); | |
| 15231 } | |
| 15232 if (customKeyValues != null) { | |
| 15233 _json["customKeyValues"] = customKeyValues; | |
| 15234 } | |
| 15235 if (exitCustomEvents != null) { | |
| 15236 _json["exitCustomEvents"] = exitCustomEvents.map((value) => (value).toJson
()).toList(); | |
| 15237 } | |
| 15238 if (fsCommand != null) { | |
| 15239 _json["fsCommand"] = (fsCommand).toJson(); | |
| 15240 } | |
| 15241 if (htmlCode != null) { | |
| 15242 _json["htmlCode"] = htmlCode; | |
| 15243 } | |
| 15244 if (htmlCodeLocked != null) { | |
| 15245 _json["htmlCodeLocked"] = htmlCodeLocked; | |
| 15246 } | |
| 15247 if (id != null) { | |
| 15248 _json["id"] = id; | |
| 15249 } | |
| 15250 if (idDimensionValue != null) { | |
| 15251 _json["idDimensionValue"] = (idDimensionValue).toJson(); | |
| 15252 } | |
| 15253 if (kind != null) { | |
| 15254 _json["kind"] = kind; | |
| 15255 } | |
| 15256 if (lastModifiedInfo != null) { | |
| 15257 _json["lastModifiedInfo"] = (lastModifiedInfo).toJson(); | |
| 15258 } | |
| 15259 if (latestTraffickedCreativeId != null) { | |
| 15260 _json["latestTraffickedCreativeId"] = latestTraffickedCreativeId; | |
| 15261 } | |
| 15262 if (name != null) { | |
| 15263 _json["name"] = name; | |
| 15264 } | |
| 15265 if (overrideCss != null) { | |
| 15266 _json["overrideCss"] = overrideCss; | |
| 15267 } | |
| 15268 if (redirectUrl != null) { | |
| 15269 _json["redirectUrl"] = redirectUrl; | |
| 15270 } | |
| 15271 if (renderingId != null) { | |
| 15272 _json["renderingId"] = renderingId; | |
| 15273 } | |
| 15274 if (renderingIdDimensionValue != null) { | |
| 15275 _json["renderingIdDimensionValue"] = (renderingIdDimensionValue).toJson(); | |
| 15276 } | |
| 15277 if (requiredFlashPluginVersion != null) { | |
| 15278 _json["requiredFlashPluginVersion"] = requiredFlashPluginVersion; | |
| 15279 } | |
| 15280 if (requiredFlashVersion != null) { | |
| 15281 _json["requiredFlashVersion"] = requiredFlashVersion; | |
| 15282 } | |
| 15283 if (size != null) { | |
| 15284 _json["size"] = (size).toJson(); | |
| 15285 } | |
| 15286 if (skippable != null) { | |
| 15287 _json["skippable"] = skippable; | |
| 15288 } | |
| 15289 if (sslCompliant != null) { | |
| 15290 _json["sslCompliant"] = sslCompliant; | |
| 15291 } | |
| 15292 if (sslOverride != null) { | |
| 15293 _json["sslOverride"] = sslOverride; | |
| 15294 } | |
| 15295 if (studioAdvertiserId != null) { | |
| 15296 _json["studioAdvertiserId"] = studioAdvertiserId; | |
| 15297 } | |
| 15298 if (studioCreativeId != null) { | |
| 15299 _json["studioCreativeId"] = studioCreativeId; | |
| 15300 } | |
| 15301 if (studioTraffickedCreativeId != null) { | |
| 15302 _json["studioTraffickedCreativeId"] = studioTraffickedCreativeId; | |
| 15303 } | |
| 15304 if (subaccountId != null) { | |
| 15305 _json["subaccountId"] = subaccountId; | |
| 15306 } | |
| 15307 if (thirdPartyBackupImageImpressionsUrl != null) { | |
| 15308 _json["thirdPartyBackupImageImpressionsUrl"] = thirdPartyBackupImageImpres
sionsUrl; | |
| 15309 } | |
| 15310 if (thirdPartyRichMediaImpressionsUrl != null) { | |
| 15311 _json["thirdPartyRichMediaImpressionsUrl"] = thirdPartyRichMediaImpression
sUrl; | |
| 15312 } | |
| 15313 if (thirdPartyUrls != null) { | |
| 15314 _json["thirdPartyUrls"] = thirdPartyUrls.map((value) => (value).toJson()).
toList(); | |
| 15315 } | |
| 15316 if (timerCustomEvents != null) { | |
| 15317 _json["timerCustomEvents"] = timerCustomEvents.map((value) => (value).toJs
on()).toList(); | |
| 15318 } | |
| 15319 if (totalFileSize != null) { | |
| 15320 _json["totalFileSize"] = totalFileSize; | |
| 15321 } | |
| 15322 if (type != null) { | |
| 15323 _json["type"] = type; | |
| 15324 } | |
| 15325 if (version != null) { | |
| 15326 _json["version"] = version; | |
| 15327 } | |
| 15328 if (videoDescription != null) { | |
| 15329 _json["videoDescription"] = videoDescription; | |
| 15330 } | |
| 15331 if (videoDuration != null) { | |
| 15332 _json["videoDuration"] = videoDuration; | |
| 15333 } | |
| 15334 return _json; | |
| 15335 } | |
| 15336 } | |
| 15337 | |
| 15338 /** Creative Asset. */ | |
| 15339 class CreativeAsset { | |
| 15340 /** | |
| 15341 * Whether ActionScript3 is enabled for the flash asset. This is a read-only | |
| 15342 * field. Applicable to the following creative type: FLASH_INPAGE. Applicable | |
| 15343 * to ENHANCED_BANNER when the primary asset type is not HTML_IMAGE. | |
| 15344 */ | |
| 15345 core.bool actionScript3; | |
| 15346 /** | |
| 15347 * Whether the video asset is active. This is a read-only field for | |
| 15348 * VPAID_NON_LINEAR assets. Applicable to the following creative types: | |
| 15349 * INSTREAM_VIDEO and all VPAID. | |
| 15350 */ | |
| 15351 core.bool active; | |
| 15352 /** | |
| 15353 * Possible alignments for an asset. This is a read-only field. Applicable to | |
| 15354 * the following creative types: RICH_MEDIA_MULTI_FLOATING. | |
| 15355 * Possible string values are: | |
| 15356 * - "ALIGNMENT_BOTTOM" | |
| 15357 * - "ALIGNMENT_LEFT" | |
| 15358 * - "ALIGNMENT_RIGHT" | |
| 15359 * - "ALIGNMENT_TOP" | |
| 15360 */ | |
| 15361 core.String alignment; | |
| 15362 /** | |
| 15363 * Artwork type of rich media creative. This is a read-only field. Applicable | |
| 15364 * to the following creative types: all RICH_MEDIA. | |
| 15365 * Possible string values are: | |
| 15366 * - "ARTWORK_TYPE_FLASH" | |
| 15367 * - "ARTWORK_TYPE_HTML5" | |
| 15368 * - "ARTWORK_TYPE_IMAGE" | |
| 15369 * - "ARTWORK_TYPE_MIXED" | |
| 15370 */ | |
| 15371 core.String artworkType; | |
| 15372 /** | |
| 15373 * Identifier of this asset. This is the same identifier returned during | |
| 15374 * creative asset insert operation. This is a required field. Applicable to | |
| 15375 * all but the following creative types: all REDIRECT and TRACKING_TEXT. | |
| 15376 */ | |
| 15377 CreativeAssetId assetIdentifier; | |
| 15378 /** | |
| 15379 * Exit event configured for the backup image. Applicable to the following | |
| 15380 * creative types: all RICH_MEDIA. | |
| 15381 */ | |
| 15382 CreativeCustomEvent backupImageExit; | |
| 15383 /** | |
| 15384 * Detected bit-rate for video asset. This is a read-only field. Applicable to | |
| 15385 * the following creative types: INSTREAM_VIDEO and all VPAID. | |
| 15386 */ | |
| 15387 core.int bitRate; | |
| 15388 /** | |
| 15389 * Rich media child asset type. This is a read-only field. Applicable to the | |
| 15390 * following creative types: all VPAID. | |
| 15391 * Possible string values are: | |
| 15392 * - "CHILD_ASSET_TYPE_DATA" | |
| 15393 * - "CHILD_ASSET_TYPE_FLASH" | |
| 15394 * - "CHILD_ASSET_TYPE_IMAGE" | |
| 15395 * - "CHILD_ASSET_TYPE_VIDEO" | |
| 15396 */ | |
| 15397 core.String childAssetType; | |
| 15398 /** | |
| 15399 * Size of an asset when collapsed. This is a read-only field. Applicable to | |
| 15400 * the following creative types: all RICH_MEDIA and all VPAID. Additionally, | |
| 15401 * applicable to assets whose displayType is ASSET_DISPLAY_TYPE_EXPANDING or | |
| 15402 * ASSET_DISPLAY_TYPE_PEEL_DOWN. | |
| 15403 */ | |
| 15404 Size collapsedSize; | |
| 15405 /** | |
| 15406 * Custom start time in seconds for making the asset visible. Applicable to | |
| 15407 * the following creative types: all RICH_MEDIA. | |
| 15408 */ | |
| 15409 core.int customStartTimeValue; | |
| 15410 /** | |
| 15411 * List of feature dependencies for the creative asset that are detected by | |
| 15412 * DCM. Feature dependencies are features that a browser must be able to | |
| 15413 * support in order to render your HTML5 creative correctly. This is a | |
| 15414 * read-only, auto-generated field. Applicable to the following creative | |
| 15415 * types: ENHANCED_BANNER and HTML5_BANNER. | |
| 15416 */ | |
| 15417 core.List<core.String> detectedFeatures; | |
| 15418 /** | |
| 15419 * Type of rich media asset. This is a read-only field. Applicable to the | |
| 15420 * following creative types: all RICH_MEDIA. | |
| 15421 * Possible string values are: | |
| 15422 * - "ASSET_DISPLAY_TYPE_BACKDROP" | |
| 15423 * - "ASSET_DISPLAY_TYPE_EXPANDING" | |
| 15424 * - "ASSET_DISPLAY_TYPE_FLASH_IN_FLASH" | |
| 15425 * - "ASSET_DISPLAY_TYPE_FLASH_IN_FLASH_EXPANDING" | |
| 15426 * - "ASSET_DISPLAY_TYPE_FLOATING" | |
| 15427 * - "ASSET_DISPLAY_TYPE_INPAGE" | |
| 15428 * - "ASSET_DISPLAY_TYPE_OVERLAY" | |
| 15429 * - "ASSET_DISPLAY_TYPE_PEEL_DOWN" | |
| 15430 * - "ASSET_DISPLAY_TYPE_VPAID_LINEAR" | |
| 15431 * - "ASSET_DISPLAY_TYPE_VPAID_NON_LINEAR" | |
| 15432 */ | |
| 15433 core.String displayType; | |
| 15434 /** | |
| 15435 * Duration in seconds for which an asset will be displayed. Applicable to the | |
| 15436 * following creative types: INSTREAM_VIDEO and VPAID_LINEAR. | |
| 15437 */ | |
| 15438 core.int duration; | |
| 15439 /** | |
| 15440 * Duration type for which an asset will be displayed. Applicable to the | |
| 15441 * following creative types: all RICH_MEDIA. | |
| 15442 * Possible string values are: | |
| 15443 * - "ASSET_DURATION_TYPE_AUTO" | |
| 15444 * - "ASSET_DURATION_TYPE_CUSTOM" | |
| 15445 * - "ASSET_DURATION_TYPE_NONE" | |
| 15446 */ | |
| 15447 core.String durationType; | |
| 15448 /** | |
| 15449 * Detected expanded dimension for video asset. This is a read-only field. | |
| 15450 * Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. | |
| 15451 */ | |
| 15452 Size expandedDimension; | |
| 15453 /** | |
| 15454 * File size associated with this creative asset. This is a read-only field. | |
| 15455 * Applicable to all but the following creative types: all REDIRECT and | |
| 15456 * TRACKING_TEXT. | |
| 15457 */ | |
| 15458 core.String fileSize; | |
| 15459 /** | |
| 15460 * Flash version of the asset. This is a read-only field. Applicable to the | |
| 15461 * following creative types: FLASH_INPAGE, all RICH_MEDIA, and all VPAID. | |
| 15462 * Applicable to ENHANCED_BANNER when the primary asset type is not | |
| 15463 * HTML_IMAGE. | |
| 15464 */ | |
| 15465 core.int flashVersion; | |
| 15466 /** | |
| 15467 * Whether to hide Flash objects flag for an asset. Applicable to the | |
| 15468 * following creative types: all RICH_MEDIA. | |
| 15469 */ | |
| 15470 core.bool hideFlashObjects; | |
| 15471 /** | |
| 15472 * Whether to hide selection boxes flag for an asset. Applicable to the | |
| 15473 * following creative types: all RICH_MEDIA. | |
| 15474 */ | |
| 15475 core.bool hideSelectionBoxes; | |
| 15476 /** | |
| 15477 * Whether the asset is horizontally locked. This is a read-only field. | |
| 15478 * Applicable to the following creative types: all RICH_MEDIA. | |
| 15479 */ | |
| 15480 core.bool horizontallyLocked; | |
| 15481 /** | |
| 15482 * Numeric ID of this creative asset. This is a required field and should not | |
| 15483 * be modified. Applicable to all but the following creative types: all | |
| 15484 * REDIRECT and TRACKING_TEXT. | |
| 15485 */ | |
| 15486 core.String id; | |
| 15487 /** | |
| 15488 * Detected MIME type for video asset. This is a read-only field. Applicable | |
| 15489 * to the following creative types: INSTREAM_VIDEO and all VPAID. | |
| 15490 */ | |
| 15491 core.String mimeType; | |
| 15492 /** | |
| 15493 * Offset position for an asset in collapsed mode. This is a read-only field. | |
| 15494 * Applicable to the following creative types: all RICH_MEDIA and all VPAID. | |
| 15495 * Additionally, only applicable to assets whose displayType is | |
| 15496 * ASSET_DISPLAY_TYPE_EXPANDING or ASSET_DISPLAY_TYPE_PEEL_DOWN. | |
| 15497 */ | |
| 15498 OffsetPosition offset; | |
| 15499 /** | |
| 15500 * Whether the backup asset is original or changed by the user in DCM. | |
| 15501 * Applicable to the following creative types: all RICH_MEDIA. | |
| 15502 */ | |
| 15503 core.bool originalBackup; | |
| 15504 /** | |
| 15505 * Offset position for an asset. Applicable to the following creative types: | |
| 15506 * all RICH_MEDIA. | |
| 15507 */ | |
| 15508 OffsetPosition position; | |
| 15509 /** | |
| 15510 * Offset left unit for an asset. This is a read-only field. Applicable to the | |
| 15511 * following creative types: all RICH_MEDIA. | |
| 15512 * Possible string values are: | |
| 15513 * - "OFFSET_UNIT_PERCENT" | |
| 15514 * - "OFFSET_UNIT_PIXEL" | |
| 15515 * - "OFFSET_UNIT_PIXEL_FROM_CENTER" | |
| 15516 */ | |
| 15517 core.String positionLeftUnit; | |
| 15518 /** | |
| 15519 * Offset top unit for an asset. This is a read-only field if the asset | |
| 15520 * displayType is ASSET_DISPLAY_TYPE_OVERLAY. Applicable to the following | |
| 15521 * creative types: all RICH_MEDIA. | |
| 15522 * Possible string values are: | |
| 15523 * - "OFFSET_UNIT_PERCENT" | |
| 15524 * - "OFFSET_UNIT_PIXEL" | |
| 15525 * - "OFFSET_UNIT_PIXEL_FROM_CENTER" | |
| 15526 */ | |
| 15527 core.String positionTopUnit; | |
| 15528 /** | |
| 15529 * Progressive URL for video asset. This is a read-only field. Applicable to | |
| 15530 * the following creative types: INSTREAM_VIDEO and all VPAID. | |
| 15531 */ | |
| 15532 core.String progressiveServingUrl; | |
| 15533 /** | |
| 15534 * Whether the asset pushes down other content. Applicable to the following | |
| 15535 * creative types: all RICH_MEDIA. Additionally, only applicable when the | |
| 15536 * asset offsets are 0, the collapsedSize.width matches size.width, and the | |
| 15537 * collapsedSize.height is less than size.height. | |
| 15538 */ | |
| 15539 core.bool pushdown; | |
| 15540 /** | |
| 15541 * Pushdown duration in seconds for an asset. Must be between 0 and 9.99. | |
| 15542 * Applicable to the following creative types: all RICH_MEDIA.Additionally, | |
| 15543 * only applicable when the asset pushdown field is true, the offsets are 0, | |
| 15544 * the collapsedSize.width matches size.width, and the collapsedSize.height is | |
| 15545 * less than size.height. | |
| 15546 */ | |
| 15547 core.double pushdownDuration; | |
| 15548 /** | |
| 15549 * Role of the asset in relation to creative. Applicable to all but the | |
| 15550 * following creative types: all REDIRECT and TRACKING_TEXT. This is a | |
| 15551 * required field. | |
| 15552 * PRIMARY applies to ENHANCED_BANNER, FLASH_INPAGE, HTML5_BANNER, IMAGE, | |
| 15553 * IMAGE_GALLERY, all RICH_MEDIA (which may contain multiple primary assets), | |
| 15554 * and all VPAID creatives. | |
| 15555 * BACKUP_IMAGE applies to ENHANCED_BANNER, FLASH_INPAGE, HTML5_BANNER, all | |
| 15556 * RICH_MEDIA, and all VPAID creatives. | |
| 15557 * ADDITIONAL_IMAGE and ADDITIONAL_FLASH apply to FLASH_INPAGE creatives. | |
| 15558 * OTHER refers to assets from sources other than DCM, such as Studio uploaded | |
| 15559 * assets, applicable to all RICH_MEDIA and all VPAID creatives. | |
| 15560 * PARENT_VIDEO refers to videos uploaded by the user in DCM and is applicable | |
| 15561 * to INSTREAM_VIDEO and VPAID_LINEAR creatives. | |
| 15562 * TRANSCODED_VIDEO refers to videos transcoded by DCM from PARENT_VIDEO | |
| 15563 * assets and is applicable to INSTREAM_VIDEO and VPAID_LINEAR creatives. | |
| 15564 * ALTERNATE_VIDEO refers to the DCM representation of child asset videos from | |
| 15565 * Studio, and is applicable to VPAID_LINEAR_VIDEO creatives. These cannot be | |
| 15566 * added or removed within DCM. | |
| 15567 * For VPAID_LINEAR creatives, PARENT_VIDEO, TRANSCODED_VIDEO and | |
| 15568 * ALTERNATE_VIDEO assets that are marked active serve as backup in case the | |
| 15569 * VPAID creative cannot be served. Only PARENT_VIDEO assets can be added or | |
| 15570 * removed for an INSTREAM_VIDEO or VPAID_LINEAR creative. | |
| 15571 * Possible string values are: | |
| 15572 * - "ADDITIONAL_FLASH" | |
| 15573 * - "ADDITIONAL_IMAGE" | |
| 15574 * - "ALTERNATE_VIDEO" | |
| 15575 * - "BACKUP_IMAGE" | |
| 15576 * - "OTHER" | |
| 15577 * - "PARENT_VIDEO" | |
| 15578 * - "PRIMARY" | |
| 15579 * - "TRANSCODED_VIDEO" | |
| 15580 */ | |
| 15581 core.String role; | |
| 15582 /** | |
| 15583 * Size associated with this creative asset. This is a required field when | |
| 15584 * applicable; however for IMAGE and FLASH_INPAGE creatives, if left blank, | |
| 15585 * this field will be automatically set using the actual size of the | |
| 15586 * associated image asset. Applicable to the following creative types: | |
| 15587 * ENHANCED_IMAGE, FLASH_INPAGE, HTML5_BANNER, IMAGE, and all RICH_MEDIA. | |
| 15588 * Applicable to ENHANCED_BANNER when the primary asset type is not | |
| 15589 * HTML_IMAGE. | |
| 15590 */ | |
| 15591 Size size; | |
| 15592 /** | |
| 15593 * Whether the asset is SSL-compliant. This is a read-only field. Applicable | |
| 15594 * to all but the following creative types: all REDIRECT and TRACKING_TEXT. | |
| 15595 */ | |
| 15596 core.bool sslCompliant; | |
| 15597 /** | |
| 15598 * Initial wait time type before making the asset visible. Applicable to the | |
| 15599 * following creative types: all RICH_MEDIA. | |
| 15600 * Possible string values are: | |
| 15601 * - "ASSET_START_TIME_TYPE_CUSTOM" | |
| 15602 * - "ASSET_START_TIME_TYPE_NONE" | |
| 15603 */ | |
| 15604 core.String startTimeType; | |
| 15605 /** | |
| 15606 * Streaming URL for video asset. This is a read-only field. Applicable to the | |
| 15607 * following creative types: INSTREAM_VIDEO and all VPAID. | |
| 15608 */ | |
| 15609 core.String streamingServingUrl; | |
| 15610 /** | |
| 15611 * Whether the asset is transparent. Applicable to the following creative | |
| 15612 * types: all RICH_MEDIA. Additionally, only applicable to HTML5 assets. | |
| 15613 */ | |
| 15614 core.bool transparency; | |
| 15615 /** | |
| 15616 * Whether the asset is vertically locked. This is a read-only field. | |
| 15617 * Applicable to the following creative types: all RICH_MEDIA. | |
| 15618 */ | |
| 15619 core.bool verticallyLocked; | |
| 15620 /** | |
| 15621 * Detected video duration for video asset. This is a read-only field. | |
| 15622 * Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. | |
| 15623 */ | |
| 15624 core.double videoDuration; | |
| 15625 /** | |
| 15626 * Window mode options for flash assets. Applicable to the following creative | |
| 15627 * types: FLASH_INPAGE, RICH_MEDIA_EXPANDING, RICH_MEDIA_IM_EXPAND, | |
| 15628 * RICH_MEDIA_INPAGE, and RICH_MEDIA_INPAGE_FLOATING. | |
| 15629 * Possible string values are: | |
| 15630 * - "OPAQUE" | |
| 15631 * - "TRANSPARENT" | |
| 15632 * - "WINDOW" | |
| 15633 */ | |
| 15634 core.String windowMode; | |
| 15635 /** | |
| 15636 * zIndex value of an asset. This is a read-only field. Applicable to the | |
| 15637 * following creative types: all RICH_MEDIA.Additionally, only applicable to | |
| 15638 * assets whose displayType is NOT one of the following types: | |
| 15639 * ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. | |
| 15640 */ | |
| 15641 core.int zIndex; | |
| 15642 /** | |
| 15643 * File name of zip file. This is a read-only field. Applicable to the | |
| 15644 * following creative types: HTML5_BANNER. | |
| 15645 */ | |
| 15646 core.String zipFilename; | |
| 15647 /** | |
| 15648 * Size of zip file. This is a read-only field. Applicable to the following | |
| 15649 * creative types: HTML5_BANNER. | |
| 15650 */ | |
| 15651 core.String zipFilesize; | |
| 15652 | |
| 15653 CreativeAsset(); | |
| 15654 | |
| 15655 CreativeAsset.fromJson(core.Map _json) { | |
| 15656 if (_json.containsKey("actionScript3")) { | |
| 15657 actionScript3 = _json["actionScript3"]; | |
| 15658 } | |
| 15659 if (_json.containsKey("active")) { | |
| 15660 active = _json["active"]; | |
| 15661 } | |
| 15662 if (_json.containsKey("alignment")) { | |
| 15663 alignment = _json["alignment"]; | |
| 15664 } | |
| 15665 if (_json.containsKey("artworkType")) { | |
| 15666 artworkType = _json["artworkType"]; | |
| 15667 } | |
| 15668 if (_json.containsKey("assetIdentifier")) { | |
| 15669 assetIdentifier = new CreativeAssetId.fromJson(_json["assetIdentifier"]); | |
| 15670 } | |
| 15671 if (_json.containsKey("backupImageExit")) { | |
| 15672 backupImageExit = new CreativeCustomEvent.fromJson(_json["backupImageExit"
]); | |
| 15673 } | |
| 15674 if (_json.containsKey("bitRate")) { | |
| 15675 bitRate = _json["bitRate"]; | |
| 15676 } | |
| 15677 if (_json.containsKey("childAssetType")) { | |
| 15678 childAssetType = _json["childAssetType"]; | |
| 15679 } | |
| 15680 if (_json.containsKey("collapsedSize")) { | |
| 15681 collapsedSize = new Size.fromJson(_json["collapsedSize"]); | |
| 15682 } | |
| 15683 if (_json.containsKey("customStartTimeValue")) { | |
| 15684 customStartTimeValue = _json["customStartTimeValue"]; | |
| 15685 } | |
| 15686 if (_json.containsKey("detectedFeatures")) { | |
| 15687 detectedFeatures = _json["detectedFeatures"]; | |
| 15688 } | |
| 15689 if (_json.containsKey("displayType")) { | |
| 15690 displayType = _json["displayType"]; | |
| 15691 } | |
| 15692 if (_json.containsKey("duration")) { | |
| 15693 duration = _json["duration"]; | |
| 15694 } | |
| 15695 if (_json.containsKey("durationType")) { | |
| 15696 durationType = _json["durationType"]; | |
| 15697 } | |
| 15698 if (_json.containsKey("expandedDimension")) { | |
| 15699 expandedDimension = new Size.fromJson(_json["expandedDimension"]); | |
| 15700 } | |
| 15701 if (_json.containsKey("fileSize")) { | |
| 15702 fileSize = _json["fileSize"]; | |
| 15703 } | |
| 15704 if (_json.containsKey("flashVersion")) { | |
| 15705 flashVersion = _json["flashVersion"]; | |
| 15706 } | |
| 15707 if (_json.containsKey("hideFlashObjects")) { | |
| 15708 hideFlashObjects = _json["hideFlashObjects"]; | |
| 15709 } | |
| 15710 if (_json.containsKey("hideSelectionBoxes")) { | |
| 15711 hideSelectionBoxes = _json["hideSelectionBoxes"]; | |
| 15712 } | |
| 15713 if (_json.containsKey("horizontallyLocked")) { | |
| 15714 horizontallyLocked = _json["horizontallyLocked"]; | |
| 15715 } | |
| 15716 if (_json.containsKey("id")) { | |
| 15717 id = _json["id"]; | |
| 15718 } | |
| 15719 if (_json.containsKey("mimeType")) { | |
| 15720 mimeType = _json["mimeType"]; | |
| 15721 } | |
| 15722 if (_json.containsKey("offset")) { | |
| 15723 offset = new OffsetPosition.fromJson(_json["offset"]); | |
| 15724 } | |
| 15725 if (_json.containsKey("originalBackup")) { | |
| 15726 originalBackup = _json["originalBackup"]; | |
| 15727 } | |
| 15728 if (_json.containsKey("position")) { | |
| 15729 position = new OffsetPosition.fromJson(_json["position"]); | |
| 15730 } | |
| 15731 if (_json.containsKey("positionLeftUnit")) { | |
| 15732 positionLeftUnit = _json["positionLeftUnit"]; | |
| 15733 } | |
| 15734 if (_json.containsKey("positionTopUnit")) { | |
| 15735 positionTopUnit = _json["positionTopUnit"]; | |
| 15736 } | |
| 15737 if (_json.containsKey("progressiveServingUrl")) { | |
| 15738 progressiveServingUrl = _json["progressiveServingUrl"]; | |
| 15739 } | |
| 15740 if (_json.containsKey("pushdown")) { | |
| 15741 pushdown = _json["pushdown"]; | |
| 15742 } | |
| 15743 if (_json.containsKey("pushdownDuration")) { | |
| 15744 pushdownDuration = _json["pushdownDuration"]; | |
| 15745 } | |
| 15746 if (_json.containsKey("role")) { | |
| 15747 role = _json["role"]; | |
| 15748 } | |
| 15749 if (_json.containsKey("size")) { | |
| 15750 size = new Size.fromJson(_json["size"]); | |
| 15751 } | |
| 15752 if (_json.containsKey("sslCompliant")) { | |
| 15753 sslCompliant = _json["sslCompliant"]; | |
| 15754 } | |
| 15755 if (_json.containsKey("startTimeType")) { | |
| 15756 startTimeType = _json["startTimeType"]; | |
| 15757 } | |
| 15758 if (_json.containsKey("streamingServingUrl")) { | |
| 15759 streamingServingUrl = _json["streamingServingUrl"]; | |
| 15760 } | |
| 15761 if (_json.containsKey("transparency")) { | |
| 15762 transparency = _json["transparency"]; | |
| 15763 } | |
| 15764 if (_json.containsKey("verticallyLocked")) { | |
| 15765 verticallyLocked = _json["verticallyLocked"]; | |
| 15766 } | |
| 15767 if (_json.containsKey("videoDuration")) { | |
| 15768 videoDuration = _json["videoDuration"]; | |
| 15769 } | |
| 15770 if (_json.containsKey("windowMode")) { | |
| 15771 windowMode = _json["windowMode"]; | |
| 15772 } | |
| 15773 if (_json.containsKey("zIndex")) { | |
| 15774 zIndex = _json["zIndex"]; | |
| 15775 } | |
| 15776 if (_json.containsKey("zipFilename")) { | |
| 15777 zipFilename = _json["zipFilename"]; | |
| 15778 } | |
| 15779 if (_json.containsKey("zipFilesize")) { | |
| 15780 zipFilesize = _json["zipFilesize"]; | |
| 15781 } | |
| 15782 } | |
| 15783 | |
| 15784 core.Map toJson() { | |
| 15785 var _json = new core.Map(); | |
| 15786 if (actionScript3 != null) { | |
| 15787 _json["actionScript3"] = actionScript3; | |
| 15788 } | |
| 15789 if (active != null) { | |
| 15790 _json["active"] = active; | |
| 15791 } | |
| 15792 if (alignment != null) { | |
| 15793 _json["alignment"] = alignment; | |
| 15794 } | |
| 15795 if (artworkType != null) { | |
| 15796 _json["artworkType"] = artworkType; | |
| 15797 } | |
| 15798 if (assetIdentifier != null) { | |
| 15799 _json["assetIdentifier"] = (assetIdentifier).toJson(); | |
| 15800 } | |
| 15801 if (backupImageExit != null) { | |
| 15802 _json["backupImageExit"] = (backupImageExit).toJson(); | |
| 15803 } | |
| 15804 if (bitRate != null) { | |
| 15805 _json["bitRate"] = bitRate; | |
| 15806 } | |
| 15807 if (childAssetType != null) { | |
| 15808 _json["childAssetType"] = childAssetType; | |
| 15809 } | |
| 15810 if (collapsedSize != null) { | |
| 15811 _json["collapsedSize"] = (collapsedSize).toJson(); | |
| 15812 } | |
| 15813 if (customStartTimeValue != null) { | |
| 15814 _json["customStartTimeValue"] = customStartTimeValue; | |
| 15815 } | |
| 15816 if (detectedFeatures != null) { | |
| 15817 _json["detectedFeatures"] = detectedFeatures; | |
| 15818 } | |
| 15819 if (displayType != null) { | |
| 15820 _json["displayType"] = displayType; | |
| 15821 } | |
| 15822 if (duration != null) { | |
| 15823 _json["duration"] = duration; | |
| 15824 } | |
| 15825 if (durationType != null) { | |
| 15826 _json["durationType"] = durationType; | |
| 15827 } | |
| 15828 if (expandedDimension != null) { | |
| 15829 _json["expandedDimension"] = (expandedDimension).toJson(); | |
| 15830 } | |
| 15831 if (fileSize != null) { | |
| 15832 _json["fileSize"] = fileSize; | |
| 15833 } | |
| 15834 if (flashVersion != null) { | |
| 15835 _json["flashVersion"] = flashVersion; | |
| 15836 } | |
| 15837 if (hideFlashObjects != null) { | |
| 15838 _json["hideFlashObjects"] = hideFlashObjects; | |
| 15839 } | |
| 15840 if (hideSelectionBoxes != null) { | |
| 15841 _json["hideSelectionBoxes"] = hideSelectionBoxes; | |
| 15842 } | |
| 15843 if (horizontallyLocked != null) { | |
| 15844 _json["horizontallyLocked"] = horizontallyLocked; | |
| 15845 } | |
| 15846 if (id != null) { | |
| 15847 _json["id"] = id; | |
| 15848 } | |
| 15849 if (mimeType != null) { | |
| 15850 _json["mimeType"] = mimeType; | |
| 15851 } | |
| 15852 if (offset != null) { | |
| 15853 _json["offset"] = (offset).toJson(); | |
| 15854 } | |
| 15855 if (originalBackup != null) { | |
| 15856 _json["originalBackup"] = originalBackup; | |
| 15857 } | |
| 15858 if (position != null) { | |
| 15859 _json["position"] = (position).toJson(); | |
| 15860 } | |
| 15861 if (positionLeftUnit != null) { | |
| 15862 _json["positionLeftUnit"] = positionLeftUnit; | |
| 15863 } | |
| 15864 if (positionTopUnit != null) { | |
| 15865 _json["positionTopUnit"] = positionTopUnit; | |
| 15866 } | |
| 15867 if (progressiveServingUrl != null) { | |
| 15868 _json["progressiveServingUrl"] = progressiveServingUrl; | |
| 15869 } | |
| 15870 if (pushdown != null) { | |
| 15871 _json["pushdown"] = pushdown; | |
| 15872 } | |
| 15873 if (pushdownDuration != null) { | |
| 15874 _json["pushdownDuration"] = pushdownDuration; | |
| 15875 } | |
| 15876 if (role != null) { | |
| 15877 _json["role"] = role; | |
| 15878 } | |
| 15879 if (size != null) { | |
| 15880 _json["size"] = (size).toJson(); | |
| 15881 } | |
| 15882 if (sslCompliant != null) { | |
| 15883 _json["sslCompliant"] = sslCompliant; | |
| 15884 } | |
| 15885 if (startTimeType != null) { | |
| 15886 _json["startTimeType"] = startTimeType; | |
| 15887 } | |
| 15888 if (streamingServingUrl != null) { | |
| 15889 _json["streamingServingUrl"] = streamingServingUrl; | |
| 15890 } | |
| 15891 if (transparency != null) { | |
| 15892 _json["transparency"] = transparency; | |
| 15893 } | |
| 15894 if (verticallyLocked != null) { | |
| 15895 _json["verticallyLocked"] = verticallyLocked; | |
| 15896 } | |
| 15897 if (videoDuration != null) { | |
| 15898 _json["videoDuration"] = videoDuration; | |
| 15899 } | |
| 15900 if (windowMode != null) { | |
| 15901 _json["windowMode"] = windowMode; | |
| 15902 } | |
| 15903 if (zIndex != null) { | |
| 15904 _json["zIndex"] = zIndex; | |
| 15905 } | |
| 15906 if (zipFilename != null) { | |
| 15907 _json["zipFilename"] = zipFilename; | |
| 15908 } | |
| 15909 if (zipFilesize != null) { | |
| 15910 _json["zipFilesize"] = zipFilesize; | |
| 15911 } | |
| 15912 return _json; | |
| 15913 } | |
| 15914 } | |
| 15915 | |
| 15916 /** Creative Asset ID. */ | |
| 15917 class CreativeAssetId { | |
| 15918 /** | |
| 15919 * Name of the creative asset. This is a required field while inserting an | |
| 15920 * asset. After insertion, this assetIdentifier is used to identify the | |
| 15921 * uploaded asset. Characters in the name must be alphanumeric or one of the | |
| 15922 * following: ".-_ ". Spaces are allowed. | |
| 15923 */ | |
| 15924 core.String name; | |
| 15925 /** | |
| 15926 * Type of asset to upload. This is a required field. IMAGE is solely used for | |
| 15927 * IMAGE creatives. Other image assets should use HTML_IMAGE. | |
| 15928 * Possible string values are: | |
| 15929 * - "FLASH" | |
| 15930 * - "HTML" | |
| 15931 * - "HTML_IMAGE" | |
| 15932 * - "IMAGE" | |
| 15933 * - "VIDEO" | |
| 15934 */ | |
| 15935 core.String type; | |
| 15936 | |
| 15937 CreativeAssetId(); | |
| 15938 | |
| 15939 CreativeAssetId.fromJson(core.Map _json) { | |
| 15940 if (_json.containsKey("name")) { | |
| 15941 name = _json["name"]; | |
| 15942 } | |
| 15943 if (_json.containsKey("type")) { | |
| 15944 type = _json["type"]; | |
| 15945 } | |
| 15946 } | |
| 15947 | |
| 15948 core.Map toJson() { | |
| 15949 var _json = new core.Map(); | |
| 15950 if (name != null) { | |
| 15951 _json["name"] = name; | |
| 15952 } | |
| 15953 if (type != null) { | |
| 15954 _json["type"] = type; | |
| 15955 } | |
| 15956 return _json; | |
| 15957 } | |
| 15958 } | |
| 15959 | |
| 15960 /** | |
| 15961 * CreativeAssets contains properties of a creative asset file which will be | |
| 15962 * uploaded or has already been uploaded. Refer to the creative sample code for | |
| 15963 * how to upload assets and insert a creative. | |
| 15964 */ | |
| 15965 class CreativeAssetMetadata { | |
| 15966 /** ID of the creative asset. This is a required field. */ | |
| 15967 CreativeAssetId assetIdentifier; | |
| 15968 /** | |
| 15969 * List of detected click tags for assets. This is a read-only auto-generated | |
| 15970 * field. | |
| 15971 */ | |
| 15972 core.List<ClickTag> clickTags; | |
| 15973 /** | |
| 15974 * List of feature dependencies for the creative asset that are detected by | |
| 15975 * DCM. Feature dependencies are features that a browser must be able to | |
| 15976 * support in order to render your HTML5 creative correctly. This is a | |
| 15977 * read-only, auto-generated field. | |
| 15978 */ | |
| 15979 core.List<core.String> detectedFeatures; | |
| 15980 /** | |
| 15981 * Identifies what kind of resource this is. Value: the fixed string | |
| 15982 * "dfareporting#creativeAssetMetadata". | |
| 15983 */ | |
| 15984 core.String kind; | |
| 15985 /** | |
| 15986 * Rules validated during code generation that generated a warning. This is a | |
| 15987 * read-only, auto-generated field. | |
| 15988 * | |
| 15989 * Possible values are: | |
| 15990 * - "ADMOB_REFERENCED" | |
| 15991 * - "ASSET_FORMAT_UNSUPPORTED_DCM" | |
| 15992 * - "ASSET_INVALID" | |
| 15993 * - "CLICK_TAG_HARD_CODED" | |
| 15994 * - "CLICK_TAG_INVALID" | |
| 15995 * - "CLICK_TAG_IN_GWD" | |
| 15996 * - "CLICK_TAG_MISSING" | |
| 15997 * - "CLICK_TAG_MORE_THAN_ONE" | |
| 15998 * - "CLICK_TAG_NON_TOP_LEVEL" | |
| 15999 * - "COMPONENT_UNSUPPORTED_DCM" | |
| 16000 * - "ENABLER_UNSUPPORTED_METHOD_DCM" | |
| 16001 * - "EXTERNAL_FILE_REFERENCED" | |
| 16002 * - "FILE_DETAIL_EMPTY" | |
| 16003 * - "FILE_TYPE_INVALID" | |
| 16004 * - "GWD_PROPERTIES_INVALID" | |
| 16005 * - "HTML5_FEATURE_UNSUPPORTED" | |
| 16006 * - "LINKED_FILE_NOT_FOUND" | |
| 16007 * - "MAX_FLASH_VERSION_11" | |
| 16008 * - "MRAID_REFERENCED" | |
| 16009 * - "NOT_SSL_COMPLIANT" | |
| 16010 * - "ORPHANED_ASSET" | |
| 16011 * - "PRIMARY_HTML_MISSING" | |
| 16012 * - "SVG_INVALID" | |
| 16013 * - "ZIP_INVALID" | |
| 16014 */ | |
| 16015 core.List<core.String> warnedValidationRules; | |
| 16016 | |
| 16017 CreativeAssetMetadata(); | |
| 16018 | |
| 16019 CreativeAssetMetadata.fromJson(core.Map _json) { | |
| 16020 if (_json.containsKey("assetIdentifier")) { | |
| 16021 assetIdentifier = new CreativeAssetId.fromJson(_json["assetIdentifier"]); | |
| 16022 } | |
| 16023 if (_json.containsKey("clickTags")) { | |
| 16024 clickTags = _json["clickTags"].map((value) => new ClickTag.fromJson(value)
).toList(); | |
| 16025 } | |
| 16026 if (_json.containsKey("detectedFeatures")) { | |
| 16027 detectedFeatures = _json["detectedFeatures"]; | |
| 16028 } | |
| 16029 if (_json.containsKey("kind")) { | |
| 16030 kind = _json["kind"]; | |
| 16031 } | |
| 16032 if (_json.containsKey("warnedValidationRules")) { | |
| 16033 warnedValidationRules = _json["warnedValidationRules"]; | |
| 16034 } | |
| 16035 } | |
| 16036 | |
| 16037 core.Map toJson() { | |
| 16038 var _json = new core.Map(); | |
| 16039 if (assetIdentifier != null) { | |
| 16040 _json["assetIdentifier"] = (assetIdentifier).toJson(); | |
| 16041 } | |
| 16042 if (clickTags != null) { | |
| 16043 _json["clickTags"] = clickTags.map((value) => (value).toJson()).toList(); | |
| 16044 } | |
| 16045 if (detectedFeatures != null) { | |
| 16046 _json["detectedFeatures"] = detectedFeatures; | |
| 16047 } | |
| 16048 if (kind != null) { | |
| 16049 _json["kind"] = kind; | |
| 16050 } | |
| 16051 if (warnedValidationRules != null) { | |
| 16052 _json["warnedValidationRules"] = warnedValidationRules; | |
| 16053 } | |
| 16054 return _json; | |
| 16055 } | |
| 16056 } | |
| 16057 | |
| 16058 /** Creative Assignment. */ | |
| 16059 class CreativeAssignment { | |
| 16060 /** | |
| 16061 * Whether this creative assignment is active. When true, the creative will be | |
| 16062 * included in the ad's rotation. | |
| 16063 */ | |
| 16064 core.bool active; | |
| 16065 /** | |
| 16066 * Whether applicable event tags should fire when this creative assignment is | |
| 16067 * rendered. If this value is unset when the ad is inserted or updated, it | |
| 16068 * will default to true for all creative types EXCEPT for INTERNAL_REDIRECT, | |
| 16069 * INTERSTITIAL_INTERNAL_REDIRECT, and INSTREAM_VIDEO. | |
| 16070 */ | |
| 16071 core.bool applyEventTags; | |
| 16072 /** Click-through URL of the creative assignment. */ | |
| 16073 ClickThroughUrl clickThroughUrl; | |
| 16074 /** | |
| 16075 * Companion creative overrides for this creative assignment. Applicable to | |
| 16076 * video ads. | |
| 16077 */ | |
| 16078 core.List<CompanionClickThroughOverride> companionCreativeOverrides; | |
| 16079 /** | |
| 16080 * Creative group assignments for this creative assignment. Only one | |
| 16081 * assignment per creative group number is allowed for a maximum of two | |
| 16082 * assignments. | |
| 16083 */ | |
| 16084 core.List<CreativeGroupAssignment> creativeGroupAssignments; | |
| 16085 /** ID of the creative to be assigned. This is a required field. */ | |
| 16086 core.String creativeId; | |
| 16087 /** | |
| 16088 * Dimension value for the ID of the creative. This is a read-only, | |
| 16089 * auto-generated field. | |
| 16090 */ | |
| 16091 DimensionValue creativeIdDimensionValue; | |
| 16092 /** | |
| 16093 * Date and time that the assigned creative should stop serving. Must be later | |
| 16094 * than the start time. | |
| 16095 */ | |
| 16096 core.DateTime endTime; | |
| 16097 /** | |
| 16098 * Rich media exit overrides for this creative assignment. | |
| 16099 * Applicable when the creative type is any of the following: | |
| 16100 * - RICH_MEDIA_INPAGE | |
| 16101 * - RICH_MEDIA_INPAGE_FLOATING | |
| 16102 * - RICH_MEDIA_IM_EXPAND | |
| 16103 * - RICH_MEDIA_EXPANDING | |
| 16104 * - RICH_MEDIA_INTERSTITIAL_FLOAT | |
| 16105 * - RICH_MEDIA_MOBILE_IN_APP | |
| 16106 * - RICH_MEDIA_MULTI_FLOATING | |
| 16107 * - RICH_MEDIA_PEEL_DOWN | |
| 16108 * - ADVANCED_BANNER | |
| 16109 * - VPAID_LINEAR | |
| 16110 * - VPAID_NON_LINEAR | |
| 16111 */ | |
| 16112 core.List<RichMediaExitOverride> richMediaExitOverrides; | |
| 16113 /** | |
| 16114 * Sequence number of the creative assignment, applicable when the rotation | |
| 16115 * type is CREATIVE_ROTATION_TYPE_SEQUENTIAL. | |
| 16116 */ | |
| 16117 core.int sequence; | |
| 16118 /** | |
| 16119 * Whether the creative to be assigned is SSL-compliant. This is a read-only | |
| 16120 * field that is auto-generated when the ad is inserted or updated. | |
| 16121 */ | |
| 16122 core.bool sslCompliant; | |
| 16123 /** Date and time that the assigned creative should start serving. */ | |
| 16124 core.DateTime startTime; | |
| 16125 /** | |
| 16126 * Weight of the creative assignment, applicable when the rotation type is | |
| 16127 * CREATIVE_ROTATION_TYPE_RANDOM. | |
| 16128 */ | |
| 16129 core.int weight; | |
| 16130 | |
| 16131 CreativeAssignment(); | |
| 16132 | |
| 16133 CreativeAssignment.fromJson(core.Map _json) { | |
| 16134 if (_json.containsKey("active")) { | |
| 16135 active = _json["active"]; | |
| 16136 } | |
| 16137 if (_json.containsKey("applyEventTags")) { | |
| 16138 applyEventTags = _json["applyEventTags"]; | |
| 16139 } | |
| 16140 if (_json.containsKey("clickThroughUrl")) { | |
| 16141 clickThroughUrl = new ClickThroughUrl.fromJson(_json["clickThroughUrl"]); | |
| 16142 } | |
| 16143 if (_json.containsKey("companionCreativeOverrides")) { | |
| 16144 companionCreativeOverrides = _json["companionCreativeOverrides"].map((valu
e) => new CompanionClickThroughOverride.fromJson(value)).toList(); | |
| 16145 } | |
| 16146 if (_json.containsKey("creativeGroupAssignments")) { | |
| 16147 creativeGroupAssignments = _json["creativeGroupAssignments"].map((value) =
> new CreativeGroupAssignment.fromJson(value)).toList(); | |
| 16148 } | |
| 16149 if (_json.containsKey("creativeId")) { | |
| 16150 creativeId = _json["creativeId"]; | |
| 16151 } | |
| 16152 if (_json.containsKey("creativeIdDimensionValue")) { | |
| 16153 creativeIdDimensionValue = new DimensionValue.fromJson(_json["creativeIdDi
mensionValue"]); | |
| 16154 } | |
| 16155 if (_json.containsKey("endTime")) { | |
| 16156 endTime = core.DateTime.parse(_json["endTime"]); | |
| 16157 } | |
| 16158 if (_json.containsKey("richMediaExitOverrides")) { | |
| 16159 richMediaExitOverrides = _json["richMediaExitOverrides"].map((value) => ne
w RichMediaExitOverride.fromJson(value)).toList(); | |
| 16160 } | |
| 16161 if (_json.containsKey("sequence")) { | |
| 16162 sequence = _json["sequence"]; | |
| 16163 } | |
| 16164 if (_json.containsKey("sslCompliant")) { | |
| 16165 sslCompliant = _json["sslCompliant"]; | |
| 16166 } | |
| 16167 if (_json.containsKey("startTime")) { | |
| 16168 startTime = core.DateTime.parse(_json["startTime"]); | |
| 16169 } | |
| 16170 if (_json.containsKey("weight")) { | |
| 16171 weight = _json["weight"]; | |
| 16172 } | |
| 16173 } | |
| 16174 | |
| 16175 core.Map toJson() { | |
| 16176 var _json = new core.Map(); | |
| 16177 if (active != null) { | |
| 16178 _json["active"] = active; | |
| 16179 } | |
| 16180 if (applyEventTags != null) { | |
| 16181 _json["applyEventTags"] = applyEventTags; | |
| 16182 } | |
| 16183 if (clickThroughUrl != null) { | |
| 16184 _json["clickThroughUrl"] = (clickThroughUrl).toJson(); | |
| 16185 } | |
| 16186 if (companionCreativeOverrides != null) { | |
| 16187 _json["companionCreativeOverrides"] = companionCreativeOverrides.map((valu
e) => (value).toJson()).toList(); | |
| 16188 } | |
| 16189 if (creativeGroupAssignments != null) { | |
| 16190 _json["creativeGroupAssignments"] = creativeGroupAssignments.map((value) =
> (value).toJson()).toList(); | |
| 16191 } | |
| 16192 if (creativeId != null) { | |
| 16193 _json["creativeId"] = creativeId; | |
| 16194 } | |
| 16195 if (creativeIdDimensionValue != null) { | |
| 16196 _json["creativeIdDimensionValue"] = (creativeIdDimensionValue).toJson(); | |
| 16197 } | |
| 16198 if (endTime != null) { | |
| 16199 _json["endTime"] = (endTime).toIso8601String(); | |
| 16200 } | |
| 16201 if (richMediaExitOverrides != null) { | |
| 16202 _json["richMediaExitOverrides"] = richMediaExitOverrides.map((value) => (v
alue).toJson()).toList(); | |
| 16203 } | |
| 16204 if (sequence != null) { | |
| 16205 _json["sequence"] = sequence; | |
| 16206 } | |
| 16207 if (sslCompliant != null) { | |
| 16208 _json["sslCompliant"] = sslCompliant; | |
| 16209 } | |
| 16210 if (startTime != null) { | |
| 16211 _json["startTime"] = (startTime).toIso8601String(); | |
| 16212 } | |
| 16213 if (weight != null) { | |
| 16214 _json["weight"] = weight; | |
| 16215 } | |
| 16216 return _json; | |
| 16217 } | |
| 16218 } | |
| 16219 | |
| 16220 /** Creative Custom Event. */ | |
| 16221 class CreativeCustomEvent { | |
| 16222 /** User-entered name for the event. */ | |
| 16223 core.String advertiserCustomEventName; | |
| 16224 /** | |
| 16225 * Type of the event. This is a read-only field. | |
| 16226 * Possible string values are: | |
| 16227 * - "ADVERTISER_EVENT_COUNTER" | |
| 16228 * - "ADVERTISER_EVENT_EXIT" | |
| 16229 * - "ADVERTISER_EVENT_TIMER" | |
| 16230 */ | |
| 16231 core.String advertiserCustomEventType; | |
| 16232 /** | |
| 16233 * Artwork label column, used to link events in DCM back to events in Studio. | |
| 16234 * This is a required field and should not be modified after insertion. | |
| 16235 */ | |
| 16236 core.String artworkLabel; | |
| 16237 /** | |
| 16238 * Artwork type used by the creative.This is a read-only field. | |
| 16239 * Possible string values are: | |
| 16240 * - "ARTWORK_TYPE_FLASH" | |
| 16241 * - "ARTWORK_TYPE_HTML5" | |
| 16242 * - "ARTWORK_TYPE_IMAGE" | |
| 16243 * - "ARTWORK_TYPE_MIXED" | |
| 16244 */ | |
| 16245 core.String artworkType; | |
| 16246 /** Exit URL of the event. This field is used only for exit events. */ | |
| 16247 core.String exitUrl; | |
| 16248 /** | |
| 16249 * ID of this event. This is a required field and should not be modified after | |
| 16250 * insertion. | |
| 16251 */ | |
| 16252 core.String id; | |
| 16253 /** | |
| 16254 * Properties for rich media popup windows. This field is used only for exit | |
| 16255 * events. | |
| 16256 */ | |
| 16257 PopupWindowProperties popupWindowProperties; | |
| 16258 /** | |
| 16259 * Target type used by the event. | |
| 16260 * Possible string values are: | |
| 16261 * - "TARGET_BLANK" | |
| 16262 * - "TARGET_PARENT" | |
| 16263 * - "TARGET_POPUP" | |
| 16264 * - "TARGET_SELF" | |
| 16265 * - "TARGET_TOP" | |
| 16266 */ | |
| 16267 core.String targetType; | |
| 16268 /** | |
| 16269 * Video reporting ID, used to differentiate multiple videos in a single | |
| 16270 * creative. This is a read-only field. | |
| 16271 */ | |
| 16272 core.String videoReportingId; | |
| 16273 | |
| 16274 CreativeCustomEvent(); | |
| 16275 | |
| 16276 CreativeCustomEvent.fromJson(core.Map _json) { | |
| 16277 if (_json.containsKey("advertiserCustomEventName")) { | |
| 16278 advertiserCustomEventName = _json["advertiserCustomEventName"]; | |
| 16279 } | |
| 16280 if (_json.containsKey("advertiserCustomEventType")) { | |
| 16281 advertiserCustomEventType = _json["advertiserCustomEventType"]; | |
| 16282 } | |
| 16283 if (_json.containsKey("artworkLabel")) { | |
| 16284 artworkLabel = _json["artworkLabel"]; | |
| 16285 } | |
| 16286 if (_json.containsKey("artworkType")) { | |
| 16287 artworkType = _json["artworkType"]; | |
| 16288 } | |
| 16289 if (_json.containsKey("exitUrl")) { | |
| 16290 exitUrl = _json["exitUrl"]; | |
| 16291 } | |
| 16292 if (_json.containsKey("id")) { | |
| 16293 id = _json["id"]; | |
| 16294 } | |
| 16295 if (_json.containsKey("popupWindowProperties")) { | |
| 16296 popupWindowProperties = new PopupWindowProperties.fromJson(_json["popupWin
dowProperties"]); | |
| 16297 } | |
| 16298 if (_json.containsKey("targetType")) { | |
| 16299 targetType = _json["targetType"]; | |
| 16300 } | |
| 16301 if (_json.containsKey("videoReportingId")) { | |
| 16302 videoReportingId = _json["videoReportingId"]; | |
| 16303 } | |
| 16304 } | |
| 16305 | |
| 16306 core.Map toJson() { | |
| 16307 var _json = new core.Map(); | |
| 16308 if (advertiserCustomEventName != null) { | |
| 16309 _json["advertiserCustomEventName"] = advertiserCustomEventName; | |
| 16310 } | |
| 16311 if (advertiserCustomEventType != null) { | |
| 16312 _json["advertiserCustomEventType"] = advertiserCustomEventType; | |
| 16313 } | |
| 16314 if (artworkLabel != null) { | |
| 16315 _json["artworkLabel"] = artworkLabel; | |
| 16316 } | |
| 16317 if (artworkType != null) { | |
| 16318 _json["artworkType"] = artworkType; | |
| 16319 } | |
| 16320 if (exitUrl != null) { | |
| 16321 _json["exitUrl"] = exitUrl; | |
| 16322 } | |
| 16323 if (id != null) { | |
| 16324 _json["id"] = id; | |
| 16325 } | |
| 16326 if (popupWindowProperties != null) { | |
| 16327 _json["popupWindowProperties"] = (popupWindowProperties).toJson(); | |
| 16328 } | |
| 16329 if (targetType != null) { | |
| 16330 _json["targetType"] = targetType; | |
| 16331 } | |
| 16332 if (videoReportingId != null) { | |
| 16333 _json["videoReportingId"] = videoReportingId; | |
| 16334 } | |
| 16335 return _json; | |
| 16336 } | |
| 16337 } | |
| 16338 | |
| 16339 /** Contains properties of a creative field. */ | |
| 16340 class CreativeField { | |
| 16341 /** | |
| 16342 * Account ID of this creative field. This is a read-only field that can be | |
| 16343 * left blank. | |
| 16344 */ | |
| 16345 core.String accountId; | |
| 16346 /** | |
| 16347 * Advertiser ID of this creative field. This is a required field on | |
| 16348 * insertion. | |
| 16349 */ | |
| 16350 core.String advertiserId; | |
| 16351 /** | |
| 16352 * Dimension value for the ID of the advertiser. This is a read-only, | |
| 16353 * auto-generated field. | |
| 16354 */ | |
| 16355 DimensionValue advertiserIdDimensionValue; | |
| 16356 /** ID of this creative field. This is a read-only, auto-generated field. */ | |
| 16357 core.String id; | |
| 16358 /** | |
| 16359 * Identifies what kind of resource this is. Value: the fixed string | |
| 16360 * "dfareporting#creativeField". | |
| 16361 */ | |
| 16362 core.String kind; | |
| 16363 /** | |
| 16364 * Name of this creative field. This is a required field and must be less than | |
| 16365 * 256 characters long and unique among creative fields of the same | |
| 16366 * advertiser. | |
| 16367 */ | |
| 16368 core.String name; | |
| 16369 /** | |
| 16370 * Subaccount ID of this creative field. This is a read-only field that can be | |
| 16371 * left blank. | |
| 16372 */ | |
| 16373 core.String subaccountId; | |
| 16374 | |
| 16375 CreativeField(); | |
| 16376 | |
| 16377 CreativeField.fromJson(core.Map _json) { | |
| 16378 if (_json.containsKey("accountId")) { | |
| 16379 accountId = _json["accountId"]; | |
| 16380 } | |
| 16381 if (_json.containsKey("advertiserId")) { | |
| 16382 advertiserId = _json["advertiserId"]; | |
| 16383 } | |
| 16384 if (_json.containsKey("advertiserIdDimensionValue")) { | |
| 16385 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser
IdDimensionValue"]); | |
| 16386 } | |
| 16387 if (_json.containsKey("id")) { | |
| 16388 id = _json["id"]; | |
| 16389 } | |
| 16390 if (_json.containsKey("kind")) { | |
| 16391 kind = _json["kind"]; | |
| 16392 } | |
| 16393 if (_json.containsKey("name")) { | |
| 16394 name = _json["name"]; | |
| 16395 } | |
| 16396 if (_json.containsKey("subaccountId")) { | |
| 16397 subaccountId = _json["subaccountId"]; | |
| 16398 } | |
| 16399 } | |
| 16400 | |
| 16401 core.Map toJson() { | |
| 16402 var _json = new core.Map(); | |
| 16403 if (accountId != null) { | |
| 16404 _json["accountId"] = accountId; | |
| 16405 } | |
| 16406 if (advertiserId != null) { | |
| 16407 _json["advertiserId"] = advertiserId; | |
| 16408 } | |
| 16409 if (advertiserIdDimensionValue != null) { | |
| 16410 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson(
); | |
| 16411 } | |
| 16412 if (id != null) { | |
| 16413 _json["id"] = id; | |
| 16414 } | |
| 16415 if (kind != null) { | |
| 16416 _json["kind"] = kind; | |
| 16417 } | |
| 16418 if (name != null) { | |
| 16419 _json["name"] = name; | |
| 16420 } | |
| 16421 if (subaccountId != null) { | |
| 16422 _json["subaccountId"] = subaccountId; | |
| 16423 } | |
| 16424 return _json; | |
| 16425 } | |
| 16426 } | |
| 16427 | |
| 16428 /** Creative Field Assignment. */ | |
| 16429 class CreativeFieldAssignment { | |
| 16430 /** ID of the creative field. */ | |
| 16431 core.String creativeFieldId; | |
| 16432 /** ID of the creative field value. */ | |
| 16433 core.String creativeFieldValueId; | |
| 16434 | |
| 16435 CreativeFieldAssignment(); | |
| 16436 | |
| 16437 CreativeFieldAssignment.fromJson(core.Map _json) { | |
| 16438 if (_json.containsKey("creativeFieldId")) { | |
| 16439 creativeFieldId = _json["creativeFieldId"]; | |
| 16440 } | |
| 16441 if (_json.containsKey("creativeFieldValueId")) { | |
| 16442 creativeFieldValueId = _json["creativeFieldValueId"]; | |
| 16443 } | |
| 16444 } | |
| 16445 | |
| 16446 core.Map toJson() { | |
| 16447 var _json = new core.Map(); | |
| 16448 if (creativeFieldId != null) { | |
| 16449 _json["creativeFieldId"] = creativeFieldId; | |
| 16450 } | |
| 16451 if (creativeFieldValueId != null) { | |
| 16452 _json["creativeFieldValueId"] = creativeFieldValueId; | |
| 16453 } | |
| 16454 return _json; | |
| 16455 } | |
| 16456 } | |
| 16457 | |
| 16458 /** Contains properties of a creative field value. */ | |
| 16459 class CreativeFieldValue { | |
| 16460 /** | |
| 16461 * ID of this creative field value. This is a read-only, auto-generated field. | |
| 16462 */ | |
| 16463 core.String id; | |
| 16464 /** | |
| 16465 * Identifies what kind of resource this is. Value: the fixed string | |
| 16466 * "dfareporting#creativeFieldValue". | |
| 16467 */ | |
| 16468 core.String kind; | |
| 16469 /** | |
| 16470 * Value of this creative field value. It needs to be less than 256 characters | |
| 16471 * in length and unique per creative field. | |
| 16472 */ | |
| 16473 core.String value; | |
| 16474 | |
| 16475 CreativeFieldValue(); | |
| 16476 | |
| 16477 CreativeFieldValue.fromJson(core.Map _json) { | |
| 16478 if (_json.containsKey("id")) { | |
| 16479 id = _json["id"]; | |
| 16480 } | |
| 16481 if (_json.containsKey("kind")) { | |
| 16482 kind = _json["kind"]; | |
| 16483 } | |
| 16484 if (_json.containsKey("value")) { | |
| 16485 value = _json["value"]; | |
| 16486 } | |
| 16487 } | |
| 16488 | |
| 16489 core.Map toJson() { | |
| 16490 var _json = new core.Map(); | |
| 16491 if (id != null) { | |
| 16492 _json["id"] = id; | |
| 16493 } | |
| 16494 if (kind != null) { | |
| 16495 _json["kind"] = kind; | |
| 16496 } | |
| 16497 if (value != null) { | |
| 16498 _json["value"] = value; | |
| 16499 } | |
| 16500 return _json; | |
| 16501 } | |
| 16502 } | |
| 16503 | |
| 16504 /** Creative Field Value List Response */ | |
| 16505 class CreativeFieldValuesListResponse { | |
| 16506 /** Creative field value collection. */ | |
| 16507 core.List<CreativeFieldValue> creativeFieldValues; | |
| 16508 /** | |
| 16509 * Identifies what kind of resource this is. Value: the fixed string | |
| 16510 * "dfareporting#creativeFieldValuesListResponse". | |
| 16511 */ | |
| 16512 core.String kind; | |
| 16513 /** Pagination token to be used for the next list operation. */ | |
| 16514 core.String nextPageToken; | |
| 16515 | |
| 16516 CreativeFieldValuesListResponse(); | |
| 16517 | |
| 16518 CreativeFieldValuesListResponse.fromJson(core.Map _json) { | |
| 16519 if (_json.containsKey("creativeFieldValues")) { | |
| 16520 creativeFieldValues = _json["creativeFieldValues"].map((value) => new Crea
tiveFieldValue.fromJson(value)).toList(); | |
| 16521 } | |
| 16522 if (_json.containsKey("kind")) { | |
| 16523 kind = _json["kind"]; | |
| 16524 } | |
| 16525 if (_json.containsKey("nextPageToken")) { | |
| 16526 nextPageToken = _json["nextPageToken"]; | |
| 16527 } | |
| 16528 } | |
| 16529 | |
| 16530 core.Map toJson() { | |
| 16531 var _json = new core.Map(); | |
| 16532 if (creativeFieldValues != null) { | |
| 16533 _json["creativeFieldValues"] = creativeFieldValues.map((value) => (value).
toJson()).toList(); | |
| 16534 } | |
| 16535 if (kind != null) { | |
| 16536 _json["kind"] = kind; | |
| 16537 } | |
| 16538 if (nextPageToken != null) { | |
| 16539 _json["nextPageToken"] = nextPageToken; | |
| 16540 } | |
| 16541 return _json; | |
| 16542 } | |
| 16543 } | |
| 16544 | |
| 16545 /** Creative Field List Response */ | |
| 16546 class CreativeFieldsListResponse { | |
| 16547 /** Creative field collection. */ | |
| 16548 core.List<CreativeField> creativeFields; | |
| 16549 /** | |
| 16550 * Identifies what kind of resource this is. Value: the fixed string | |
| 16551 * "dfareporting#creativeFieldsListResponse". | |
| 16552 */ | |
| 16553 core.String kind; | |
| 16554 /** Pagination token to be used for the next list operation. */ | |
| 16555 core.String nextPageToken; | |
| 16556 | |
| 16557 CreativeFieldsListResponse(); | |
| 16558 | |
| 16559 CreativeFieldsListResponse.fromJson(core.Map _json) { | |
| 16560 if (_json.containsKey("creativeFields")) { | |
| 16561 creativeFields = _json["creativeFields"].map((value) => new CreativeField.
fromJson(value)).toList(); | |
| 16562 } | |
| 16563 if (_json.containsKey("kind")) { | |
| 16564 kind = _json["kind"]; | |
| 16565 } | |
| 16566 if (_json.containsKey("nextPageToken")) { | |
| 16567 nextPageToken = _json["nextPageToken"]; | |
| 16568 } | |
| 16569 } | |
| 16570 | |
| 16571 core.Map toJson() { | |
| 16572 var _json = new core.Map(); | |
| 16573 if (creativeFields != null) { | |
| 16574 _json["creativeFields"] = creativeFields.map((value) => (value).toJson()).
toList(); | |
| 16575 } | |
| 16576 if (kind != null) { | |
| 16577 _json["kind"] = kind; | |
| 16578 } | |
| 16579 if (nextPageToken != null) { | |
| 16580 _json["nextPageToken"] = nextPageToken; | |
| 16581 } | |
| 16582 return _json; | |
| 16583 } | |
| 16584 } | |
| 16585 | |
| 16586 /** Contains properties of a creative group. */ | |
| 16587 class CreativeGroup { | |
| 16588 /** | |
| 16589 * Account ID of this creative group. This is a read-only field that can be | |
| 16590 * left blank. | |
| 16591 */ | |
| 16592 core.String accountId; | |
| 16593 /** | |
| 16594 * Advertiser ID of this creative group. This is a required field on | |
| 16595 * insertion. | |
| 16596 */ | |
| 16597 core.String advertiserId; | |
| 16598 /** | |
| 16599 * Dimension value for the ID of the advertiser. This is a read-only, | |
| 16600 * auto-generated field. | |
| 16601 */ | |
| 16602 DimensionValue advertiserIdDimensionValue; | |
| 16603 /** | |
| 16604 * Subgroup of the creative group. Assign your creative groups to one of the | |
| 16605 * following subgroups in order to filter or manage them more easily. This | |
| 16606 * field is required on insertion and is read-only after insertion. | |
| 16607 * Acceptable values are: | |
| 16608 * - 1 | |
| 16609 * - 2 | |
| 16610 */ | |
| 16611 core.int groupNumber; | |
| 16612 /** ID of this creative group. This is a read-only, auto-generated field. */ | |
| 16613 core.String id; | |
| 16614 /** | |
| 16615 * Identifies what kind of resource this is. Value: the fixed string | |
| 16616 * "dfareporting#creativeGroup". | |
| 16617 */ | |
| 16618 core.String kind; | |
| 16619 /** | |
| 16620 * Name of this creative group. This is a required field and must be less than | |
| 16621 * 256 characters long and unique among creative groups of the same | |
| 16622 * advertiser. | |
| 16623 */ | |
| 16624 core.String name; | |
| 16625 /** | |
| 16626 * Subaccount ID of this creative group. This is a read-only field that can be | |
| 16627 * left blank. | |
| 16628 */ | |
| 16629 core.String subaccountId; | |
| 16630 | |
| 16631 CreativeGroup(); | |
| 16632 | |
| 16633 CreativeGroup.fromJson(core.Map _json) { | |
| 16634 if (_json.containsKey("accountId")) { | |
| 16635 accountId = _json["accountId"]; | |
| 16636 } | |
| 16637 if (_json.containsKey("advertiserId")) { | |
| 16638 advertiserId = _json["advertiserId"]; | |
| 16639 } | |
| 16640 if (_json.containsKey("advertiserIdDimensionValue")) { | |
| 16641 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser
IdDimensionValue"]); | |
| 16642 } | |
| 16643 if (_json.containsKey("groupNumber")) { | |
| 16644 groupNumber = _json["groupNumber"]; | |
| 16645 } | |
| 16646 if (_json.containsKey("id")) { | |
| 16647 id = _json["id"]; | |
| 16648 } | |
| 16649 if (_json.containsKey("kind")) { | |
| 16650 kind = _json["kind"]; | |
| 16651 } | |
| 16652 if (_json.containsKey("name")) { | |
| 16653 name = _json["name"]; | |
| 16654 } | |
| 16655 if (_json.containsKey("subaccountId")) { | |
| 16656 subaccountId = _json["subaccountId"]; | |
| 16657 } | |
| 16658 } | |
| 16659 | |
| 16660 core.Map toJson() { | |
| 16661 var _json = new core.Map(); | |
| 16662 if (accountId != null) { | |
| 16663 _json["accountId"] = accountId; | |
| 16664 } | |
| 16665 if (advertiserId != null) { | |
| 16666 _json["advertiserId"] = advertiserId; | |
| 16667 } | |
| 16668 if (advertiserIdDimensionValue != null) { | |
| 16669 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson(
); | |
| 16670 } | |
| 16671 if (groupNumber != null) { | |
| 16672 _json["groupNumber"] = groupNumber; | |
| 16673 } | |
| 16674 if (id != null) { | |
| 16675 _json["id"] = id; | |
| 16676 } | |
| 16677 if (kind != null) { | |
| 16678 _json["kind"] = kind; | |
| 16679 } | |
| 16680 if (name != null) { | |
| 16681 _json["name"] = name; | |
| 16682 } | |
| 16683 if (subaccountId != null) { | |
| 16684 _json["subaccountId"] = subaccountId; | |
| 16685 } | |
| 16686 return _json; | |
| 16687 } | |
| 16688 } | |
| 16689 | |
| 16690 /** Creative Group Assignment. */ | |
| 16691 class CreativeGroupAssignment { | |
| 16692 /** ID of the creative group to be assigned. */ | |
| 16693 core.String creativeGroupId; | |
| 16694 /** | |
| 16695 * Creative group number of the creative group assignment. | |
| 16696 * Possible string values are: | |
| 16697 * - "CREATIVE_GROUP_ONE" | |
| 16698 * - "CREATIVE_GROUP_TWO" | |
| 16699 */ | |
| 16700 core.String creativeGroupNumber; | |
| 16701 | |
| 16702 CreativeGroupAssignment(); | |
| 16703 | |
| 16704 CreativeGroupAssignment.fromJson(core.Map _json) { | |
| 16705 if (_json.containsKey("creativeGroupId")) { | |
| 16706 creativeGroupId = _json["creativeGroupId"]; | |
| 16707 } | |
| 16708 if (_json.containsKey("creativeGroupNumber")) { | |
| 16709 creativeGroupNumber = _json["creativeGroupNumber"]; | |
| 16710 } | |
| 16711 } | |
| 16712 | |
| 16713 core.Map toJson() { | |
| 16714 var _json = new core.Map(); | |
| 16715 if (creativeGroupId != null) { | |
| 16716 _json["creativeGroupId"] = creativeGroupId; | |
| 16717 } | |
| 16718 if (creativeGroupNumber != null) { | |
| 16719 _json["creativeGroupNumber"] = creativeGroupNumber; | |
| 16720 } | |
| 16721 return _json; | |
| 16722 } | |
| 16723 } | |
| 16724 | |
| 16725 /** Creative Group List Response */ | |
| 16726 class CreativeGroupsListResponse { | |
| 16727 /** Creative group collection. */ | |
| 16728 core.List<CreativeGroup> creativeGroups; | |
| 16729 /** | |
| 16730 * Identifies what kind of resource this is. Value: the fixed string | |
| 16731 * "dfareporting#creativeGroupsListResponse". | |
| 16732 */ | |
| 16733 core.String kind; | |
| 16734 /** Pagination token to be used for the next list operation. */ | |
| 16735 core.String nextPageToken; | |
| 16736 | |
| 16737 CreativeGroupsListResponse(); | |
| 16738 | |
| 16739 CreativeGroupsListResponse.fromJson(core.Map _json) { | |
| 16740 if (_json.containsKey("creativeGroups")) { | |
| 16741 creativeGroups = _json["creativeGroups"].map((value) => new CreativeGroup.
fromJson(value)).toList(); | |
| 16742 } | |
| 16743 if (_json.containsKey("kind")) { | |
| 16744 kind = _json["kind"]; | |
| 16745 } | |
| 16746 if (_json.containsKey("nextPageToken")) { | |
| 16747 nextPageToken = _json["nextPageToken"]; | |
| 16748 } | |
| 16749 } | |
| 16750 | |
| 16751 core.Map toJson() { | |
| 16752 var _json = new core.Map(); | |
| 16753 if (creativeGroups != null) { | |
| 16754 _json["creativeGroups"] = creativeGroups.map((value) => (value).toJson()).
toList(); | |
| 16755 } | |
| 16756 if (kind != null) { | |
| 16757 _json["kind"] = kind; | |
| 16758 } | |
| 16759 if (nextPageToken != null) { | |
| 16760 _json["nextPageToken"] = nextPageToken; | |
| 16761 } | |
| 16762 return _json; | |
| 16763 } | |
| 16764 } | |
| 16765 | |
| 16766 /** Creative optimization settings. */ | |
| 16767 class CreativeOptimizationConfiguration { | |
| 16768 /** | |
| 16769 * ID of this creative optimization config. This field is auto-generated when | |
| 16770 * the campaign is inserted or updated. It can be null for existing campaigns. | |
| 16771 */ | |
| 16772 core.String id; | |
| 16773 /** | |
| 16774 * Name of this creative optimization config. This is a required field and | |
| 16775 * must be less than 129 characters long. | |
| 16776 */ | |
| 16777 core.String name; | |
| 16778 /** List of optimization activities associated with this configuration. */ | |
| 16779 core.List<OptimizationActivity> optimizationActivitys; | |
| 16780 /** | |
| 16781 * Optimization model for this configuration. | |
| 16782 * Possible string values are: | |
| 16783 * - "CLICK" | |
| 16784 * - "POST_CLICK" | |
| 16785 * - "POST_CLICK_AND_IMPRESSION" | |
| 16786 * - "POST_IMPRESSION" | |
| 16787 * - "VIDEO_COMPLETION" | |
| 16788 */ | |
| 16789 core.String optimizationModel; | |
| 16790 | |
| 16791 CreativeOptimizationConfiguration(); | |
| 16792 | |
| 16793 CreativeOptimizationConfiguration.fromJson(core.Map _json) { | |
| 16794 if (_json.containsKey("id")) { | |
| 16795 id = _json["id"]; | |
| 16796 } | |
| 16797 if (_json.containsKey("name")) { | |
| 16798 name = _json["name"]; | |
| 16799 } | |
| 16800 if (_json.containsKey("optimizationActivitys")) { | |
| 16801 optimizationActivitys = _json["optimizationActivitys"].map((value) => new
OptimizationActivity.fromJson(value)).toList(); | |
| 16802 } | |
| 16803 if (_json.containsKey("optimizationModel")) { | |
| 16804 optimizationModel = _json["optimizationModel"]; | |
| 16805 } | |
| 16806 } | |
| 16807 | |
| 16808 core.Map toJson() { | |
| 16809 var _json = new core.Map(); | |
| 16810 if (id != null) { | |
| 16811 _json["id"] = id; | |
| 16812 } | |
| 16813 if (name != null) { | |
| 16814 _json["name"] = name; | |
| 16815 } | |
| 16816 if (optimizationActivitys != null) { | |
| 16817 _json["optimizationActivitys"] = optimizationActivitys.map((value) => (val
ue).toJson()).toList(); | |
| 16818 } | |
| 16819 if (optimizationModel != null) { | |
| 16820 _json["optimizationModel"] = optimizationModel; | |
| 16821 } | |
| 16822 return _json; | |
| 16823 } | |
| 16824 } | |
| 16825 | |
| 16826 /** Creative Rotation. */ | |
| 16827 class CreativeRotation { | |
| 16828 /** Creative assignments in this creative rotation. */ | |
| 16829 core.List<CreativeAssignment> creativeAssignments; | |
| 16830 /** | |
| 16831 * Creative optimization configuration that is used by this ad. It should | |
| 16832 * refer to one of the existing optimization configurations in the ad's | |
| 16833 * campaign. If it is unset or set to 0, then the campaign's default | |
| 16834 * optimization configuration will be used for this ad. | |
| 16835 */ | |
| 16836 core.String creativeOptimizationConfigurationId; | |
| 16837 /** | |
| 16838 * Type of creative rotation. Can be used to specify whether to use sequential | |
| 16839 * or random rotation. | |
| 16840 * Possible string values are: | |
| 16841 * - "CREATIVE_ROTATION_TYPE_RANDOM" | |
| 16842 * - "CREATIVE_ROTATION_TYPE_SEQUENTIAL" | |
| 16843 */ | |
| 16844 core.String type; | |
| 16845 /** | |
| 16846 * Strategy for calculating weights. Used with CREATIVE_ROTATION_TYPE_RANDOM. | |
| 16847 * Possible string values are: | |
| 16848 * - "WEIGHT_STRATEGY_CUSTOM" | |
| 16849 * - "WEIGHT_STRATEGY_EQUAL" | |
| 16850 * - "WEIGHT_STRATEGY_HIGHEST_CTR" | |
| 16851 * - "WEIGHT_STRATEGY_OPTIMIZED" | |
| 16852 */ | |
| 16853 core.String weightCalculationStrategy; | |
| 16854 | |
| 16855 CreativeRotation(); | |
| 16856 | |
| 16857 CreativeRotation.fromJson(core.Map _json) { | |
| 16858 if (_json.containsKey("creativeAssignments")) { | |
| 16859 creativeAssignments = _json["creativeAssignments"].map((value) => new Crea
tiveAssignment.fromJson(value)).toList(); | |
| 16860 } | |
| 16861 if (_json.containsKey("creativeOptimizationConfigurationId")) { | |
| 16862 creativeOptimizationConfigurationId = _json["creativeOptimizationConfigura
tionId"]; | |
| 16863 } | |
| 16864 if (_json.containsKey("type")) { | |
| 16865 type = _json["type"]; | |
| 16866 } | |
| 16867 if (_json.containsKey("weightCalculationStrategy")) { | |
| 16868 weightCalculationStrategy = _json["weightCalculationStrategy"]; | |
| 16869 } | |
| 16870 } | |
| 16871 | |
| 16872 core.Map toJson() { | |
| 16873 var _json = new core.Map(); | |
| 16874 if (creativeAssignments != null) { | |
| 16875 _json["creativeAssignments"] = creativeAssignments.map((value) => (value).
toJson()).toList(); | |
| 16876 } | |
| 16877 if (creativeOptimizationConfigurationId != null) { | |
| 16878 _json["creativeOptimizationConfigurationId"] = creativeOptimizationConfigu
rationId; | |
| 16879 } | |
| 16880 if (type != null) { | |
| 16881 _json["type"] = type; | |
| 16882 } | |
| 16883 if (weightCalculationStrategy != null) { | |
| 16884 _json["weightCalculationStrategy"] = weightCalculationStrategy; | |
| 16885 } | |
| 16886 return _json; | |
| 16887 } | |
| 16888 } | |
| 16889 | |
| 16890 /** Creative Settings */ | |
| 16891 class CreativeSettings { | |
| 16892 /** | |
| 16893 * Header text for iFrames for this site. Must be less than or equal to 2000 | |
| 16894 * characters long. | |
| 16895 */ | |
| 16896 core.String iFrameFooter; | |
| 16897 /** | |
| 16898 * Header text for iFrames for this site. Must be less than or equal to 2000 | |
| 16899 * characters long. | |
| 16900 */ | |
| 16901 core.String iFrameHeader; | |
| 16902 | |
| 16903 CreativeSettings(); | |
| 16904 | |
| 16905 CreativeSettings.fromJson(core.Map _json) { | |
| 16906 if (_json.containsKey("iFrameFooter")) { | |
| 16907 iFrameFooter = _json["iFrameFooter"]; | |
| 16908 } | |
| 16909 if (_json.containsKey("iFrameHeader")) { | |
| 16910 iFrameHeader = _json["iFrameHeader"]; | |
| 16911 } | |
| 16912 } | |
| 16913 | |
| 16914 core.Map toJson() { | |
| 16915 var _json = new core.Map(); | |
| 16916 if (iFrameFooter != null) { | |
| 16917 _json["iFrameFooter"] = iFrameFooter; | |
| 16918 } | |
| 16919 if (iFrameHeader != null) { | |
| 16920 _json["iFrameHeader"] = iFrameHeader; | |
| 16921 } | |
| 16922 return _json; | |
| 16923 } | |
| 16924 } | |
| 16925 | |
| 16926 /** Creative List Response */ | |
| 16927 class CreativesListResponse { | |
| 16928 /** Creative collection. */ | |
| 16929 core.List<Creative> creatives; | |
| 16930 /** | |
| 16931 * Identifies what kind of resource this is. Value: the fixed string | |
| 16932 * "dfareporting#creativesListResponse". | |
| 16933 */ | |
| 16934 core.String kind; | |
| 16935 /** Pagination token to be used for the next list operation. */ | |
| 16936 core.String nextPageToken; | |
| 16937 | |
| 16938 CreativesListResponse(); | |
| 16939 | |
| 16940 CreativesListResponse.fromJson(core.Map _json) { | |
| 16941 if (_json.containsKey("creatives")) { | |
| 16942 creatives = _json["creatives"].map((value) => new Creative.fromJson(value)
).toList(); | |
| 16943 } | |
| 16944 if (_json.containsKey("kind")) { | |
| 16945 kind = _json["kind"]; | |
| 16946 } | |
| 16947 if (_json.containsKey("nextPageToken")) { | |
| 16948 nextPageToken = _json["nextPageToken"]; | |
| 16949 } | |
| 16950 } | |
| 16951 | |
| 16952 core.Map toJson() { | |
| 16953 var _json = new core.Map(); | |
| 16954 if (creatives != null) { | |
| 16955 _json["creatives"] = creatives.map((value) => (value).toJson()).toList(); | |
| 16956 } | |
| 16957 if (kind != null) { | |
| 16958 _json["kind"] = kind; | |
| 16959 } | |
| 16960 if (nextPageToken != null) { | |
| 16961 _json["nextPageToken"] = nextPageToken; | |
| 16962 } | |
| 16963 return _json; | |
| 16964 } | |
| 16965 } | |
| 16966 | |
| 16967 /** | |
| 16968 * Represents fields that are compatible to be selected for a report of type | |
| 16969 * "CROSS_DIMENSION_REACH". | |
| 16970 */ | |
| 16971 class CrossDimensionReachReportCompatibleFields { | |
| 16972 /** | |
| 16973 * Dimensions which are compatible to be selected in the "breakdown" section | |
| 16974 * of the report. | |
| 16975 */ | |
| 16976 core.List<Dimension> breakdown; | |
| 16977 /** | |
| 16978 * Dimensions which are compatible to be selected in the "dimensionFilters" | |
| 16979 * section of the report. | |
| 16980 */ | |
| 16981 core.List<Dimension> dimensionFilters; | |
| 16982 /** | |
| 16983 * The kind of resource this is, in this case | |
| 16984 * dfareporting#crossDimensionReachReportCompatibleFields. | |
| 16985 */ | |
| 16986 core.String kind; | |
| 16987 /** | |
| 16988 * Metrics which are compatible to be selected in the "metricNames" section of | |
| 16989 * the report. | |
| 16990 */ | |
| 16991 core.List<Metric> metrics; | |
| 16992 /** | |
| 16993 * Metrics which are compatible to be selected in the "overlapMetricNames" | |
| 16994 * section of the report. | |
| 16995 */ | |
| 16996 core.List<Metric> overlapMetrics; | |
| 16997 | |
| 16998 CrossDimensionReachReportCompatibleFields(); | |
| 16999 | |
| 17000 CrossDimensionReachReportCompatibleFields.fromJson(core.Map _json) { | |
| 17001 if (_json.containsKey("breakdown")) { | |
| 17002 breakdown = _json["breakdown"].map((value) => new Dimension.fromJson(value
)).toList(); | |
| 17003 } | |
| 17004 if (_json.containsKey("dimensionFilters")) { | |
| 17005 dimensionFilters = _json["dimensionFilters"].map((value) => new Dimension.
fromJson(value)).toList(); | |
| 17006 } | |
| 17007 if (_json.containsKey("kind")) { | |
| 17008 kind = _json["kind"]; | |
| 17009 } | |
| 17010 if (_json.containsKey("metrics")) { | |
| 17011 metrics = _json["metrics"].map((value) => new Metric.fromJson(value)).toLi
st(); | |
| 17012 } | |
| 17013 if (_json.containsKey("overlapMetrics")) { | |
| 17014 overlapMetrics = _json["overlapMetrics"].map((value) => new Metric.fromJso
n(value)).toList(); | |
| 17015 } | |
| 17016 } | |
| 17017 | |
| 17018 core.Map toJson() { | |
| 17019 var _json = new core.Map(); | |
| 17020 if (breakdown != null) { | |
| 17021 _json["breakdown"] = breakdown.map((value) => (value).toJson()).toList(); | |
| 17022 } | |
| 17023 if (dimensionFilters != null) { | |
| 17024 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson
()).toList(); | |
| 17025 } | |
| 17026 if (kind != null) { | |
| 17027 _json["kind"] = kind; | |
| 17028 } | |
| 17029 if (metrics != null) { | |
| 17030 _json["metrics"] = metrics.map((value) => (value).toJson()).toList(); | |
| 17031 } | |
| 17032 if (overlapMetrics != null) { | |
| 17033 _json["overlapMetrics"] = overlapMetrics.map((value) => (value).toJson()).
toList(); | |
| 17034 } | |
| 17035 return _json; | |
| 17036 } | |
| 17037 } | |
| 17038 | |
| 17039 /** Represents a Custom Rich Media Events group. */ | |
| 17040 class CustomRichMediaEvents { | |
| 17041 /** | |
| 17042 * List of custom rich media event IDs. Dimension values must be all of type | |
| 17043 * dfa:richMediaEventTypeIdAndName. | |
| 17044 */ | |
| 17045 core.List<DimensionValue> filteredEventIds; | |
| 17046 /** | |
| 17047 * The kind of resource this is, in this case | |
| 17048 * dfareporting#customRichMediaEvents. | |
| 17049 */ | |
| 17050 core.String kind; | |
| 17051 | |
| 17052 CustomRichMediaEvents(); | |
| 17053 | |
| 17054 CustomRichMediaEvents.fromJson(core.Map _json) { | |
| 17055 if (_json.containsKey("filteredEventIds")) { | |
| 17056 filteredEventIds = _json["filteredEventIds"].map((value) => new DimensionV
alue.fromJson(value)).toList(); | |
| 17057 } | |
| 17058 if (_json.containsKey("kind")) { | |
| 17059 kind = _json["kind"]; | |
| 17060 } | |
| 17061 } | |
| 17062 | |
| 17063 core.Map toJson() { | |
| 17064 var _json = new core.Map(); | |
| 17065 if (filteredEventIds != null) { | |
| 17066 _json["filteredEventIds"] = filteredEventIds.map((value) => (value).toJson
()).toList(); | |
| 17067 } | |
| 17068 if (kind != null) { | |
| 17069 _json["kind"] = kind; | |
| 17070 } | |
| 17071 return _json; | |
| 17072 } | |
| 17073 } | |
| 17074 | |
| 17075 /** Represents a date range. */ | |
| 17076 class DateRange { | |
| 17077 /** | |
| 17078 * The end date of the date range, inclusive. A string of the format: | |
| 17079 * "yyyy-MM-dd". | |
| 17080 */ | |
| 17081 core.DateTime endDate; | |
| 17082 /** The kind of resource this is, in this case dfareporting#dateRange. */ | |
| 17083 core.String kind; | |
| 17084 /** | |
| 17085 * The date range relative to the date of when the report is run. | |
| 17086 * Possible string values are: | |
| 17087 * - "LAST_24_MONTHS" | |
| 17088 * - "LAST_30_DAYS" | |
| 17089 * - "LAST_365_DAYS" | |
| 17090 * - "LAST_7_DAYS" | |
| 17091 * - "LAST_90_DAYS" | |
| 17092 * - "MONTH_TO_DATE" | |
| 17093 * - "PREVIOUS_MONTH" | |
| 17094 * - "PREVIOUS_QUARTER" | |
| 17095 * - "PREVIOUS_WEEK" | |
| 17096 * - "PREVIOUS_YEAR" | |
| 17097 * - "QUARTER_TO_DATE" | |
| 17098 * - "TODAY" | |
| 17099 * - "WEEK_TO_DATE" | |
| 17100 * - "YEAR_TO_DATE" | |
| 17101 * - "YESTERDAY" | |
| 17102 */ | |
| 17103 core.String relativeDateRange; | |
| 17104 /** | |
| 17105 * The start date of the date range, inclusive. A string of the format: | |
| 17106 * "yyyy-MM-dd". | |
| 17107 */ | |
| 17108 core.DateTime startDate; | |
| 17109 | |
| 17110 DateRange(); | |
| 17111 | |
| 17112 DateRange.fromJson(core.Map _json) { | |
| 17113 if (_json.containsKey("endDate")) { | |
| 17114 endDate = core.DateTime.parse(_json["endDate"]); | |
| 17115 } | |
| 17116 if (_json.containsKey("kind")) { | |
| 17117 kind = _json["kind"]; | |
| 17118 } | |
| 17119 if (_json.containsKey("relativeDateRange")) { | |
| 17120 relativeDateRange = _json["relativeDateRange"]; | |
| 17121 } | |
| 17122 if (_json.containsKey("startDate")) { | |
| 17123 startDate = core.DateTime.parse(_json["startDate"]); | |
| 17124 } | |
| 17125 } | |
| 17126 | |
| 17127 core.Map toJson() { | |
| 17128 var _json = new core.Map(); | |
| 17129 if (endDate != null) { | |
| 17130 _json["endDate"] = "${(endDate).year.toString().padLeft(4, '0')}-${(endDat
e).month.toString().padLeft(2, '0')}-${(endDate).day.toString().padLeft(2, '0')}
"; | |
| 17131 } | |
| 17132 if (kind != null) { | |
| 17133 _json["kind"] = kind; | |
| 17134 } | |
| 17135 if (relativeDateRange != null) { | |
| 17136 _json["relativeDateRange"] = relativeDateRange; | |
| 17137 } | |
| 17138 if (startDate != null) { | |
| 17139 _json["startDate"] = "${(startDate).year.toString().padLeft(4, '0')}-${(st
artDate).month.toString().padLeft(2, '0')}-${(startDate).day.toString().padLeft(
2, '0')}"; | |
| 17140 } | |
| 17141 return _json; | |
| 17142 } | |
| 17143 } | |
| 17144 | |
| 17145 /** Day Part Targeting. */ | |
| 17146 class DayPartTargeting { | |
| 17147 /** | |
| 17148 * Days of the week when the ad will serve. | |
| 17149 * | |
| 17150 * Acceptable values are: | |
| 17151 * - "SUNDAY" | |
| 17152 * - "MONDAY" | |
| 17153 * - "TUESDAY" | |
| 17154 * - "WEDNESDAY" | |
| 17155 * - "THURSDAY" | |
| 17156 * - "FRIDAY" | |
| 17157 * - "SATURDAY" | |
| 17158 */ | |
| 17159 core.List<core.String> daysOfWeek; | |
| 17160 /** | |
| 17161 * Hours of the day when the ad will serve. Must be an integer between 0 and | |
| 17162 * 23 (inclusive), where 0 is midnight to 1 AM, and 23 is 11 PM to midnight. | |
| 17163 * Can be specified with days of week, in which case the ad would serve during | |
| 17164 * these hours on the specified days. For example, if Monday, Wednesday, | |
| 17165 * Friday are the days of week specified and 9-10am, 3-5pm (hours 9, 15, and | |
| 17166 * 16) is specified, the ad would serve Monday, Wednesdays, and Fridays at | |
| 17167 * 9-10am and 3-5pm. | |
| 17168 */ | |
| 17169 core.List<core.int> hoursOfDay; | |
| 17170 /** | |
| 17171 * Whether or not to use the user's local time. If false, the America/New York | |
| 17172 * time zone applies. | |
| 17173 */ | |
| 17174 core.bool userLocalTime; | |
| 17175 | |
| 17176 DayPartTargeting(); | |
| 17177 | |
| 17178 DayPartTargeting.fromJson(core.Map _json) { | |
| 17179 if (_json.containsKey("daysOfWeek")) { | |
| 17180 daysOfWeek = _json["daysOfWeek"]; | |
| 17181 } | |
| 17182 if (_json.containsKey("hoursOfDay")) { | |
| 17183 hoursOfDay = _json["hoursOfDay"]; | |
| 17184 } | |
| 17185 if (_json.containsKey("userLocalTime")) { | |
| 17186 userLocalTime = _json["userLocalTime"]; | |
| 17187 } | |
| 17188 } | |
| 17189 | |
| 17190 core.Map toJson() { | |
| 17191 var _json = new core.Map(); | |
| 17192 if (daysOfWeek != null) { | |
| 17193 _json["daysOfWeek"] = daysOfWeek; | |
| 17194 } | |
| 17195 if (hoursOfDay != null) { | |
| 17196 _json["hoursOfDay"] = hoursOfDay; | |
| 17197 } | |
| 17198 if (userLocalTime != null) { | |
| 17199 _json["userLocalTime"] = userLocalTime; | |
| 17200 } | |
| 17201 return _json; | |
| 17202 } | |
| 17203 } | |
| 17204 | |
| 17205 /** | |
| 17206 * Properties of inheriting and overriding the default click-through event tag. | |
| 17207 * A campaign may override the event tag defined at the advertiser level, and an | |
| 17208 * ad may also override the campaign's setting further. | |
| 17209 */ | |
| 17210 class DefaultClickThroughEventTagProperties { | |
| 17211 /** | |
| 17212 * ID of the click-through event tag to apply to all ads in this entity's | |
| 17213 * scope. | |
| 17214 */ | |
| 17215 core.String defaultClickThroughEventTagId; | |
| 17216 /** | |
| 17217 * Whether this entity should override the inherited default click-through | |
| 17218 * event tag with its own defined value. | |
| 17219 */ | |
| 17220 core.bool overrideInheritedEventTag; | |
| 17221 | |
| 17222 DefaultClickThroughEventTagProperties(); | |
| 17223 | |
| 17224 DefaultClickThroughEventTagProperties.fromJson(core.Map _json) { | |
| 17225 if (_json.containsKey("defaultClickThroughEventTagId")) { | |
| 17226 defaultClickThroughEventTagId = _json["defaultClickThroughEventTagId"]; | |
| 17227 } | |
| 17228 if (_json.containsKey("overrideInheritedEventTag")) { | |
| 17229 overrideInheritedEventTag = _json["overrideInheritedEventTag"]; | |
| 17230 } | |
| 17231 } | |
| 17232 | |
| 17233 core.Map toJson() { | |
| 17234 var _json = new core.Map(); | |
| 17235 if (defaultClickThroughEventTagId != null) { | |
| 17236 _json["defaultClickThroughEventTagId"] = defaultClickThroughEventTagId; | |
| 17237 } | |
| 17238 if (overrideInheritedEventTag != null) { | |
| 17239 _json["overrideInheritedEventTag"] = overrideInheritedEventTag; | |
| 17240 } | |
| 17241 return _json; | |
| 17242 } | |
| 17243 } | |
| 17244 | |
| 17245 /** Delivery Schedule. */ | |
| 17246 class DeliverySchedule { | |
| 17247 /** | |
| 17248 * Limit on the number of times an individual user can be served the ad within | |
| 17249 * a specified period of time. | |
| 17250 */ | |
| 17251 FrequencyCap frequencyCap; | |
| 17252 /** | |
| 17253 * Whether or not hard cutoff is enabled. If true, the ad will not serve after | |
| 17254 * the end date and time. Otherwise the ad will continue to be served until it | |
| 17255 * has reached its delivery goals. | |
| 17256 */ | |
| 17257 core.bool hardCutoff; | |
| 17258 /** | |
| 17259 * Impression ratio for this ad. This ratio determines how often each ad is | |
| 17260 * served relative to the others. For example, if ad A has an impression ratio | |
| 17261 * of 1 and ad B has an impression ratio of 3, then DCM will serve ad B three | |
| 17262 * times as often as ad A. Must be between 1 and 10. | |
| 17263 */ | |
| 17264 core.String impressionRatio; | |
| 17265 /** | |
| 17266 * Serving priority of an ad, with respect to other ads. The lower the | |
| 17267 * priority number, the greater the priority with which it is served. | |
| 17268 * Possible string values are: | |
| 17269 * - "AD_PRIORITY_01" | |
| 17270 * - "AD_PRIORITY_02" | |
| 17271 * - "AD_PRIORITY_03" | |
| 17272 * - "AD_PRIORITY_04" | |
| 17273 * - "AD_PRIORITY_05" | |
| 17274 * - "AD_PRIORITY_06" | |
| 17275 * - "AD_PRIORITY_07" | |
| 17276 * - "AD_PRIORITY_08" | |
| 17277 * - "AD_PRIORITY_09" | |
| 17278 * - "AD_PRIORITY_10" | |
| 17279 * - "AD_PRIORITY_11" | |
| 17280 * - "AD_PRIORITY_12" | |
| 17281 * - "AD_PRIORITY_13" | |
| 17282 * - "AD_PRIORITY_14" | |
| 17283 * - "AD_PRIORITY_15" | |
| 17284 * - "AD_PRIORITY_16" | |
| 17285 */ | |
| 17286 core.String priority; | |
| 17287 | |
| 17288 DeliverySchedule(); | |
| 17289 | |
| 17290 DeliverySchedule.fromJson(core.Map _json) { | |
| 17291 if (_json.containsKey("frequencyCap")) { | |
| 17292 frequencyCap = new FrequencyCap.fromJson(_json["frequencyCap"]); | |
| 17293 } | |
| 17294 if (_json.containsKey("hardCutoff")) { | |
| 17295 hardCutoff = _json["hardCutoff"]; | |
| 17296 } | |
| 17297 if (_json.containsKey("impressionRatio")) { | |
| 17298 impressionRatio = _json["impressionRatio"]; | |
| 17299 } | |
| 17300 if (_json.containsKey("priority")) { | |
| 17301 priority = _json["priority"]; | |
| 17302 } | |
| 17303 } | |
| 17304 | |
| 17305 core.Map toJson() { | |
| 17306 var _json = new core.Map(); | |
| 17307 if (frequencyCap != null) { | |
| 17308 _json["frequencyCap"] = (frequencyCap).toJson(); | |
| 17309 } | |
| 17310 if (hardCutoff != null) { | |
| 17311 _json["hardCutoff"] = hardCutoff; | |
| 17312 } | |
| 17313 if (impressionRatio != null) { | |
| 17314 _json["impressionRatio"] = impressionRatio; | |
| 17315 } | |
| 17316 if (priority != null) { | |
| 17317 _json["priority"] = priority; | |
| 17318 } | |
| 17319 return _json; | |
| 17320 } | |
| 17321 } | |
| 17322 | |
| 17323 /** DFP Settings */ | |
| 17324 class DfpSettings { | |
| 17325 /** DFP network code for this directory site. */ | |
| 17326 core.String dfpNetworkCode; | |
| 17327 /** DFP network name for this directory site. */ | |
| 17328 core.String dfpNetworkName; | |
| 17329 /** Whether this directory site accepts programmatic placements. */ | |
| 17330 core.bool programmaticPlacementAccepted; | |
| 17331 /** Whether this directory site accepts publisher-paid tags. */ | |
| 17332 core.bool pubPaidPlacementAccepted; | |
| 17333 /** | |
| 17334 * Whether this directory site is available only via DoubleClick Publisher | |
| 17335 * Portal. | |
| 17336 */ | |
| 17337 core.bool publisherPortalOnly; | |
| 17338 | |
| 17339 DfpSettings(); | |
| 17340 | |
| 17341 DfpSettings.fromJson(core.Map _json) { | |
| 17342 if (_json.containsKey("dfp_network_code")) { | |
| 17343 dfpNetworkCode = _json["dfp_network_code"]; | |
| 17344 } | |
| 17345 if (_json.containsKey("dfp_network_name")) { | |
| 17346 dfpNetworkName = _json["dfp_network_name"]; | |
| 17347 } | |
| 17348 if (_json.containsKey("programmaticPlacementAccepted")) { | |
| 17349 programmaticPlacementAccepted = _json["programmaticPlacementAccepted"]; | |
| 17350 } | |
| 17351 if (_json.containsKey("pubPaidPlacementAccepted")) { | |
| 17352 pubPaidPlacementAccepted = _json["pubPaidPlacementAccepted"]; | |
| 17353 } | |
| 17354 if (_json.containsKey("publisherPortalOnly")) { | |
| 17355 publisherPortalOnly = _json["publisherPortalOnly"]; | |
| 17356 } | |
| 17357 } | |
| 17358 | |
| 17359 core.Map toJson() { | |
| 17360 var _json = new core.Map(); | |
| 17361 if (dfpNetworkCode != null) { | |
| 17362 _json["dfp_network_code"] = dfpNetworkCode; | |
| 17363 } | |
| 17364 if (dfpNetworkName != null) { | |
| 17365 _json["dfp_network_name"] = dfpNetworkName; | |
| 17366 } | |
| 17367 if (programmaticPlacementAccepted != null) { | |
| 17368 _json["programmaticPlacementAccepted"] = programmaticPlacementAccepted; | |
| 17369 } | |
| 17370 if (pubPaidPlacementAccepted != null) { | |
| 17371 _json["pubPaidPlacementAccepted"] = pubPaidPlacementAccepted; | |
| 17372 } | |
| 17373 if (publisherPortalOnly != null) { | |
| 17374 _json["publisherPortalOnly"] = publisherPortalOnly; | |
| 17375 } | |
| 17376 return _json; | |
| 17377 } | |
| 17378 } | |
| 17379 | |
| 17380 /** Represents a dimension. */ | |
| 17381 class Dimension { | |
| 17382 /** The kind of resource this is, in this case dfareporting#dimension. */ | |
| 17383 core.String kind; | |
| 17384 /** The dimension name, e.g. dfa:advertiser */ | |
| 17385 core.String name; | |
| 17386 | |
| 17387 Dimension(); | |
| 17388 | |
| 17389 Dimension.fromJson(core.Map _json) { | |
| 17390 if (_json.containsKey("kind")) { | |
| 17391 kind = _json["kind"]; | |
| 17392 } | |
| 17393 if (_json.containsKey("name")) { | |
| 17394 name = _json["name"]; | |
| 17395 } | |
| 17396 } | |
| 17397 | |
| 17398 core.Map toJson() { | |
| 17399 var _json = new core.Map(); | |
| 17400 if (kind != null) { | |
| 17401 _json["kind"] = kind; | |
| 17402 } | |
| 17403 if (name != null) { | |
| 17404 _json["name"] = name; | |
| 17405 } | |
| 17406 return _json; | |
| 17407 } | |
| 17408 } | |
| 17409 | |
| 17410 /** Represents a dimension filter. */ | |
| 17411 class DimensionFilter { | |
| 17412 /** The name of the dimension to filter. */ | |
| 17413 core.String dimensionName; | |
| 17414 /** | |
| 17415 * The kind of resource this is, in this case dfareporting#dimensionFilter. | |
| 17416 */ | |
| 17417 core.String kind; | |
| 17418 /** The value of the dimension to filter. */ | |
| 17419 core.String value; | |
| 17420 | |
| 17421 DimensionFilter(); | |
| 17422 | |
| 17423 DimensionFilter.fromJson(core.Map _json) { | |
| 17424 if (_json.containsKey("dimensionName")) { | |
| 17425 dimensionName = _json["dimensionName"]; | |
| 17426 } | |
| 17427 if (_json.containsKey("kind")) { | |
| 17428 kind = _json["kind"]; | |
| 17429 } | |
| 17430 if (_json.containsKey("value")) { | |
| 17431 value = _json["value"]; | |
| 17432 } | |
| 17433 } | |
| 17434 | |
| 17435 core.Map toJson() { | |
| 17436 var _json = new core.Map(); | |
| 17437 if (dimensionName != null) { | |
| 17438 _json["dimensionName"] = dimensionName; | |
| 17439 } | |
| 17440 if (kind != null) { | |
| 17441 _json["kind"] = kind; | |
| 17442 } | |
| 17443 if (value != null) { | |
| 17444 _json["value"] = value; | |
| 17445 } | |
| 17446 return _json; | |
| 17447 } | |
| 17448 } | |
| 17449 | |
| 17450 /** Represents a DimensionValue resource. */ | |
| 17451 class DimensionValue { | |
| 17452 /** The name of the dimension. */ | |
| 17453 core.String dimensionName; | |
| 17454 /** The eTag of this response for caching purposes. */ | |
| 17455 core.String etag; | |
| 17456 /** The ID associated with the value if available. */ | |
| 17457 core.String id; | |
| 17458 /** | |
| 17459 * The kind of resource this is, in this case dfareporting#dimensionValue. | |
| 17460 */ | |
| 17461 core.String kind; | |
| 17462 /** | |
| 17463 * Determines how the 'value' field is matched when filtering. If not | |
| 17464 * specified, defaults to EXACT. If set to WILDCARD_EXPRESSION, '*' is allowed | |
| 17465 * as a placeholder for variable length character sequences, and it can be | |
| 17466 * escaped with a backslash. Note, only paid search dimensions | |
| 17467 * ('dfa:paidSearch*') allow a matchType other than EXACT. | |
| 17468 * Possible string values are: | |
| 17469 * - "BEGINS_WITH" | |
| 17470 * - "CONTAINS" | |
| 17471 * - "EXACT" | |
| 17472 * - "WILDCARD_EXPRESSION" | |
| 17473 */ | |
| 17474 core.String matchType; | |
| 17475 /** The value of the dimension. */ | |
| 17476 core.String value; | |
| 17477 | |
| 17478 DimensionValue(); | |
| 17479 | |
| 17480 DimensionValue.fromJson(core.Map _json) { | |
| 17481 if (_json.containsKey("dimensionName")) { | |
| 17482 dimensionName = _json["dimensionName"]; | |
| 17483 } | |
| 17484 if (_json.containsKey("etag")) { | |
| 17485 etag = _json["etag"]; | |
| 17486 } | |
| 17487 if (_json.containsKey("id")) { | |
| 17488 id = _json["id"]; | |
| 17489 } | |
| 17490 if (_json.containsKey("kind")) { | |
| 17491 kind = _json["kind"]; | |
| 17492 } | |
| 17493 if (_json.containsKey("matchType")) { | |
| 17494 matchType = _json["matchType"]; | |
| 17495 } | |
| 17496 if (_json.containsKey("value")) { | |
| 17497 value = _json["value"]; | |
| 17498 } | |
| 17499 } | |
| 17500 | |
| 17501 core.Map toJson() { | |
| 17502 var _json = new core.Map(); | |
| 17503 if (dimensionName != null) { | |
| 17504 _json["dimensionName"] = dimensionName; | |
| 17505 } | |
| 17506 if (etag != null) { | |
| 17507 _json["etag"] = etag; | |
| 17508 } | |
| 17509 if (id != null) { | |
| 17510 _json["id"] = id; | |
| 17511 } | |
| 17512 if (kind != null) { | |
| 17513 _json["kind"] = kind; | |
| 17514 } | |
| 17515 if (matchType != null) { | |
| 17516 _json["matchType"] = matchType; | |
| 17517 } | |
| 17518 if (value != null) { | |
| 17519 _json["value"] = value; | |
| 17520 } | |
| 17521 return _json; | |
| 17522 } | |
| 17523 } | |
| 17524 | |
| 17525 /** Represents the list of DimensionValue resources. */ | |
| 17526 class DimensionValueList { | |
| 17527 /** The eTag of this response for caching purposes. */ | |
| 17528 core.String etag; | |
| 17529 /** The dimension values returned in this response. */ | |
| 17530 core.List<DimensionValue> items; | |
| 17531 /** | |
| 17532 * The kind of list this is, in this case dfareporting#dimensionValueList. | |
| 17533 */ | |
| 17534 core.String kind; | |
| 17535 /** | |
| 17536 * Continuation token used to page through dimension values. To retrieve the | |
| 17537 * next page of results, set the next request's "pageToken" to the value of | |
| 17538 * this field. The page token is only valid for a limited amount of time and | |
| 17539 * should not be persisted. | |
| 17540 */ | |
| 17541 core.String nextPageToken; | |
| 17542 | |
| 17543 DimensionValueList(); | |
| 17544 | |
| 17545 DimensionValueList.fromJson(core.Map _json) { | |
| 17546 if (_json.containsKey("etag")) { | |
| 17547 etag = _json["etag"]; | |
| 17548 } | |
| 17549 if (_json.containsKey("items")) { | |
| 17550 items = _json["items"].map((value) => new DimensionValue.fromJson(value)).
toList(); | |
| 17551 } | |
| 17552 if (_json.containsKey("kind")) { | |
| 17553 kind = _json["kind"]; | |
| 17554 } | |
| 17555 if (_json.containsKey("nextPageToken")) { | |
| 17556 nextPageToken = _json["nextPageToken"]; | |
| 17557 } | |
| 17558 } | |
| 17559 | |
| 17560 core.Map toJson() { | |
| 17561 var _json = new core.Map(); | |
| 17562 if (etag != null) { | |
| 17563 _json["etag"] = etag; | |
| 17564 } | |
| 17565 if (items != null) { | |
| 17566 _json["items"] = items.map((value) => (value).toJson()).toList(); | |
| 17567 } | |
| 17568 if (kind != null) { | |
| 17569 _json["kind"] = kind; | |
| 17570 } | |
| 17571 if (nextPageToken != null) { | |
| 17572 _json["nextPageToken"] = nextPageToken; | |
| 17573 } | |
| 17574 return _json; | |
| 17575 } | |
| 17576 } | |
| 17577 | |
| 17578 /** Represents a DimensionValuesRequest. */ | |
| 17579 class DimensionValueRequest { | |
| 17580 /** The name of the dimension for which values should be requested. */ | |
| 17581 core.String dimensionName; | |
| 17582 /** | |
| 17583 * The end date of the date range for which to retrieve dimension values. A | |
| 17584 * string of the format "yyyy-MM-dd". | |
| 17585 */ | |
| 17586 core.DateTime endDate; | |
| 17587 /** The list of filters by which to filter values. The filters are ANDed. */ | |
| 17588 core.List<DimensionFilter> filters; | |
| 17589 /** | |
| 17590 * The kind of request this is, in this case | |
| 17591 * dfareporting#dimensionValueRequest. | |
| 17592 */ | |
| 17593 core.String kind; | |
| 17594 /** | |
| 17595 * The start date of the date range for which to retrieve dimension values. A | |
| 17596 * string of the format "yyyy-MM-dd". | |
| 17597 */ | |
| 17598 core.DateTime startDate; | |
| 17599 | |
| 17600 DimensionValueRequest(); | |
| 17601 | |
| 17602 DimensionValueRequest.fromJson(core.Map _json) { | |
| 17603 if (_json.containsKey("dimensionName")) { | |
| 17604 dimensionName = _json["dimensionName"]; | |
| 17605 } | |
| 17606 if (_json.containsKey("endDate")) { | |
| 17607 endDate = core.DateTime.parse(_json["endDate"]); | |
| 17608 } | |
| 17609 if (_json.containsKey("filters")) { | |
| 17610 filters = _json["filters"].map((value) => new DimensionFilter.fromJson(val
ue)).toList(); | |
| 17611 } | |
| 17612 if (_json.containsKey("kind")) { | |
| 17613 kind = _json["kind"]; | |
| 17614 } | |
| 17615 if (_json.containsKey("startDate")) { | |
| 17616 startDate = core.DateTime.parse(_json["startDate"]); | |
| 17617 } | |
| 17618 } | |
| 17619 | |
| 17620 core.Map toJson() { | |
| 17621 var _json = new core.Map(); | |
| 17622 if (dimensionName != null) { | |
| 17623 _json["dimensionName"] = dimensionName; | |
| 17624 } | |
| 17625 if (endDate != null) { | |
| 17626 _json["endDate"] = "${(endDate).year.toString().padLeft(4, '0')}-${(endDat
e).month.toString().padLeft(2, '0')}-${(endDate).day.toString().padLeft(2, '0')}
"; | |
| 17627 } | |
| 17628 if (filters != null) { | |
| 17629 _json["filters"] = filters.map((value) => (value).toJson()).toList(); | |
| 17630 } | |
| 17631 if (kind != null) { | |
| 17632 _json["kind"] = kind; | |
| 17633 } | |
| 17634 if (startDate != null) { | |
| 17635 _json["startDate"] = "${(startDate).year.toString().padLeft(4, '0')}-${(st
artDate).month.toString().padLeft(2, '0')}-${(startDate).day.toString().padLeft(
2, '0')}"; | |
| 17636 } | |
| 17637 return _json; | |
| 17638 } | |
| 17639 } | |
| 17640 | |
| 17641 /** | |
| 17642 * DirectorySites contains properties of a website from the Site Directory. | |
| 17643 * Sites need to be added to an account via the Sites resource before they can | |
| 17644 * be assigned to a placement. | |
| 17645 */ | |
| 17646 class DirectorySite { | |
| 17647 /** Whether this directory site is active. */ | |
| 17648 core.bool active; | |
| 17649 /** Directory site contacts. */ | |
| 17650 core.List<DirectorySiteContactAssignment> contactAssignments; | |
| 17651 /** Country ID of this directory site. */ | |
| 17652 core.String countryId; | |
| 17653 /** | |
| 17654 * Currency ID of this directory site. | |
| 17655 * Possible values are: | |
| 17656 * - "1" for USD | |
| 17657 * - "2" for GBP | |
| 17658 * - "3" for ESP | |
| 17659 * - "4" for SEK | |
| 17660 * - "5" for CAD | |
| 17661 * - "6" for JPY | |
| 17662 * - "7" for DEM | |
| 17663 * - "8" for AUD | |
| 17664 * - "9" for FRF | |
| 17665 * - "10" for ITL | |
| 17666 * - "11" for DKK | |
| 17667 * - "12" for NOK | |
| 17668 * - "13" for FIM | |
| 17669 * - "14" for ZAR | |
| 17670 * - "15" for IEP | |
| 17671 * - "16" for NLG | |
| 17672 * - "17" for EUR | |
| 17673 * - "18" for KRW | |
| 17674 * - "19" for TWD | |
| 17675 * - "20" for SGD | |
| 17676 * - "21" for CNY | |
| 17677 * - "22" for HKD | |
| 17678 * - "23" for NZD | |
| 17679 * - "24" for MYR | |
| 17680 * - "25" for BRL | |
| 17681 * - "26" for PTE | |
| 17682 * - "27" for MXP | |
| 17683 * - "28" for CLP | |
| 17684 * - "29" for TRY | |
| 17685 * - "30" for ARS | |
| 17686 * - "31" for PEN | |
| 17687 * - "32" for ILS | |
| 17688 * - "33" for CHF | |
| 17689 * - "34" for VEF | |
| 17690 * - "35" for COP | |
| 17691 * - "36" for GTQ | |
| 17692 * - "37" for PLN | |
| 17693 * - "39" for INR | |
| 17694 * - "40" for THB | |
| 17695 * - "41" for IDR | |
| 17696 * - "42" for CZK | |
| 17697 * - "43" for RON | |
| 17698 * - "44" for HUF | |
| 17699 * - "45" for RUB | |
| 17700 * - "46" for AED | |
| 17701 * - "47" for BGN | |
| 17702 * - "48" for HRK | |
| 17703 */ | |
| 17704 core.String currencyId; | |
| 17705 /** Description of this directory site. */ | |
| 17706 core.String description; | |
| 17707 /** ID of this directory site. This is a read-only, auto-generated field. */ | |
| 17708 core.String id; | |
| 17709 /** | |
| 17710 * Dimension value for the ID of this directory site. This is a read-only, | |
| 17711 * auto-generated field. | |
| 17712 */ | |
| 17713 DimensionValue idDimensionValue; | |
| 17714 /** | |
| 17715 * Tag types for regular placements. | |
| 17716 * | |
| 17717 * Acceptable values are: | |
| 17718 * - "STANDARD" | |
| 17719 * - "IFRAME_JAVASCRIPT_INPAGE" | |
| 17720 * - "INTERNAL_REDIRECT_INPAGE" | |
| 17721 * - "JAVASCRIPT_INPAGE" | |
| 17722 */ | |
| 17723 core.List<core.String> inpageTagFormats; | |
| 17724 /** | |
| 17725 * Tag types for interstitial placements. | |
| 17726 * | |
| 17727 * Acceptable values are: | |
| 17728 * - "IFRAME_JAVASCRIPT_INTERSTITIAL" | |
| 17729 * - "INTERNAL_REDIRECT_INTERSTITIAL" | |
| 17730 * - "JAVASCRIPT_INTERSTITIAL" | |
| 17731 */ | |
| 17732 core.List<core.String> interstitialTagFormats; | |
| 17733 /** | |
| 17734 * Identifies what kind of resource this is. Value: the fixed string | |
| 17735 * "dfareporting#directorySite". | |
| 17736 */ | |
| 17737 core.String kind; | |
| 17738 /** Name of this directory site. */ | |
| 17739 core.String name; | |
| 17740 /** Parent directory site ID. */ | |
| 17741 core.String parentId; | |
| 17742 /** Directory site settings. */ | |
| 17743 DirectorySiteSettings settings; | |
| 17744 /** URL of this directory site. */ | |
| 17745 core.String url; | |
| 17746 | |
| 17747 DirectorySite(); | |
| 17748 | |
| 17749 DirectorySite.fromJson(core.Map _json) { | |
| 17750 if (_json.containsKey("active")) { | |
| 17751 active = _json["active"]; | |
| 17752 } | |
| 17753 if (_json.containsKey("contactAssignments")) { | |
| 17754 contactAssignments = _json["contactAssignments"].map((value) => new Direct
orySiteContactAssignment.fromJson(value)).toList(); | |
| 17755 } | |
| 17756 if (_json.containsKey("countryId")) { | |
| 17757 countryId = _json["countryId"]; | |
| 17758 } | |
| 17759 if (_json.containsKey("currencyId")) { | |
| 17760 currencyId = _json["currencyId"]; | |
| 17761 } | |
| 17762 if (_json.containsKey("description")) { | |
| 17763 description = _json["description"]; | |
| 17764 } | |
| 17765 if (_json.containsKey("id")) { | |
| 17766 id = _json["id"]; | |
| 17767 } | |
| 17768 if (_json.containsKey("idDimensionValue")) { | |
| 17769 idDimensionValue = new DimensionValue.fromJson(_json["idDimensionValue"]); | |
| 17770 } | |
| 17771 if (_json.containsKey("inpageTagFormats")) { | |
| 17772 inpageTagFormats = _json["inpageTagFormats"]; | |
| 17773 } | |
| 17774 if (_json.containsKey("interstitialTagFormats")) { | |
| 17775 interstitialTagFormats = _json["interstitialTagFormats"]; | |
| 17776 } | |
| 17777 if (_json.containsKey("kind")) { | |
| 17778 kind = _json["kind"]; | |
| 17779 } | |
| 17780 if (_json.containsKey("name")) { | |
| 17781 name = _json["name"]; | |
| 17782 } | |
| 17783 if (_json.containsKey("parentId")) { | |
| 17784 parentId = _json["parentId"]; | |
| 17785 } | |
| 17786 if (_json.containsKey("settings")) { | |
| 17787 settings = new DirectorySiteSettings.fromJson(_json["settings"]); | |
| 17788 } | |
| 17789 if (_json.containsKey("url")) { | |
| 17790 url = _json["url"]; | |
| 17791 } | |
| 17792 } | |
| 17793 | |
| 17794 core.Map toJson() { | |
| 17795 var _json = new core.Map(); | |
| 17796 if (active != null) { | |
| 17797 _json["active"] = active; | |
| 17798 } | |
| 17799 if (contactAssignments != null) { | |
| 17800 _json["contactAssignments"] = contactAssignments.map((value) => (value).to
Json()).toList(); | |
| 17801 } | |
| 17802 if (countryId != null) { | |
| 17803 _json["countryId"] = countryId; | |
| 17804 } | |
| 17805 if (currencyId != null) { | |
| 17806 _json["currencyId"] = currencyId; | |
| 17807 } | |
| 17808 if (description != null) { | |
| 17809 _json["description"] = description; | |
| 17810 } | |
| 17811 if (id != null) { | |
| 17812 _json["id"] = id; | |
| 17813 } | |
| 17814 if (idDimensionValue != null) { | |
| 17815 _json["idDimensionValue"] = (idDimensionValue).toJson(); | |
| 17816 } | |
| 17817 if (inpageTagFormats != null) { | |
| 17818 _json["inpageTagFormats"] = inpageTagFormats; | |
| 17819 } | |
| 17820 if (interstitialTagFormats != null) { | |
| 17821 _json["interstitialTagFormats"] = interstitialTagFormats; | |
| 17822 } | |
| 17823 if (kind != null) { | |
| 17824 _json["kind"] = kind; | |
| 17825 } | |
| 17826 if (name != null) { | |
| 17827 _json["name"] = name; | |
| 17828 } | |
| 17829 if (parentId != null) { | |
| 17830 _json["parentId"] = parentId; | |
| 17831 } | |
| 17832 if (settings != null) { | |
| 17833 _json["settings"] = (settings).toJson(); | |
| 17834 } | |
| 17835 if (url != null) { | |
| 17836 _json["url"] = url; | |
| 17837 } | |
| 17838 return _json; | |
| 17839 } | |
| 17840 } | |
| 17841 | |
| 17842 /** Contains properties of a Site Directory contact. */ | |
| 17843 class DirectorySiteContact { | |
| 17844 /** Address of this directory site contact. */ | |
| 17845 core.String address; | |
| 17846 /** Email address of this directory site contact. */ | |
| 17847 core.String email; | |
| 17848 /** First name of this directory site contact. */ | |
| 17849 core.String firstName; | |
| 17850 /** | |
| 17851 * ID of this directory site contact. This is a read-only, auto-generated | |
| 17852 * field. | |
| 17853 */ | |
| 17854 core.String id; | |
| 17855 /** | |
| 17856 * Identifies what kind of resource this is. Value: the fixed string | |
| 17857 * "dfareporting#directorySiteContact". | |
| 17858 */ | |
| 17859 core.String kind; | |
| 17860 /** Last name of this directory site contact. */ | |
| 17861 core.String lastName; | |
| 17862 /** Phone number of this directory site contact. */ | |
| 17863 core.String phone; | |
| 17864 /** | |
| 17865 * Directory site contact role. | |
| 17866 * Possible string values are: | |
| 17867 * - "ADMIN" | |
| 17868 * - "EDIT" | |
| 17869 * - "VIEW" | |
| 17870 */ | |
| 17871 core.String role; | |
| 17872 /** Title or designation of this directory site contact. */ | |
| 17873 core.String title; | |
| 17874 /** | |
| 17875 * Directory site contact type. | |
| 17876 * Possible string values are: | |
| 17877 * - "BILLING" | |
| 17878 * - "OTHER" | |
| 17879 * - "SALES" | |
| 17880 * - "TECHNICAL" | |
| 17881 */ | |
| 17882 core.String type; | |
| 17883 | |
| 17884 DirectorySiteContact(); | |
| 17885 | |
| 17886 DirectorySiteContact.fromJson(core.Map _json) { | |
| 17887 if (_json.containsKey("address")) { | |
| 17888 address = _json["address"]; | |
| 17889 } | |
| 17890 if (_json.containsKey("email")) { | |
| 17891 email = _json["email"]; | |
| 17892 } | |
| 17893 if (_json.containsKey("firstName")) { | |
| 17894 firstName = _json["firstName"]; | |
| 17895 } | |
| 17896 if (_json.containsKey("id")) { | |
| 17897 id = _json["id"]; | |
| 17898 } | |
| 17899 if (_json.containsKey("kind")) { | |
| 17900 kind = _json["kind"]; | |
| 17901 } | |
| 17902 if (_json.containsKey("lastName")) { | |
| 17903 lastName = _json["lastName"]; | |
| 17904 } | |
| 17905 if (_json.containsKey("phone")) { | |
| 17906 phone = _json["phone"]; | |
| 17907 } | |
| 17908 if (_json.containsKey("role")) { | |
| 17909 role = _json["role"]; | |
| 17910 } | |
| 17911 if (_json.containsKey("title")) { | |
| 17912 title = _json["title"]; | |
| 17913 } | |
| 17914 if (_json.containsKey("type")) { | |
| 17915 type = _json["type"]; | |
| 17916 } | |
| 17917 } | |
| 17918 | |
| 17919 core.Map toJson() { | |
| 17920 var _json = new core.Map(); | |
| 17921 if (address != null) { | |
| 17922 _json["address"] = address; | |
| 17923 } | |
| 17924 if (email != null) { | |
| 17925 _json["email"] = email; | |
| 17926 } | |
| 17927 if (firstName != null) { | |
| 17928 _json["firstName"] = firstName; | |
| 17929 } | |
| 17930 if (id != null) { | |
| 17931 _json["id"] = id; | |
| 17932 } | |
| 17933 if (kind != null) { | |
| 17934 _json["kind"] = kind; | |
| 17935 } | |
| 17936 if (lastName != null) { | |
| 17937 _json["lastName"] = lastName; | |
| 17938 } | |
| 17939 if (phone != null) { | |
| 17940 _json["phone"] = phone; | |
| 17941 } | |
| 17942 if (role != null) { | |
| 17943 _json["role"] = role; | |
| 17944 } | |
| 17945 if (title != null) { | |
| 17946 _json["title"] = title; | |
| 17947 } | |
| 17948 if (type != null) { | |
| 17949 _json["type"] = type; | |
| 17950 } | |
| 17951 return _json; | |
| 17952 } | |
| 17953 } | |
| 17954 | |
| 17955 /** Directory Site Contact Assignment */ | |
| 17956 class DirectorySiteContactAssignment { | |
| 17957 /** | |
| 17958 * ID of this directory site contact. This is a read-only, auto-generated | |
| 17959 * field. | |
| 17960 */ | |
| 17961 core.String contactId; | |
| 17962 /** | |
| 17963 * Visibility of this directory site contact assignment. When set to PUBLIC | |
| 17964 * this contact assignment is visible to all account and agency users; when | |
| 17965 * set to PRIVATE it is visible only to the site. | |
| 17966 * Possible string values are: | |
| 17967 * - "PRIVATE" | |
| 17968 * - "PUBLIC" | |
| 17969 */ | |
| 17970 core.String visibility; | |
| 17971 | |
| 17972 DirectorySiteContactAssignment(); | |
| 17973 | |
| 17974 DirectorySiteContactAssignment.fromJson(core.Map _json) { | |
| 17975 if (_json.containsKey("contactId")) { | |
| 17976 contactId = _json["contactId"]; | |
| 17977 } | |
| 17978 if (_json.containsKey("visibility")) { | |
| 17979 visibility = _json["visibility"]; | |
| 17980 } | |
| 17981 } | |
| 17982 | |
| 17983 core.Map toJson() { | |
| 17984 var _json = new core.Map(); | |
| 17985 if (contactId != null) { | |
| 17986 _json["contactId"] = contactId; | |
| 17987 } | |
| 17988 if (visibility != null) { | |
| 17989 _json["visibility"] = visibility; | |
| 17990 } | |
| 17991 return _json; | |
| 17992 } | |
| 17993 } | |
| 17994 | |
| 17995 /** Directory Site Contact List Response */ | |
| 17996 class DirectorySiteContactsListResponse { | |
| 17997 /** Directory site contact collection */ | |
| 17998 core.List<DirectorySiteContact> directorySiteContacts; | |
| 17999 /** | |
| 18000 * Identifies what kind of resource this is. Value: the fixed string | |
| 18001 * "dfareporting#directorySiteContactsListResponse". | |
| 18002 */ | |
| 18003 core.String kind; | |
| 18004 /** Pagination token to be used for the next list operation. */ | |
| 18005 core.String nextPageToken; | |
| 18006 | |
| 18007 DirectorySiteContactsListResponse(); | |
| 18008 | |
| 18009 DirectorySiteContactsListResponse.fromJson(core.Map _json) { | |
| 18010 if (_json.containsKey("directorySiteContacts")) { | |
| 18011 directorySiteContacts = _json["directorySiteContacts"].map((value) => new
DirectorySiteContact.fromJson(value)).toList(); | |
| 18012 } | |
| 18013 if (_json.containsKey("kind")) { | |
| 18014 kind = _json["kind"]; | |
| 18015 } | |
| 18016 if (_json.containsKey("nextPageToken")) { | |
| 18017 nextPageToken = _json["nextPageToken"]; | |
| 18018 } | |
| 18019 } | |
| 18020 | |
| 18021 core.Map toJson() { | |
| 18022 var _json = new core.Map(); | |
| 18023 if (directorySiteContacts != null) { | |
| 18024 _json["directorySiteContacts"] = directorySiteContacts.map((value) => (val
ue).toJson()).toList(); | |
| 18025 } | |
| 18026 if (kind != null) { | |
| 18027 _json["kind"] = kind; | |
| 18028 } | |
| 18029 if (nextPageToken != null) { | |
| 18030 _json["nextPageToken"] = nextPageToken; | |
| 18031 } | |
| 18032 return _json; | |
| 18033 } | |
| 18034 } | |
| 18035 | |
| 18036 /** Directory Site Settings */ | |
| 18037 class DirectorySiteSettings { | |
| 18038 /** Whether this directory site has disabled active view creatives. */ | |
| 18039 core.bool activeViewOptOut; | |
| 18040 /** Directory site DFP settings. */ | |
| 18041 DfpSettings dfpSettings; | |
| 18042 /** Whether this site accepts in-stream video ads. */ | |
| 18043 core.bool instreamVideoPlacementAccepted; | |
| 18044 /** Whether this site accepts interstitial ads. */ | |
| 18045 core.bool interstitialPlacementAccepted; | |
| 18046 /** Whether this directory site has disabled Nielsen OCR reach ratings. */ | |
| 18047 core.bool nielsenOcrOptOut; | |
| 18048 /** | |
| 18049 * Whether this directory site has disabled generation of Verification ins | |
| 18050 * tags. | |
| 18051 */ | |
| 18052 core.bool verificationTagOptOut; | |
| 18053 /** | |
| 18054 * Whether this directory site has disabled active view for in-stream video | |
| 18055 * creatives. | |
| 18056 */ | |
| 18057 core.bool videoActiveViewOptOut; | |
| 18058 | |
| 18059 DirectorySiteSettings(); | |
| 18060 | |
| 18061 DirectorySiteSettings.fromJson(core.Map _json) { | |
| 18062 if (_json.containsKey("activeViewOptOut")) { | |
| 18063 activeViewOptOut = _json["activeViewOptOut"]; | |
| 18064 } | |
| 18065 if (_json.containsKey("dfp_settings")) { | |
| 18066 dfpSettings = new DfpSettings.fromJson(_json["dfp_settings"]); | |
| 18067 } | |
| 18068 if (_json.containsKey("instream_video_placement_accepted")) { | |
| 18069 instreamVideoPlacementAccepted = _json["instream_video_placement_accepted"
]; | |
| 18070 } | |
| 18071 if (_json.containsKey("interstitialPlacementAccepted")) { | |
| 18072 interstitialPlacementAccepted = _json["interstitialPlacementAccepted"]; | |
| 18073 } | |
| 18074 if (_json.containsKey("nielsenOcrOptOut")) { | |
| 18075 nielsenOcrOptOut = _json["nielsenOcrOptOut"]; | |
| 18076 } | |
| 18077 if (_json.containsKey("verificationTagOptOut")) { | |
| 18078 verificationTagOptOut = _json["verificationTagOptOut"]; | |
| 18079 } | |
| 18080 if (_json.containsKey("videoActiveViewOptOut")) { | |
| 18081 videoActiveViewOptOut = _json["videoActiveViewOptOut"]; | |
| 18082 } | |
| 18083 } | |
| 18084 | |
| 18085 core.Map toJson() { | |
| 18086 var _json = new core.Map(); | |
| 18087 if (activeViewOptOut != null) { | |
| 18088 _json["activeViewOptOut"] = activeViewOptOut; | |
| 18089 } | |
| 18090 if (dfpSettings != null) { | |
| 18091 _json["dfp_settings"] = (dfpSettings).toJson(); | |
| 18092 } | |
| 18093 if (instreamVideoPlacementAccepted != null) { | |
| 18094 _json["instream_video_placement_accepted"] = instreamVideoPlacementAccepte
d; | |
| 18095 } | |
| 18096 if (interstitialPlacementAccepted != null) { | |
| 18097 _json["interstitialPlacementAccepted"] = interstitialPlacementAccepted; | |
| 18098 } | |
| 18099 if (nielsenOcrOptOut != null) { | |
| 18100 _json["nielsenOcrOptOut"] = nielsenOcrOptOut; | |
| 18101 } | |
| 18102 if (verificationTagOptOut != null) { | |
| 18103 _json["verificationTagOptOut"] = verificationTagOptOut; | |
| 18104 } | |
| 18105 if (videoActiveViewOptOut != null) { | |
| 18106 _json["videoActiveViewOptOut"] = videoActiveViewOptOut; | |
| 18107 } | |
| 18108 return _json; | |
| 18109 } | |
| 18110 } | |
| 18111 | |
| 18112 /** Directory Site List Response */ | |
| 18113 class DirectorySitesListResponse { | |
| 18114 /** Directory site collection. */ | |
| 18115 core.List<DirectorySite> directorySites; | |
| 18116 /** | |
| 18117 * Identifies what kind of resource this is. Value: the fixed string | |
| 18118 * "dfareporting#directorySitesListResponse". | |
| 18119 */ | |
| 18120 core.String kind; | |
| 18121 /** Pagination token to be used for the next list operation. */ | |
| 18122 core.String nextPageToken; | |
| 18123 | |
| 18124 DirectorySitesListResponse(); | |
| 18125 | |
| 18126 DirectorySitesListResponse.fromJson(core.Map _json) { | |
| 18127 if (_json.containsKey("directorySites")) { | |
| 18128 directorySites = _json["directorySites"].map((value) => new DirectorySite.
fromJson(value)).toList(); | |
| 18129 } | |
| 18130 if (_json.containsKey("kind")) { | |
| 18131 kind = _json["kind"]; | |
| 18132 } | |
| 18133 if (_json.containsKey("nextPageToken")) { | |
| 18134 nextPageToken = _json["nextPageToken"]; | |
| 18135 } | |
| 18136 } | |
| 18137 | |
| 18138 core.Map toJson() { | |
| 18139 var _json = new core.Map(); | |
| 18140 if (directorySites != null) { | |
| 18141 _json["directorySites"] = directorySites.map((value) => (value).toJson()).
toList(); | |
| 18142 } | |
| 18143 if (kind != null) { | |
| 18144 _json["kind"] = kind; | |
| 18145 } | |
| 18146 if (nextPageToken != null) { | |
| 18147 _json["nextPageToken"] = nextPageToken; | |
| 18148 } | |
| 18149 return _json; | |
| 18150 } | |
| 18151 } | |
| 18152 | |
| 18153 /** Contains properties of an event tag. */ | |
| 18154 class EventTag { | |
| 18155 /** | |
| 18156 * Account ID of this event tag. This is a read-only field that can be left | |
| 18157 * blank. | |
| 18158 */ | |
| 18159 core.String accountId; | |
| 18160 /** | |
| 18161 * Advertiser ID of this event tag. This field or the campaignId field is | |
| 18162 * required on insertion. | |
| 18163 */ | |
| 18164 core.String advertiserId; | |
| 18165 /** | |
| 18166 * Dimension value for the ID of the advertiser. This is a read-only, | |
| 18167 * auto-generated field. | |
| 18168 */ | |
| 18169 DimensionValue advertiserIdDimensionValue; | |
| 18170 /** | |
| 18171 * Campaign ID of this event tag. This field or the advertiserId field is | |
| 18172 * required on insertion. | |
| 18173 */ | |
| 18174 core.String campaignId; | |
| 18175 /** | |
| 18176 * Dimension value for the ID of the campaign. This is a read-only, | |
| 18177 * auto-generated field. | |
| 18178 */ | |
| 18179 DimensionValue campaignIdDimensionValue; | |
| 18180 /** | |
| 18181 * Whether this event tag should be automatically enabled for all of the | |
| 18182 * advertiser's campaigns and ads. | |
| 18183 */ | |
| 18184 core.bool enabledByDefault; | |
| 18185 /** | |
| 18186 * Whether to remove this event tag from ads that are trafficked through | |
| 18187 * DoubleClick Bid Manager to Ad Exchange. This may be useful if the event tag | |
| 18188 * uses a pixel that is unapproved for Ad Exchange bids on one or more | |
| 18189 * networks, such as the Google Display Network. | |
| 18190 */ | |
| 18191 core.bool excludeFromAdxRequests; | |
| 18192 /** ID of this event tag. This is a read-only, auto-generated field. */ | |
| 18193 core.String id; | |
| 18194 /** | |
| 18195 * Identifies what kind of resource this is. Value: the fixed string | |
| 18196 * "dfareporting#eventTag". | |
| 18197 */ | |
| 18198 core.String kind; | |
| 18199 /** | |
| 18200 * Name of this event tag. This is a required field and must be less than 256 | |
| 18201 * characters long. | |
| 18202 */ | |
| 18203 core.String name; | |
| 18204 /** | |
| 18205 * Site filter type for this event tag. If no type is specified then the event | |
| 18206 * tag will be applied to all sites. | |
| 18207 * Possible string values are: | |
| 18208 * - "BLACKLIST" | |
| 18209 * - "WHITELIST" | |
| 18210 */ | |
| 18211 core.String siteFilterType; | |
| 18212 /** | |
| 18213 * Filter list of site IDs associated with this event tag. The siteFilterType | |
| 18214 * determines whether this is a whitelist or blacklist filter. | |
| 18215 */ | |
| 18216 core.List<core.String> siteIds; | |
| 18217 /** Whether this tag is SSL-compliant or not. This is a read-only field. */ | |
| 18218 core.bool sslCompliant; | |
| 18219 /** | |
| 18220 * Status of this event tag. Must be ENABLED for this event tag to fire. This | |
| 18221 * is a required field. | |
| 18222 * Possible string values are: | |
| 18223 * - "DISABLED" | |
| 18224 * - "ENABLED" | |
| 18225 */ | |
| 18226 core.String status; | |
| 18227 /** | |
| 18228 * Subaccount ID of this event tag. This is a read-only field that can be left | |
| 18229 * blank. | |
| 18230 */ | |
| 18231 core.String subaccountId; | |
| 18232 /** | |
| 18233 * Event tag type. Can be used to specify whether to use a third-party pixel, | |
| 18234 * a third-party JavaScript URL, or a third-party click-through URL for either | |
| 18235 * impression or click tracking. This is a required field. | |
| 18236 * Possible string values are: | |
| 18237 * - "CLICK_THROUGH_EVENT_TAG" | |
| 18238 * - "IMPRESSION_IMAGE_EVENT_TAG" | |
| 18239 * - "IMPRESSION_JAVASCRIPT_EVENT_TAG" | |
| 18240 */ | |
| 18241 core.String type; | |
| 18242 /** | |
| 18243 * Payload URL for this event tag. The URL on a click-through event tag should | |
| 18244 * have a landing page URL appended to the end of it. This field is required | |
| 18245 * on insertion. | |
| 18246 */ | |
| 18247 core.String url; | |
| 18248 /** | |
| 18249 * Number of times the landing page URL should be URL-escaped before being | |
| 18250 * appended to the click-through event tag URL. Only applies to click-through | |
| 18251 * event tags as specified by the event tag type. | |
| 18252 */ | |
| 18253 core.int urlEscapeLevels; | |
| 18254 | |
| 18255 EventTag(); | |
| 18256 | |
| 18257 EventTag.fromJson(core.Map _json) { | |
| 18258 if (_json.containsKey("accountId")) { | |
| 18259 accountId = _json["accountId"]; | |
| 18260 } | |
| 18261 if (_json.containsKey("advertiserId")) { | |
| 18262 advertiserId = _json["advertiserId"]; | |
| 18263 } | |
| 18264 if (_json.containsKey("advertiserIdDimensionValue")) { | |
| 18265 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser
IdDimensionValue"]); | |
| 18266 } | |
| 18267 if (_json.containsKey("campaignId")) { | |
| 18268 campaignId = _json["campaignId"]; | |
| 18269 } | |
| 18270 if (_json.containsKey("campaignIdDimensionValue")) { | |
| 18271 campaignIdDimensionValue = new DimensionValue.fromJson(_json["campaignIdDi
mensionValue"]); | |
| 18272 } | |
| 18273 if (_json.containsKey("enabledByDefault")) { | |
| 18274 enabledByDefault = _json["enabledByDefault"]; | |
| 18275 } | |
| 18276 if (_json.containsKey("excludeFromAdxRequests")) { | |
| 18277 excludeFromAdxRequests = _json["excludeFromAdxRequests"]; | |
| 18278 } | |
| 18279 if (_json.containsKey("id")) { | |
| 18280 id = _json["id"]; | |
| 18281 } | |
| 18282 if (_json.containsKey("kind")) { | |
| 18283 kind = _json["kind"]; | |
| 18284 } | |
| 18285 if (_json.containsKey("name")) { | |
| 18286 name = _json["name"]; | |
| 18287 } | |
| 18288 if (_json.containsKey("siteFilterType")) { | |
| 18289 siteFilterType = _json["siteFilterType"]; | |
| 18290 } | |
| 18291 if (_json.containsKey("siteIds")) { | |
| 18292 siteIds = _json["siteIds"]; | |
| 18293 } | |
| 18294 if (_json.containsKey("sslCompliant")) { | |
| 18295 sslCompliant = _json["sslCompliant"]; | |
| 18296 } | |
| 18297 if (_json.containsKey("status")) { | |
| 18298 status = _json["status"]; | |
| 18299 } | |
| 18300 if (_json.containsKey("subaccountId")) { | |
| 18301 subaccountId = _json["subaccountId"]; | |
| 18302 } | |
| 18303 if (_json.containsKey("type")) { | |
| 18304 type = _json["type"]; | |
| 18305 } | |
| 18306 if (_json.containsKey("url")) { | |
| 18307 url = _json["url"]; | |
| 18308 } | |
| 18309 if (_json.containsKey("urlEscapeLevels")) { | |
| 18310 urlEscapeLevels = _json["urlEscapeLevels"]; | |
| 18311 } | |
| 18312 } | |
| 18313 | |
| 18314 core.Map toJson() { | |
| 18315 var _json = new core.Map(); | |
| 18316 if (accountId != null) { | |
| 18317 _json["accountId"] = accountId; | |
| 18318 } | |
| 18319 if (advertiserId != null) { | |
| 18320 _json["advertiserId"] = advertiserId; | |
| 18321 } | |
| 18322 if (advertiserIdDimensionValue != null) { | |
| 18323 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson(
); | |
| 18324 } | |
| 18325 if (campaignId != null) { | |
| 18326 _json["campaignId"] = campaignId; | |
| 18327 } | |
| 18328 if (campaignIdDimensionValue != null) { | |
| 18329 _json["campaignIdDimensionValue"] = (campaignIdDimensionValue).toJson(); | |
| 18330 } | |
| 18331 if (enabledByDefault != null) { | |
| 18332 _json["enabledByDefault"] = enabledByDefault; | |
| 18333 } | |
| 18334 if (excludeFromAdxRequests != null) { | |
| 18335 _json["excludeFromAdxRequests"] = excludeFromAdxRequests; | |
| 18336 } | |
| 18337 if (id != null) { | |
| 18338 _json["id"] = id; | |
| 18339 } | |
| 18340 if (kind != null) { | |
| 18341 _json["kind"] = kind; | |
| 18342 } | |
| 18343 if (name != null) { | |
| 18344 _json["name"] = name; | |
| 18345 } | |
| 18346 if (siteFilterType != null) { | |
| 18347 _json["siteFilterType"] = siteFilterType; | |
| 18348 } | |
| 18349 if (siteIds != null) { | |
| 18350 _json["siteIds"] = siteIds; | |
| 18351 } | |
| 18352 if (sslCompliant != null) { | |
| 18353 _json["sslCompliant"] = sslCompliant; | |
| 18354 } | |
| 18355 if (status != null) { | |
| 18356 _json["status"] = status; | |
| 18357 } | |
| 18358 if (subaccountId != null) { | |
| 18359 _json["subaccountId"] = subaccountId; | |
| 18360 } | |
| 18361 if (type != null) { | |
| 18362 _json["type"] = type; | |
| 18363 } | |
| 18364 if (url != null) { | |
| 18365 _json["url"] = url; | |
| 18366 } | |
| 18367 if (urlEscapeLevels != null) { | |
| 18368 _json["urlEscapeLevels"] = urlEscapeLevels; | |
| 18369 } | |
| 18370 return _json; | |
| 18371 } | |
| 18372 } | |
| 18373 | |
| 18374 /** Event tag override information. */ | |
| 18375 class EventTagOverride { | |
| 18376 /** Whether this override is enabled. */ | |
| 18377 core.bool enabled; | |
| 18378 /** | |
| 18379 * ID of this event tag override. This is a read-only, auto-generated field. | |
| 18380 */ | |
| 18381 core.String id; | |
| 18382 | |
| 18383 EventTagOverride(); | |
| 18384 | |
| 18385 EventTagOverride.fromJson(core.Map _json) { | |
| 18386 if (_json.containsKey("enabled")) { | |
| 18387 enabled = _json["enabled"]; | |
| 18388 } | |
| 18389 if (_json.containsKey("id")) { | |
| 18390 id = _json["id"]; | |
| 18391 } | |
| 18392 } | |
| 18393 | |
| 18394 core.Map toJson() { | |
| 18395 var _json = new core.Map(); | |
| 18396 if (enabled != null) { | |
| 18397 _json["enabled"] = enabled; | |
| 18398 } | |
| 18399 if (id != null) { | |
| 18400 _json["id"] = id; | |
| 18401 } | |
| 18402 return _json; | |
| 18403 } | |
| 18404 } | |
| 18405 | |
| 18406 /** Event Tag List Response */ | |
| 18407 class EventTagsListResponse { | |
| 18408 /** Event tag collection. */ | |
| 18409 core.List<EventTag> eventTags; | |
| 18410 /** | |
| 18411 * Identifies what kind of resource this is. Value: the fixed string | |
| 18412 * "dfareporting#eventTagsListResponse". | |
| 18413 */ | |
| 18414 core.String kind; | |
| 18415 | |
| 18416 EventTagsListResponse(); | |
| 18417 | |
| 18418 EventTagsListResponse.fromJson(core.Map _json) { | |
| 18419 if (_json.containsKey("eventTags")) { | |
| 18420 eventTags = _json["eventTags"].map((value) => new EventTag.fromJson(value)
).toList(); | |
| 18421 } | |
| 18422 if (_json.containsKey("kind")) { | |
| 18423 kind = _json["kind"]; | |
| 18424 } | |
| 18425 } | |
| 18426 | |
| 18427 core.Map toJson() { | |
| 18428 var _json = new core.Map(); | |
| 18429 if (eventTags != null) { | |
| 18430 _json["eventTags"] = eventTags.map((value) => (value).toJson()).toList(); | |
| 18431 } | |
| 18432 if (kind != null) { | |
| 18433 _json["kind"] = kind; | |
| 18434 } | |
| 18435 return _json; | |
| 18436 } | |
| 18437 } | |
| 18438 | |
| 18439 /** The URLs where the completed report file can be downloaded. */ | |
| 18440 class FileUrls { | |
| 18441 /** The URL for downloading the report data through the API. */ | |
| 18442 core.String apiUrl; | |
| 18443 /** The URL for downloading the report data through a browser. */ | |
| 18444 core.String browserUrl; | |
| 18445 | |
| 18446 FileUrls(); | |
| 18447 | |
| 18448 FileUrls.fromJson(core.Map _json) { | |
| 18449 if (_json.containsKey("apiUrl")) { | |
| 18450 apiUrl = _json["apiUrl"]; | |
| 18451 } | |
| 18452 if (_json.containsKey("browserUrl")) { | |
| 18453 browserUrl = _json["browserUrl"]; | |
| 18454 } | |
| 18455 } | |
| 18456 | |
| 18457 core.Map toJson() { | |
| 18458 var _json = new core.Map(); | |
| 18459 if (apiUrl != null) { | |
| 18460 _json["apiUrl"] = apiUrl; | |
| 18461 } | |
| 18462 if (browserUrl != null) { | |
| 18463 _json["browserUrl"] = browserUrl; | |
| 18464 } | |
| 18465 return _json; | |
| 18466 } | |
| 18467 } | |
| 18468 | |
| 18469 /** | |
| 18470 * Represents a File resource. A file contains the metadata for a report run. It | |
| 18471 * shows the status of the run and holds the URLs to the generated report data | |
| 18472 * if the run is finished and the status is "REPORT_AVAILABLE". | |
| 18473 */ | |
| 18474 class File { | |
| 18475 /** | |
| 18476 * The date range for which the file has report data. The date range will | |
| 18477 * always be the absolute date range for which the report is run. | |
| 18478 */ | |
| 18479 DateRange dateRange; | |
| 18480 /** The eTag of this response for caching purposes. */ | |
| 18481 core.String etag; | |
| 18482 /** The filename of the file. */ | |
| 18483 core.String fileName; | |
| 18484 /** | |
| 18485 * The output format of the report. Only available once the file is available. | |
| 18486 * Possible string values are: | |
| 18487 * - "CSV" | |
| 18488 * - "EXCEL" | |
| 18489 */ | |
| 18490 core.String format; | |
| 18491 /** The unique ID of this report file. */ | |
| 18492 core.String id; | |
| 18493 /** The kind of resource this is, in this case dfareporting#file. */ | |
| 18494 core.String kind; | |
| 18495 /** | |
| 18496 * The timestamp in milliseconds since epoch when this file was last modified. | |
| 18497 */ | |
| 18498 core.String lastModifiedTime; | |
| 18499 /** The ID of the report this file was generated from. */ | |
| 18500 core.String reportId; | |
| 18501 /** | |
| 18502 * The status of the report file. | |
| 18503 * Possible string values are: | |
| 18504 * - "CANCELLED" | |
| 18505 * - "FAILED" | |
| 18506 * - "PROCESSING" | |
| 18507 * - "REPORT_AVAILABLE" | |
| 18508 */ | |
| 18509 core.String status; | |
| 18510 /** The URLs where the completed report file can be downloaded. */ | |
| 18511 FileUrls urls; | |
| 18512 | |
| 18513 File(); | |
| 18514 | |
| 18515 File.fromJson(core.Map _json) { | |
| 18516 if (_json.containsKey("dateRange")) { | |
| 18517 dateRange = new DateRange.fromJson(_json["dateRange"]); | |
| 18518 } | |
| 18519 if (_json.containsKey("etag")) { | |
| 18520 etag = _json["etag"]; | |
| 18521 } | |
| 18522 if (_json.containsKey("fileName")) { | |
| 18523 fileName = _json["fileName"]; | |
| 18524 } | |
| 18525 if (_json.containsKey("format")) { | |
| 18526 format = _json["format"]; | |
| 18527 } | |
| 18528 if (_json.containsKey("id")) { | |
| 18529 id = _json["id"]; | |
| 18530 } | |
| 18531 if (_json.containsKey("kind")) { | |
| 18532 kind = _json["kind"]; | |
| 18533 } | |
| 18534 if (_json.containsKey("lastModifiedTime")) { | |
| 18535 lastModifiedTime = _json["lastModifiedTime"]; | |
| 18536 } | |
| 18537 if (_json.containsKey("reportId")) { | |
| 18538 reportId = _json["reportId"]; | |
| 18539 } | |
| 18540 if (_json.containsKey("status")) { | |
| 18541 status = _json["status"]; | |
| 18542 } | |
| 18543 if (_json.containsKey("urls")) { | |
| 18544 urls = new FileUrls.fromJson(_json["urls"]); | |
| 18545 } | |
| 18546 } | |
| 18547 | |
| 18548 core.Map toJson() { | |
| 18549 var _json = new core.Map(); | |
| 18550 if (dateRange != null) { | |
| 18551 _json["dateRange"] = (dateRange).toJson(); | |
| 18552 } | |
| 18553 if (etag != null) { | |
| 18554 _json["etag"] = etag; | |
| 18555 } | |
| 18556 if (fileName != null) { | |
| 18557 _json["fileName"] = fileName; | |
| 18558 } | |
| 18559 if (format != null) { | |
| 18560 _json["format"] = format; | |
| 18561 } | |
| 18562 if (id != null) { | |
| 18563 _json["id"] = id; | |
| 18564 } | |
| 18565 if (kind != null) { | |
| 18566 _json["kind"] = kind; | |
| 18567 } | |
| 18568 if (lastModifiedTime != null) { | |
| 18569 _json["lastModifiedTime"] = lastModifiedTime; | |
| 18570 } | |
| 18571 if (reportId != null) { | |
| 18572 _json["reportId"] = reportId; | |
| 18573 } | |
| 18574 if (status != null) { | |
| 18575 _json["status"] = status; | |
| 18576 } | |
| 18577 if (urls != null) { | |
| 18578 _json["urls"] = (urls).toJson(); | |
| 18579 } | |
| 18580 return _json; | |
| 18581 } | |
| 18582 } | |
| 18583 | |
| 18584 /** Represents the list of File resources. */ | |
| 18585 class FileList { | |
| 18586 /** The eTag of this response for caching purposes. */ | |
| 18587 core.String etag; | |
| 18588 /** The files returned in this response. */ | |
| 18589 core.List<File> items; | |
| 18590 /** The kind of list this is, in this case dfareporting#fileList. */ | |
| 18591 core.String kind; | |
| 18592 /** | |
| 18593 * Continuation token used to page through files. To retrieve the next page of | |
| 18594 * results, set the next request's "pageToken" to the value of this field. The | |
| 18595 * page token is only valid for a limited amount of time and should not be | |
| 18596 * persisted. | |
| 18597 */ | |
| 18598 core.String nextPageToken; | |
| 18599 | |
| 18600 FileList(); | |
| 18601 | |
| 18602 FileList.fromJson(core.Map _json) { | |
| 18603 if (_json.containsKey("etag")) { | |
| 18604 etag = _json["etag"]; | |
| 18605 } | |
| 18606 if (_json.containsKey("items")) { | |
| 18607 items = _json["items"].map((value) => new File.fromJson(value)).toList(); | |
| 18608 } | |
| 18609 if (_json.containsKey("kind")) { | |
| 18610 kind = _json["kind"]; | |
| 18611 } | |
| 18612 if (_json.containsKey("nextPageToken")) { | |
| 18613 nextPageToken = _json["nextPageToken"]; | |
| 18614 } | |
| 18615 } | |
| 18616 | |
| 18617 core.Map toJson() { | |
| 18618 var _json = new core.Map(); | |
| 18619 if (etag != null) { | |
| 18620 _json["etag"] = etag; | |
| 18621 } | |
| 18622 if (items != null) { | |
| 18623 _json["items"] = items.map((value) => (value).toJson()).toList(); | |
| 18624 } | |
| 18625 if (kind != null) { | |
| 18626 _json["kind"] = kind; | |
| 18627 } | |
| 18628 if (nextPageToken != null) { | |
| 18629 _json["nextPageToken"] = nextPageToken; | |
| 18630 } | |
| 18631 return _json; | |
| 18632 } | |
| 18633 } | |
| 18634 | |
| 18635 /** Flight */ | |
| 18636 class Flight { | |
| 18637 /** Inventory item flight end date. */ | |
| 18638 core.DateTime endDate; | |
| 18639 /** Rate or cost of this flight. */ | |
| 18640 core.String rateOrCost; | |
| 18641 /** Inventory item flight start date. */ | |
| 18642 core.DateTime startDate; | |
| 18643 /** Units of this flight. */ | |
| 18644 core.String units; | |
| 18645 | |
| 18646 Flight(); | |
| 18647 | |
| 18648 Flight.fromJson(core.Map _json) { | |
| 18649 if (_json.containsKey("endDate")) { | |
| 18650 endDate = core.DateTime.parse(_json["endDate"]); | |
| 18651 } | |
| 18652 if (_json.containsKey("rateOrCost")) { | |
| 18653 rateOrCost = _json["rateOrCost"]; | |
| 18654 } | |
| 18655 if (_json.containsKey("startDate")) { | |
| 18656 startDate = core.DateTime.parse(_json["startDate"]); | |
| 18657 } | |
| 18658 if (_json.containsKey("units")) { | |
| 18659 units = _json["units"]; | |
| 18660 } | |
| 18661 } | |
| 18662 | |
| 18663 core.Map toJson() { | |
| 18664 var _json = new core.Map(); | |
| 18665 if (endDate != null) { | |
| 18666 _json["endDate"] = "${(endDate).year.toString().padLeft(4, '0')}-${(endDat
e).month.toString().padLeft(2, '0')}-${(endDate).day.toString().padLeft(2, '0')}
"; | |
| 18667 } | |
| 18668 if (rateOrCost != null) { | |
| 18669 _json["rateOrCost"] = rateOrCost; | |
| 18670 } | |
| 18671 if (startDate != null) { | |
| 18672 _json["startDate"] = "${(startDate).year.toString().padLeft(4, '0')}-${(st
artDate).month.toString().padLeft(2, '0')}-${(startDate).day.toString().padLeft(
2, '0')}"; | |
| 18673 } | |
| 18674 if (units != null) { | |
| 18675 _json["units"] = units; | |
| 18676 } | |
| 18677 return _json; | |
| 18678 } | |
| 18679 } | |
| 18680 | |
| 18681 /** Floodlight Activity GenerateTag Response */ | |
| 18682 class FloodlightActivitiesGenerateTagResponse { | |
| 18683 /** Generated tag for this floodlight activity. */ | |
| 18684 core.String floodlightActivityTag; | |
| 18685 /** | |
| 18686 * Identifies what kind of resource this is. Value: the fixed string | |
| 18687 * "dfareporting#floodlightActivitiesGenerateTagResponse". | |
| 18688 */ | |
| 18689 core.String kind; | |
| 18690 | |
| 18691 FloodlightActivitiesGenerateTagResponse(); | |
| 18692 | |
| 18693 FloodlightActivitiesGenerateTagResponse.fromJson(core.Map _json) { | |
| 18694 if (_json.containsKey("floodlightActivityTag")) { | |
| 18695 floodlightActivityTag = _json["floodlightActivityTag"]; | |
| 18696 } | |
| 18697 if (_json.containsKey("kind")) { | |
| 18698 kind = _json["kind"]; | |
| 18699 } | |
| 18700 } | |
| 18701 | |
| 18702 core.Map toJson() { | |
| 18703 var _json = new core.Map(); | |
| 18704 if (floodlightActivityTag != null) { | |
| 18705 _json["floodlightActivityTag"] = floodlightActivityTag; | |
| 18706 } | |
| 18707 if (kind != null) { | |
| 18708 _json["kind"] = kind; | |
| 18709 } | |
| 18710 return _json; | |
| 18711 } | |
| 18712 } | |
| 18713 | |
| 18714 /** Floodlight Activity List Response */ | |
| 18715 class FloodlightActivitiesListResponse { | |
| 18716 /** Floodlight activity collection. */ | |
| 18717 core.List<FloodlightActivity> floodlightActivities; | |
| 18718 /** | |
| 18719 * Identifies what kind of resource this is. Value: the fixed string | |
| 18720 * "dfareporting#floodlightActivitiesListResponse". | |
| 18721 */ | |
| 18722 core.String kind; | |
| 18723 /** Pagination token to be used for the next list operation. */ | |
| 18724 core.String nextPageToken; | |
| 18725 | |
| 18726 FloodlightActivitiesListResponse(); | |
| 18727 | |
| 18728 FloodlightActivitiesListResponse.fromJson(core.Map _json) { | |
| 18729 if (_json.containsKey("floodlightActivities")) { | |
| 18730 floodlightActivities = _json["floodlightActivities"].map((value) => new Fl
oodlightActivity.fromJson(value)).toList(); | |
| 18731 } | |
| 18732 if (_json.containsKey("kind")) { | |
| 18733 kind = _json["kind"]; | |
| 18734 } | |
| 18735 if (_json.containsKey("nextPageToken")) { | |
| 18736 nextPageToken = _json["nextPageToken"]; | |
| 18737 } | |
| 18738 } | |
| 18739 | |
| 18740 core.Map toJson() { | |
| 18741 var _json = new core.Map(); | |
| 18742 if (floodlightActivities != null) { | |
| 18743 _json["floodlightActivities"] = floodlightActivities.map((value) => (value
).toJson()).toList(); | |
| 18744 } | |
| 18745 if (kind != null) { | |
| 18746 _json["kind"] = kind; | |
| 18747 } | |
| 18748 if (nextPageToken != null) { | |
| 18749 _json["nextPageToken"] = nextPageToken; | |
| 18750 } | |
| 18751 return _json; | |
| 18752 } | |
| 18753 } | |
| 18754 | |
| 18755 /** Contains properties of a Floodlight activity. */ | |
| 18756 class FloodlightActivity { | |
| 18757 /** | |
| 18758 * Account ID of this floodlight activity. This is a read-only field that can | |
| 18759 * be left blank. | |
| 18760 */ | |
| 18761 core.String accountId; | |
| 18762 /** | |
| 18763 * Advertiser ID of this floodlight activity. If this field is left blank, the | |
| 18764 * value will be copied over either from the activity group's advertiser or | |
| 18765 * the existing activity's advertiser. | |
| 18766 */ | |
| 18767 core.String advertiserId; | |
| 18768 /** | |
| 18769 * Dimension value for the ID of the advertiser. This is a read-only, | |
| 18770 * auto-generated field. | |
| 18771 */ | |
| 18772 DimensionValue advertiserIdDimensionValue; | |
| 18773 /** | |
| 18774 * Code type used for cache busting in the generated tag. | |
| 18775 * Possible string values are: | |
| 18776 * - "ACTIVE_SERVER_PAGE" | |
| 18777 * - "COLD_FUSION" | |
| 18778 * - "JAVASCRIPT" | |
| 18779 * - "JSP" | |
| 18780 * - "PHP" | |
| 18781 */ | |
| 18782 core.String cacheBustingType; | |
| 18783 /** | |
| 18784 * Counting method for conversions for this floodlight activity. This is a | |
| 18785 * required field. | |
| 18786 * Possible string values are: | |
| 18787 * - "ITEMS_SOLD_COUNTING" | |
| 18788 * - "SESSION_COUNTING" | |
| 18789 * - "STANDARD_COUNTING" | |
| 18790 * - "TRANSACTIONS_COUNTING" | |
| 18791 * - "UNIQUE_COUNTING" | |
| 18792 */ | |
| 18793 core.String countingMethod; | |
| 18794 /** Dynamic floodlight tags. */ | |
| 18795 core.List<FloodlightActivityDynamicTag> defaultTags; | |
| 18796 /** | |
| 18797 * URL where this tag will be deployed. If specified, must be less than 256 | |
| 18798 * characters long. | |
| 18799 */ | |
| 18800 core.String expectedUrl; | |
| 18801 /** | |
| 18802 * Floodlight activity group ID of this floodlight activity. This is a | |
| 18803 * required field. | |
| 18804 */ | |
| 18805 core.String floodlightActivityGroupId; | |
| 18806 /** | |
| 18807 * Name of the associated floodlight activity group. This is a read-only | |
| 18808 * field. | |
| 18809 */ | |
| 18810 core.String floodlightActivityGroupName; | |
| 18811 /** | |
| 18812 * Tag string of the associated floodlight activity group. This is a read-only | |
| 18813 * field. | |
| 18814 */ | |
| 18815 core.String floodlightActivityGroupTagString; | |
| 18816 /** | |
| 18817 * Type of the associated floodlight activity group. This is a read-only | |
| 18818 * field. | |
| 18819 * Possible string values are: | |
| 18820 * - "COUNTER" | |
| 18821 * - "SALE" | |
| 18822 */ | |
| 18823 core.String floodlightActivityGroupType; | |
| 18824 /** | |
| 18825 * Floodlight configuration ID of this floodlight activity. If this field is | |
| 18826 * left blank, the value will be copied over either from the activity group's | |
| 18827 * floodlight configuration or from the existing activity's floodlight | |
| 18828 * configuration. | |
| 18829 */ | |
| 18830 core.String floodlightConfigurationId; | |
| 18831 /** | |
| 18832 * Dimension value for the ID of the floodlight configuration. This is a | |
| 18833 * read-only, auto-generated field. | |
| 18834 */ | |
| 18835 DimensionValue floodlightConfigurationIdDimensionValue; | |
| 18836 /** Whether this activity is archived. */ | |
| 18837 core.bool hidden; | |
| 18838 /** | |
| 18839 * ID of this floodlight activity. This is a read-only, auto-generated field. | |
| 18840 */ | |
| 18841 core.String id; | |
| 18842 /** | |
| 18843 * Dimension value for the ID of this floodlight activity. This is a | |
| 18844 * read-only, auto-generated field. | |
| 18845 */ | |
| 18846 DimensionValue idDimensionValue; | |
| 18847 /** Whether the image tag is enabled for this activity. */ | |
| 18848 core.bool imageTagEnabled; | |
| 18849 /** | |
| 18850 * Identifies what kind of resource this is. Value: the fixed string | |
| 18851 * "dfareporting#floodlightActivity". | |
| 18852 */ | |
| 18853 core.String kind; | |
| 18854 /** | |
| 18855 * Name of this floodlight activity. This is a required field. Must be less | |
| 18856 * than 129 characters long and cannot contain quotes. | |
| 18857 */ | |
| 18858 core.String name; | |
| 18859 /** General notes or implementation instructions for the tag. */ | |
| 18860 core.String notes; | |
| 18861 /** Publisher dynamic floodlight tags. */ | |
| 18862 core.List<FloodlightActivityPublisherDynamicTag> publisherTags; | |
| 18863 /** Whether this tag should use SSL. */ | |
| 18864 core.bool secure; | |
| 18865 /** | |
| 18866 * Whether the floodlight activity is SSL-compliant. This is a read-only | |
| 18867 * field, its value detected by the system from the floodlight tags. | |
| 18868 */ | |
| 18869 core.bool sslCompliant; | |
| 18870 /** Whether this floodlight activity must be SSL-compliant. */ | |
| 18871 core.bool sslRequired; | |
| 18872 /** | |
| 18873 * Subaccount ID of this floodlight activity. This is a read-only field that | |
| 18874 * can be left blank. | |
| 18875 */ | |
| 18876 core.String subaccountId; | |
| 18877 /** | |
| 18878 * Tag format type for the floodlight activity. If left blank, the tag format | |
| 18879 * will default to HTML. | |
| 18880 * Possible string values are: | |
| 18881 * - "HTML" | |
| 18882 * - "XHTML" | |
| 18883 */ | |
| 18884 core.String tagFormat; | |
| 18885 /** | |
| 18886 * Value of the cat= paramter in the floodlight tag, which the ad servers use | |
| 18887 * to identify the activity. This is optional: if empty, a new tag string will | |
| 18888 * be generated for you. This string must be 1 to 8 characters long, with | |
| 18889 * valid characters being [a-z][A-Z][0-9][-][ _ ]. This tag string must also | |
| 18890 * be unique among activities of the same activity group. This field is | |
| 18891 * read-only after insertion. | |
| 18892 */ | |
| 18893 core.String tagString; | |
| 18894 /** | |
| 18895 * List of the user-defined variables used by this conversion tag. These map | |
| 18896 * to the "u[1-20]=" in the tags. Each of these can have a user defined type. | |
| 18897 * Acceptable values are: | |
| 18898 * - "U1" | |
| 18899 * - "U2" | |
| 18900 * - "U3" | |
| 18901 * - "U4" | |
| 18902 * - "U5" | |
| 18903 * - "U6" | |
| 18904 * - "U7" | |
| 18905 * - "U8" | |
| 18906 * - "U9" | |
| 18907 * - "U10" | |
| 18908 * - "U11" | |
| 18909 * - "U12" | |
| 18910 * - "U13" | |
| 18911 * - "U14" | |
| 18912 * - "U15" | |
| 18913 * - "U16" | |
| 18914 * - "U17" | |
| 18915 * - "U18" | |
| 18916 * - "U19" | |
| 18917 * - "U20" | |
| 18918 */ | |
| 18919 core.List<core.String> userDefinedVariableTypes; | |
| 18920 | |
| 18921 FloodlightActivity(); | |
| 18922 | |
| 18923 FloodlightActivity.fromJson(core.Map _json) { | |
| 18924 if (_json.containsKey("accountId")) { | |
| 18925 accountId = _json["accountId"]; | |
| 18926 } | |
| 18927 if (_json.containsKey("advertiserId")) { | |
| 18928 advertiserId = _json["advertiserId"]; | |
| 18929 } | |
| 18930 if (_json.containsKey("advertiserIdDimensionValue")) { | |
| 18931 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser
IdDimensionValue"]); | |
| 18932 } | |
| 18933 if (_json.containsKey("cacheBustingType")) { | |
| 18934 cacheBustingType = _json["cacheBustingType"]; | |
| 18935 } | |
| 18936 if (_json.containsKey("countingMethod")) { | |
| 18937 countingMethod = _json["countingMethod"]; | |
| 18938 } | |
| 18939 if (_json.containsKey("defaultTags")) { | |
| 18940 defaultTags = _json["defaultTags"].map((value) => new FloodlightActivityDy
namicTag.fromJson(value)).toList(); | |
| 18941 } | |
| 18942 if (_json.containsKey("expectedUrl")) { | |
| 18943 expectedUrl = _json["expectedUrl"]; | |
| 18944 } | |
| 18945 if (_json.containsKey("floodlightActivityGroupId")) { | |
| 18946 floodlightActivityGroupId = _json["floodlightActivityGroupId"]; | |
| 18947 } | |
| 18948 if (_json.containsKey("floodlightActivityGroupName")) { | |
| 18949 floodlightActivityGroupName = _json["floodlightActivityGroupName"]; | |
| 18950 } | |
| 18951 if (_json.containsKey("floodlightActivityGroupTagString")) { | |
| 18952 floodlightActivityGroupTagString = _json["floodlightActivityGroupTagString
"]; | |
| 18953 } | |
| 18954 if (_json.containsKey("floodlightActivityGroupType")) { | |
| 18955 floodlightActivityGroupType = _json["floodlightActivityGroupType"]; | |
| 18956 } | |
| 18957 if (_json.containsKey("floodlightConfigurationId")) { | |
| 18958 floodlightConfigurationId = _json["floodlightConfigurationId"]; | |
| 18959 } | |
| 18960 if (_json.containsKey("floodlightConfigurationIdDimensionValue")) { | |
| 18961 floodlightConfigurationIdDimensionValue = new DimensionValue.fromJson(_jso
n["floodlightConfigurationIdDimensionValue"]); | |
| 18962 } | |
| 18963 if (_json.containsKey("hidden")) { | |
| 18964 hidden = _json["hidden"]; | |
| 18965 } | |
| 18966 if (_json.containsKey("id")) { | |
| 18967 id = _json["id"]; | |
| 18968 } | |
| 18969 if (_json.containsKey("idDimensionValue")) { | |
| 18970 idDimensionValue = new DimensionValue.fromJson(_json["idDimensionValue"]); | |
| 18971 } | |
| 18972 if (_json.containsKey("imageTagEnabled")) { | |
| 18973 imageTagEnabled = _json["imageTagEnabled"]; | |
| 18974 } | |
| 18975 if (_json.containsKey("kind")) { | |
| 18976 kind = _json["kind"]; | |
| 18977 } | |
| 18978 if (_json.containsKey("name")) { | |
| 18979 name = _json["name"]; | |
| 18980 } | |
| 18981 if (_json.containsKey("notes")) { | |
| 18982 notes = _json["notes"]; | |
| 18983 } | |
| 18984 if (_json.containsKey("publisherTags")) { | |
| 18985 publisherTags = _json["publisherTags"].map((value) => new FloodlightActivi
tyPublisherDynamicTag.fromJson(value)).toList(); | |
| 18986 } | |
| 18987 if (_json.containsKey("secure")) { | |
| 18988 secure = _json["secure"]; | |
| 18989 } | |
| 18990 if (_json.containsKey("sslCompliant")) { | |
| 18991 sslCompliant = _json["sslCompliant"]; | |
| 18992 } | |
| 18993 if (_json.containsKey("sslRequired")) { | |
| 18994 sslRequired = _json["sslRequired"]; | |
| 18995 } | |
| 18996 if (_json.containsKey("subaccountId")) { | |
| 18997 subaccountId = _json["subaccountId"]; | |
| 18998 } | |
| 18999 if (_json.containsKey("tagFormat")) { | |
| 19000 tagFormat = _json["tagFormat"]; | |
| 19001 } | |
| 19002 if (_json.containsKey("tagString")) { | |
| 19003 tagString = _json["tagString"]; | |
| 19004 } | |
| 19005 if (_json.containsKey("userDefinedVariableTypes")) { | |
| 19006 userDefinedVariableTypes = _json["userDefinedVariableTypes"]; | |
| 19007 } | |
| 19008 } | |
| 19009 | |
| 19010 core.Map toJson() { | |
| 19011 var _json = new core.Map(); | |
| 19012 if (accountId != null) { | |
| 19013 _json["accountId"] = accountId; | |
| 19014 } | |
| 19015 if (advertiserId != null) { | |
| 19016 _json["advertiserId"] = advertiserId; | |
| 19017 } | |
| 19018 if (advertiserIdDimensionValue != null) { | |
| 19019 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson(
); | |
| 19020 } | |
| 19021 if (cacheBustingType != null) { | |
| 19022 _json["cacheBustingType"] = cacheBustingType; | |
| 19023 } | |
| 19024 if (countingMethod != null) { | |
| 19025 _json["countingMethod"] = countingMethod; | |
| 19026 } | |
| 19027 if (defaultTags != null) { | |
| 19028 _json["defaultTags"] = defaultTags.map((value) => (value).toJson()).toList
(); | |
| 19029 } | |
| 19030 if (expectedUrl != null) { | |
| 19031 _json["expectedUrl"] = expectedUrl; | |
| 19032 } | |
| 19033 if (floodlightActivityGroupId != null) { | |
| 19034 _json["floodlightActivityGroupId"] = floodlightActivityGroupId; | |
| 19035 } | |
| 19036 if (floodlightActivityGroupName != null) { | |
| 19037 _json["floodlightActivityGroupName"] = floodlightActivityGroupName; | |
| 19038 } | |
| 19039 if (floodlightActivityGroupTagString != null) { | |
| 19040 _json["floodlightActivityGroupTagString"] = floodlightActivityGroupTagStri
ng; | |
| 19041 } | |
| 19042 if (floodlightActivityGroupType != null) { | |
| 19043 _json["floodlightActivityGroupType"] = floodlightActivityGroupType; | |
| 19044 } | |
| 19045 if (floodlightConfigurationId != null) { | |
| 19046 _json["floodlightConfigurationId"] = floodlightConfigurationId; | |
| 19047 } | |
| 19048 if (floodlightConfigurationIdDimensionValue != null) { | |
| 19049 _json["floodlightConfigurationIdDimensionValue"] = (floodlightConfiguratio
nIdDimensionValue).toJson(); | |
| 19050 } | |
| 19051 if (hidden != null) { | |
| 19052 _json["hidden"] = hidden; | |
| 19053 } | |
| 19054 if (id != null) { | |
| 19055 _json["id"] = id; | |
| 19056 } | |
| 19057 if (idDimensionValue != null) { | |
| 19058 _json["idDimensionValue"] = (idDimensionValue).toJson(); | |
| 19059 } | |
| 19060 if (imageTagEnabled != null) { | |
| 19061 _json["imageTagEnabled"] = imageTagEnabled; | |
| 19062 } | |
| 19063 if (kind != null) { | |
| 19064 _json["kind"] = kind; | |
| 19065 } | |
| 19066 if (name != null) { | |
| 19067 _json["name"] = name; | |
| 19068 } | |
| 19069 if (notes != null) { | |
| 19070 _json["notes"] = notes; | |
| 19071 } | |
| 19072 if (publisherTags != null) { | |
| 19073 _json["publisherTags"] = publisherTags.map((value) => (value).toJson()).to
List(); | |
| 19074 } | |
| 19075 if (secure != null) { | |
| 19076 _json["secure"] = secure; | |
| 19077 } | |
| 19078 if (sslCompliant != null) { | |
| 19079 _json["sslCompliant"] = sslCompliant; | |
| 19080 } | |
| 19081 if (sslRequired != null) { | |
| 19082 _json["sslRequired"] = sslRequired; | |
| 19083 } | |
| 19084 if (subaccountId != null) { | |
| 19085 _json["subaccountId"] = subaccountId; | |
| 19086 } | |
| 19087 if (tagFormat != null) { | |
| 19088 _json["tagFormat"] = tagFormat; | |
| 19089 } | |
| 19090 if (tagString != null) { | |
| 19091 _json["tagString"] = tagString; | |
| 19092 } | |
| 19093 if (userDefinedVariableTypes != null) { | |
| 19094 _json["userDefinedVariableTypes"] = userDefinedVariableTypes; | |
| 19095 } | |
| 19096 return _json; | |
| 19097 } | |
| 19098 } | |
| 19099 | |
| 19100 /** Dynamic Tag */ | |
| 19101 class FloodlightActivityDynamicTag { | |
| 19102 /** ID of this dynamic tag. This is a read-only, auto-generated field. */ | |
| 19103 core.String id; | |
| 19104 /** Name of this tag. */ | |
| 19105 core.String name; | |
| 19106 /** Tag code. */ | |
| 19107 core.String tag; | |
| 19108 | |
| 19109 FloodlightActivityDynamicTag(); | |
| 19110 | |
| 19111 FloodlightActivityDynamicTag.fromJson(core.Map _json) { | |
| 19112 if (_json.containsKey("id")) { | |
| 19113 id = _json["id"]; | |
| 19114 } | |
| 19115 if (_json.containsKey("name")) { | |
| 19116 name = _json["name"]; | |
| 19117 } | |
| 19118 if (_json.containsKey("tag")) { | |
| 19119 tag = _json["tag"]; | |
| 19120 } | |
| 19121 } | |
| 19122 | |
| 19123 core.Map toJson() { | |
| 19124 var _json = new core.Map(); | |
| 19125 if (id != null) { | |
| 19126 _json["id"] = id; | |
| 19127 } | |
| 19128 if (name != null) { | |
| 19129 _json["name"] = name; | |
| 19130 } | |
| 19131 if (tag != null) { | |
| 19132 _json["tag"] = tag; | |
| 19133 } | |
| 19134 return _json; | |
| 19135 } | |
| 19136 } | |
| 19137 | |
| 19138 /** Contains properties of a Floodlight activity group. */ | |
| 19139 class FloodlightActivityGroup { | |
| 19140 /** | |
| 19141 * Account ID of this floodlight activity group. This is a read-only field | |
| 19142 * that can be left blank. | |
| 19143 */ | |
| 19144 core.String accountId; | |
| 19145 /** | |
| 19146 * Advertiser ID of this floodlight activity group. If this field is left | |
| 19147 * blank, the value will be copied over either from the floodlight | |
| 19148 * configuration's advertiser or from the existing activity group's | |
| 19149 * advertiser. | |
| 19150 */ | |
| 19151 core.String advertiserId; | |
| 19152 /** | |
| 19153 * Dimension value for the ID of the advertiser. This is a read-only, | |
| 19154 * auto-generated field. | |
| 19155 */ | |
| 19156 DimensionValue advertiserIdDimensionValue; | |
| 19157 /** | |
| 19158 * Floodlight configuration ID of this floodlight activity group. This is a | |
| 19159 * required field. | |
| 19160 */ | |
| 19161 core.String floodlightConfigurationId; | |
| 19162 /** | |
| 19163 * Dimension value for the ID of the floodlight configuration. This is a | |
| 19164 * read-only, auto-generated field. | |
| 19165 */ | |
| 19166 DimensionValue floodlightConfigurationIdDimensionValue; | |
| 19167 /** | |
| 19168 * ID of this floodlight activity group. This is a read-only, auto-generated | |
| 19169 * field. | |
| 19170 */ | |
| 19171 core.String id; | |
| 19172 /** | |
| 19173 * Dimension value for the ID of this floodlight activity group. This is a | |
| 19174 * read-only, auto-generated field. | |
| 19175 */ | |
| 19176 DimensionValue idDimensionValue; | |
| 19177 /** | |
| 19178 * Identifies what kind of resource this is. Value: the fixed string | |
| 19179 * "dfareporting#floodlightActivityGroup". | |
| 19180 */ | |
| 19181 core.String kind; | |
| 19182 /** | |
| 19183 * Name of this floodlight activity group. This is a required field. Must be | |
| 19184 * less than 65 characters long and cannot contain quotes. | |
| 19185 */ | |
| 19186 core.String name; | |
| 19187 /** | |
| 19188 * Subaccount ID of this floodlight activity group. This is a read-only field | |
| 19189 * that can be left blank. | |
| 19190 */ | |
| 19191 core.String subaccountId; | |
| 19192 /** | |
| 19193 * Value of the type= parameter in the floodlight tag, which the ad servers | |
| 19194 * use to identify the activity group that the activity belongs to. This is | |
| 19195 * optional: if empty, a new tag string will be generated for you. This string | |
| 19196 * must be 1 to 8 characters long, with valid characters being | |
| 19197 * [a-z][A-Z][0-9][-][ _ ]. This tag string must also be unique among activity | |
| 19198 * groups of the same floodlight configuration. This field is read-only after | |
| 19199 * insertion. | |
| 19200 */ | |
| 19201 core.String tagString; | |
| 19202 /** | |
| 19203 * Type of the floodlight activity group. This is a required field that is | |
| 19204 * read-only after insertion. | |
| 19205 * Possible string values are: | |
| 19206 * - "COUNTER" | |
| 19207 * - "SALE" | |
| 19208 */ | |
| 19209 core.String type; | |
| 19210 | |
| 19211 FloodlightActivityGroup(); | |
| 19212 | |
| 19213 FloodlightActivityGroup.fromJson(core.Map _json) { | |
| 19214 if (_json.containsKey("accountId")) { | |
| 19215 accountId = _json["accountId"]; | |
| 19216 } | |
| 19217 if (_json.containsKey("advertiserId")) { | |
| 19218 advertiserId = _json["advertiserId"]; | |
| 19219 } | |
| 19220 if (_json.containsKey("advertiserIdDimensionValue")) { | |
| 19221 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser
IdDimensionValue"]); | |
| 19222 } | |
| 19223 if (_json.containsKey("floodlightConfigurationId")) { | |
| 19224 floodlightConfigurationId = _json["floodlightConfigurationId"]; | |
| 19225 } | |
| 19226 if (_json.containsKey("floodlightConfigurationIdDimensionValue")) { | |
| 19227 floodlightConfigurationIdDimensionValue = new DimensionValue.fromJson(_jso
n["floodlightConfigurationIdDimensionValue"]); | |
| 19228 } | |
| 19229 if (_json.containsKey("id")) { | |
| 19230 id = _json["id"]; | |
| 19231 } | |
| 19232 if (_json.containsKey("idDimensionValue")) { | |
| 19233 idDimensionValue = new DimensionValue.fromJson(_json["idDimensionValue"]); | |
| 19234 } | |
| 19235 if (_json.containsKey("kind")) { | |
| 19236 kind = _json["kind"]; | |
| 19237 } | |
| 19238 if (_json.containsKey("name")) { | |
| 19239 name = _json["name"]; | |
| 19240 } | |
| 19241 if (_json.containsKey("subaccountId")) { | |
| 19242 subaccountId = _json["subaccountId"]; | |
| 19243 } | |
| 19244 if (_json.containsKey("tagString")) { | |
| 19245 tagString = _json["tagString"]; | |
| 19246 } | |
| 19247 if (_json.containsKey("type")) { | |
| 19248 type = _json["type"]; | |
| 19249 } | |
| 19250 } | |
| 19251 | |
| 19252 core.Map toJson() { | |
| 19253 var _json = new core.Map(); | |
| 19254 if (accountId != null) { | |
| 19255 _json["accountId"] = accountId; | |
| 19256 } | |
| 19257 if (advertiserId != null) { | |
| 19258 _json["advertiserId"] = advertiserId; | |
| 19259 } | |
| 19260 if (advertiserIdDimensionValue != null) { | |
| 19261 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson(
); | |
| 19262 } | |
| 19263 if (floodlightConfigurationId != null) { | |
| 19264 _json["floodlightConfigurationId"] = floodlightConfigurationId; | |
| 19265 } | |
| 19266 if (floodlightConfigurationIdDimensionValue != null) { | |
| 19267 _json["floodlightConfigurationIdDimensionValue"] = (floodlightConfiguratio
nIdDimensionValue).toJson(); | |
| 19268 } | |
| 19269 if (id != null) { | |
| 19270 _json["id"] = id; | |
| 19271 } | |
| 19272 if (idDimensionValue != null) { | |
| 19273 _json["idDimensionValue"] = (idDimensionValue).toJson(); | |
| 19274 } | |
| 19275 if (kind != null) { | |
| 19276 _json["kind"] = kind; | |
| 19277 } | |
| 19278 if (name != null) { | |
| 19279 _json["name"] = name; | |
| 19280 } | |
| 19281 if (subaccountId != null) { | |
| 19282 _json["subaccountId"] = subaccountId; | |
| 19283 } | |
| 19284 if (tagString != null) { | |
| 19285 _json["tagString"] = tagString; | |
| 19286 } | |
| 19287 if (type != null) { | |
| 19288 _json["type"] = type; | |
| 19289 } | |
| 19290 return _json; | |
| 19291 } | |
| 19292 } | |
| 19293 | |
| 19294 /** Floodlight Activity Group List Response */ | |
| 19295 class FloodlightActivityGroupsListResponse { | |
| 19296 /** Floodlight activity group collection. */ | |
| 19297 core.List<FloodlightActivityGroup> floodlightActivityGroups; | |
| 19298 /** | |
| 19299 * Identifies what kind of resource this is. Value: the fixed string | |
| 19300 * "dfareporting#floodlightActivityGroupsListResponse". | |
| 19301 */ | |
| 19302 core.String kind; | |
| 19303 /** Pagination token to be used for the next list operation. */ | |
| 19304 core.String nextPageToken; | |
| 19305 | |
| 19306 FloodlightActivityGroupsListResponse(); | |
| 19307 | |
| 19308 FloodlightActivityGroupsListResponse.fromJson(core.Map _json) { | |
| 19309 if (_json.containsKey("floodlightActivityGroups")) { | |
| 19310 floodlightActivityGroups = _json["floodlightActivityGroups"].map((value) =
> new FloodlightActivityGroup.fromJson(value)).toList(); | |
| 19311 } | |
| 19312 if (_json.containsKey("kind")) { | |
| 19313 kind = _json["kind"]; | |
| 19314 } | |
| 19315 if (_json.containsKey("nextPageToken")) { | |
| 19316 nextPageToken = _json["nextPageToken"]; | |
| 19317 } | |
| 19318 } | |
| 19319 | |
| 19320 core.Map toJson() { | |
| 19321 var _json = new core.Map(); | |
| 19322 if (floodlightActivityGroups != null) { | |
| 19323 _json["floodlightActivityGroups"] = floodlightActivityGroups.map((value) =
> (value).toJson()).toList(); | |
| 19324 } | |
| 19325 if (kind != null) { | |
| 19326 _json["kind"] = kind; | |
| 19327 } | |
| 19328 if (nextPageToken != null) { | |
| 19329 _json["nextPageToken"] = nextPageToken; | |
| 19330 } | |
| 19331 return _json; | |
| 19332 } | |
| 19333 } | |
| 19334 | |
| 19335 /** Publisher Dynamic Tag */ | |
| 19336 class FloodlightActivityPublisherDynamicTag { | |
| 19337 /** Whether this tag is applicable only for click-throughs. */ | |
| 19338 core.bool clickThrough; | |
| 19339 /** | |
| 19340 * Directory site ID of this dynamic tag. This is a write-only field that can | |
| 19341 * be used as an alternative to the siteId field. When this resource is | |
| 19342 * retrieved, only the siteId field will be populated. | |
| 19343 */ | |
| 19344 core.String directorySiteId; | |
| 19345 /** Dynamic floodlight tag. */ | |
| 19346 FloodlightActivityDynamicTag dynamicTag; | |
| 19347 /** Site ID of this dynamic tag. */ | |
| 19348 core.String siteId; | |
| 19349 /** | |
| 19350 * Dimension value for the ID of the site. This is a read-only, auto-generated | |
| 19351 * field. | |
| 19352 */ | |
| 19353 DimensionValue siteIdDimensionValue; | |
| 19354 /** Whether this tag is applicable only for view-throughs. */ | |
| 19355 core.bool viewThrough; | |
| 19356 | |
| 19357 FloodlightActivityPublisherDynamicTag(); | |
| 19358 | |
| 19359 FloodlightActivityPublisherDynamicTag.fromJson(core.Map _json) { | |
| 19360 if (_json.containsKey("clickThrough")) { | |
| 19361 clickThrough = _json["clickThrough"]; | |
| 19362 } | |
| 19363 if (_json.containsKey("directorySiteId")) { | |
| 19364 directorySiteId = _json["directorySiteId"]; | |
| 19365 } | |
| 19366 if (_json.containsKey("dynamicTag")) { | |
| 19367 dynamicTag = new FloodlightActivityDynamicTag.fromJson(_json["dynamicTag"]
); | |
| 19368 } | |
| 19369 if (_json.containsKey("siteId")) { | |
| 19370 siteId = _json["siteId"]; | |
| 19371 } | |
| 19372 if (_json.containsKey("siteIdDimensionValue")) { | |
| 19373 siteIdDimensionValue = new DimensionValue.fromJson(_json["siteIdDimensionV
alue"]); | |
| 19374 } | |
| 19375 if (_json.containsKey("viewThrough")) { | |
| 19376 viewThrough = _json["viewThrough"]; | |
| 19377 } | |
| 19378 } | |
| 19379 | |
| 19380 core.Map toJson() { | |
| 19381 var _json = new core.Map(); | |
| 19382 if (clickThrough != null) { | |
| 19383 _json["clickThrough"] = clickThrough; | |
| 19384 } | |
| 19385 if (directorySiteId != null) { | |
| 19386 _json["directorySiteId"] = directorySiteId; | |
| 19387 } | |
| 19388 if (dynamicTag != null) { | |
| 19389 _json["dynamicTag"] = (dynamicTag).toJson(); | |
| 19390 } | |
| 19391 if (siteId != null) { | |
| 19392 _json["siteId"] = siteId; | |
| 19393 } | |
| 19394 if (siteIdDimensionValue != null) { | |
| 19395 _json["siteIdDimensionValue"] = (siteIdDimensionValue).toJson(); | |
| 19396 } | |
| 19397 if (viewThrough != null) { | |
| 19398 _json["viewThrough"] = viewThrough; | |
| 19399 } | |
| 19400 return _json; | |
| 19401 } | |
| 19402 } | |
| 19403 | |
| 19404 /** Contains properties of a Floodlight configuration. */ | |
| 19405 class FloodlightConfiguration { | |
| 19406 /** | |
| 19407 * Account ID of this floodlight configuration. This is a read-only field that | |
| 19408 * can be left blank. | |
| 19409 */ | |
| 19410 core.String accountId; | |
| 19411 /** | |
| 19412 * Advertiser ID of the parent advertiser of this floodlight configuration. | |
| 19413 */ | |
| 19414 core.String advertiserId; | |
| 19415 /** | |
| 19416 * Dimension value for the ID of the advertiser. This is a read-only, | |
| 19417 * auto-generated field. | |
| 19418 */ | |
| 19419 DimensionValue advertiserIdDimensionValue; | |
| 19420 /** Whether advertiser data is shared with Google Analytics. */ | |
| 19421 core.bool analyticsDataSharingEnabled; | |
| 19422 /** | |
| 19423 * Whether the exposure-to-conversion report is enabled. This report shows | |
| 19424 * detailed pathway information on up to 10 of the most recent ad exposures | |
| 19425 * seen by a user before converting. | |
| 19426 */ | |
| 19427 core.bool exposureToConversionEnabled; | |
| 19428 /** | |
| 19429 * Day that will be counted as the first day of the week in reports. This is a | |
| 19430 * required field. | |
| 19431 * Possible string values are: | |
| 19432 * - "MONDAY" | |
| 19433 * - "SUNDAY" | |
| 19434 */ | |
| 19435 core.String firstDayOfWeek; | |
| 19436 /** | |
| 19437 * ID of this floodlight configuration. This is a read-only, auto-generated | |
| 19438 * field. | |
| 19439 */ | |
| 19440 core.String id; | |
| 19441 /** | |
| 19442 * Dimension value for the ID of this floodlight configuration. This is a | |
| 19443 * read-only, auto-generated field. | |
| 19444 */ | |
| 19445 DimensionValue idDimensionValue; | |
| 19446 /** Whether in-app attribution tracking is enabled. */ | |
| 19447 core.bool inAppAttributionTrackingEnabled; | |
| 19448 /** | |
| 19449 * Identifies what kind of resource this is. Value: the fixed string | |
| 19450 * "dfareporting#floodlightConfiguration". | |
| 19451 */ | |
| 19452 core.String kind; | |
| 19453 /** Lookback window settings for this floodlight configuration. */ | |
| 19454 LookbackConfiguration lookbackConfiguration; | |
| 19455 /** | |
| 19456 * Types of attribution options for natural search conversions. | |
| 19457 * Possible string values are: | |
| 19458 * - "EXCLUDE_NATURAL_SEARCH_CONVERSION_ATTRIBUTION" | |
| 19459 * - "INCLUDE_NATURAL_SEARCH_CONVERSION_ATTRIBUTION" | |
| 19460 * - "INCLUDE_NATURAL_SEARCH_TIERED_CONVERSION_ATTRIBUTION" | |
| 19461 */ | |
| 19462 core.String naturalSearchConversionAttributionOption; | |
| 19463 /** Settings for DCM Omniture integration. */ | |
| 19464 OmnitureSettings omnitureSettings; | |
| 19465 /** | |
| 19466 * Whether floodlight activities owned by this configuration are required to | |
| 19467 * be SSL-compliant. | |
| 19468 */ | |
| 19469 core.bool sslRequired; | |
| 19470 /** | |
| 19471 * List of standard variables enabled for this configuration. | |
| 19472 * | |
| 19473 * Acceptable values are: | |
| 19474 * - "ORD" | |
| 19475 * - "NUM" | |
| 19476 */ | |
| 19477 core.List<core.String> standardVariableTypes; | |
| 19478 /** | |
| 19479 * Subaccount ID of this floodlight configuration. This is a read-only field | |
| 19480 * that can be left blank. | |
| 19481 */ | |
| 19482 core.String subaccountId; | |
| 19483 /** Configuration settings for dynamic and image floodlight tags. */ | |
| 19484 TagSettings tagSettings; | |
| 19485 /** | |
| 19486 * List of third-party authentication tokens enabled for this configuration. | |
| 19487 */ | |
| 19488 core.List<ThirdPartyAuthenticationToken> thirdPartyAuthenticationTokens; | |
| 19489 /** List of user defined variables enabled for this configuration. */ | |
| 19490 core.List<UserDefinedVariableConfiguration> userDefinedVariableConfigurations; | |
| 19491 | |
| 19492 FloodlightConfiguration(); | |
| 19493 | |
| 19494 FloodlightConfiguration.fromJson(core.Map _json) { | |
| 19495 if (_json.containsKey("accountId")) { | |
| 19496 accountId = _json["accountId"]; | |
| 19497 } | |
| 19498 if (_json.containsKey("advertiserId")) { | |
| 19499 advertiserId = _json["advertiserId"]; | |
| 19500 } | |
| 19501 if (_json.containsKey("advertiserIdDimensionValue")) { | |
| 19502 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser
IdDimensionValue"]); | |
| 19503 } | |
| 19504 if (_json.containsKey("analyticsDataSharingEnabled")) { | |
| 19505 analyticsDataSharingEnabled = _json["analyticsDataSharingEnabled"]; | |
| 19506 } | |
| 19507 if (_json.containsKey("exposureToConversionEnabled")) { | |
| 19508 exposureToConversionEnabled = _json["exposureToConversionEnabled"]; | |
| 19509 } | |
| 19510 if (_json.containsKey("firstDayOfWeek")) { | |
| 19511 firstDayOfWeek = _json["firstDayOfWeek"]; | |
| 19512 } | |
| 19513 if (_json.containsKey("id")) { | |
| 19514 id = _json["id"]; | |
| 19515 } | |
| 19516 if (_json.containsKey("idDimensionValue")) { | |
| 19517 idDimensionValue = new DimensionValue.fromJson(_json["idDimensionValue"]); | |
| 19518 } | |
| 19519 if (_json.containsKey("inAppAttributionTrackingEnabled")) { | |
| 19520 inAppAttributionTrackingEnabled = _json["inAppAttributionTrackingEnabled"]
; | |
| 19521 } | |
| 19522 if (_json.containsKey("kind")) { | |
| 19523 kind = _json["kind"]; | |
| 19524 } | |
| 19525 if (_json.containsKey("lookbackConfiguration")) { | |
| 19526 lookbackConfiguration = new LookbackConfiguration.fromJson(_json["lookback
Configuration"]); | |
| 19527 } | |
| 19528 if (_json.containsKey("naturalSearchConversionAttributionOption")) { | |
| 19529 naturalSearchConversionAttributionOption = _json["naturalSearchConversionA
ttributionOption"]; | |
| 19530 } | |
| 19531 if (_json.containsKey("omnitureSettings")) { | |
| 19532 omnitureSettings = new OmnitureSettings.fromJson(_json["omnitureSettings"]
); | |
| 19533 } | |
| 19534 if (_json.containsKey("sslRequired")) { | |
| 19535 sslRequired = _json["sslRequired"]; | |
| 19536 } | |
| 19537 if (_json.containsKey("standardVariableTypes")) { | |
| 19538 standardVariableTypes = _json["standardVariableTypes"]; | |
| 19539 } | |
| 19540 if (_json.containsKey("subaccountId")) { | |
| 19541 subaccountId = _json["subaccountId"]; | |
| 19542 } | |
| 19543 if (_json.containsKey("tagSettings")) { | |
| 19544 tagSettings = new TagSettings.fromJson(_json["tagSettings"]); | |
| 19545 } | |
| 19546 if (_json.containsKey("thirdPartyAuthenticationTokens")) { | |
| 19547 thirdPartyAuthenticationTokens = _json["thirdPartyAuthenticationTokens"].m
ap((value) => new ThirdPartyAuthenticationToken.fromJson(value)).toList(); | |
| 19548 } | |
| 19549 if (_json.containsKey("userDefinedVariableConfigurations")) { | |
| 19550 userDefinedVariableConfigurations = _json["userDefinedVariableConfiguratio
ns"].map((value) => new UserDefinedVariableConfiguration.fromJson(value)).toList
(); | |
| 19551 } | |
| 19552 } | |
| 19553 | |
| 19554 core.Map toJson() { | |
| 19555 var _json = new core.Map(); | |
| 19556 if (accountId != null) { | |
| 19557 _json["accountId"] = accountId; | |
| 19558 } | |
| 19559 if (advertiserId != null) { | |
| 19560 _json["advertiserId"] = advertiserId; | |
| 19561 } | |
| 19562 if (advertiserIdDimensionValue != null) { | |
| 19563 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson(
); | |
| 19564 } | |
| 19565 if (analyticsDataSharingEnabled != null) { | |
| 19566 _json["analyticsDataSharingEnabled"] = analyticsDataSharingEnabled; | |
| 19567 } | |
| 19568 if (exposureToConversionEnabled != null) { | |
| 19569 _json["exposureToConversionEnabled"] = exposureToConversionEnabled; | |
| 19570 } | |
| 19571 if (firstDayOfWeek != null) { | |
| 19572 _json["firstDayOfWeek"] = firstDayOfWeek; | |
| 19573 } | |
| 19574 if (id != null) { | |
| 19575 _json["id"] = id; | |
| 19576 } | |
| 19577 if (idDimensionValue != null) { | |
| 19578 _json["idDimensionValue"] = (idDimensionValue).toJson(); | |
| 19579 } | |
| 19580 if (inAppAttributionTrackingEnabled != null) { | |
| 19581 _json["inAppAttributionTrackingEnabled"] = inAppAttributionTrackingEnabled
; | |
| 19582 } | |
| 19583 if (kind != null) { | |
| 19584 _json["kind"] = kind; | |
| 19585 } | |
| 19586 if (lookbackConfiguration != null) { | |
| 19587 _json["lookbackConfiguration"] = (lookbackConfiguration).toJson(); | |
| 19588 } | |
| 19589 if (naturalSearchConversionAttributionOption != null) { | |
| 19590 _json["naturalSearchConversionAttributionOption"] = naturalSearchConversio
nAttributionOption; | |
| 19591 } | |
| 19592 if (omnitureSettings != null) { | |
| 19593 _json["omnitureSettings"] = (omnitureSettings).toJson(); | |
| 19594 } | |
| 19595 if (sslRequired != null) { | |
| 19596 _json["sslRequired"] = sslRequired; | |
| 19597 } | |
| 19598 if (standardVariableTypes != null) { | |
| 19599 _json["standardVariableTypes"] = standardVariableTypes; | |
| 19600 } | |
| 19601 if (subaccountId != null) { | |
| 19602 _json["subaccountId"] = subaccountId; | |
| 19603 } | |
| 19604 if (tagSettings != null) { | |
| 19605 _json["tagSettings"] = (tagSettings).toJson(); | |
| 19606 } | |
| 19607 if (thirdPartyAuthenticationTokens != null) { | |
| 19608 _json["thirdPartyAuthenticationTokens"] = thirdPartyAuthenticationTokens.m
ap((value) => (value).toJson()).toList(); | |
| 19609 } | |
| 19610 if (userDefinedVariableConfigurations != null) { | |
| 19611 _json["userDefinedVariableConfigurations"] = userDefinedVariableConfigurat
ions.map((value) => (value).toJson()).toList(); | |
| 19612 } | |
| 19613 return _json; | |
| 19614 } | |
| 19615 } | |
| 19616 | |
| 19617 /** Floodlight Configuration List Response */ | |
| 19618 class FloodlightConfigurationsListResponse { | |
| 19619 /** Floodlight configuration collection. */ | |
| 19620 core.List<FloodlightConfiguration> floodlightConfigurations; | |
| 19621 /** | |
| 19622 * Identifies what kind of resource this is. Value: the fixed string | |
| 19623 * "dfareporting#floodlightConfigurationsListResponse". | |
| 19624 */ | |
| 19625 core.String kind; | |
| 19626 | |
| 19627 FloodlightConfigurationsListResponse(); | |
| 19628 | |
| 19629 FloodlightConfigurationsListResponse.fromJson(core.Map _json) { | |
| 19630 if (_json.containsKey("floodlightConfigurations")) { | |
| 19631 floodlightConfigurations = _json["floodlightConfigurations"].map((value) =
> new FloodlightConfiguration.fromJson(value)).toList(); | |
| 19632 } | |
| 19633 if (_json.containsKey("kind")) { | |
| 19634 kind = _json["kind"]; | |
| 19635 } | |
| 19636 } | |
| 19637 | |
| 19638 core.Map toJson() { | |
| 19639 var _json = new core.Map(); | |
| 19640 if (floodlightConfigurations != null) { | |
| 19641 _json["floodlightConfigurations"] = floodlightConfigurations.map((value) =
> (value).toJson()).toList(); | |
| 19642 } | |
| 19643 if (kind != null) { | |
| 19644 _json["kind"] = kind; | |
| 19645 } | |
| 19646 return _json; | |
| 19647 } | |
| 19648 } | |
| 19649 | |
| 19650 /** | |
| 19651 * Represents fields that are compatible to be selected for a report of type | |
| 19652 * "FlOODLIGHT". | |
| 19653 */ | |
| 19654 class FloodlightReportCompatibleFields { | |
| 19655 /** | |
| 19656 * Dimensions which are compatible to be selected in the "dimensionFilters" | |
| 19657 * section of the report. | |
| 19658 */ | |
| 19659 core.List<Dimension> dimensionFilters; | |
| 19660 /** | |
| 19661 * Dimensions which are compatible to be selected in the "dimensions" section | |
| 19662 * of the report. | |
| 19663 */ | |
| 19664 core.List<Dimension> dimensions; | |
| 19665 /** | |
| 19666 * The kind of resource this is, in this case | |
| 19667 * dfareporting#floodlightReportCompatibleFields. | |
| 19668 */ | |
| 19669 core.String kind; | |
| 19670 /** | |
| 19671 * Metrics which are compatible to be selected in the "metricNames" section of | |
| 19672 * the report. | |
| 19673 */ | |
| 19674 core.List<Metric> metrics; | |
| 19675 | |
| 19676 FloodlightReportCompatibleFields(); | |
| 19677 | |
| 19678 FloodlightReportCompatibleFields.fromJson(core.Map _json) { | |
| 19679 if (_json.containsKey("dimensionFilters")) { | |
| 19680 dimensionFilters = _json["dimensionFilters"].map((value) => new Dimension.
fromJson(value)).toList(); | |
| 19681 } | |
| 19682 if (_json.containsKey("dimensions")) { | |
| 19683 dimensions = _json["dimensions"].map((value) => new Dimension.fromJson(val
ue)).toList(); | |
| 19684 } | |
| 19685 if (_json.containsKey("kind")) { | |
| 19686 kind = _json["kind"]; | |
| 19687 } | |
| 19688 if (_json.containsKey("metrics")) { | |
| 19689 metrics = _json["metrics"].map((value) => new Metric.fromJson(value)).toLi
st(); | |
| 19690 } | |
| 19691 } | |
| 19692 | |
| 19693 core.Map toJson() { | |
| 19694 var _json = new core.Map(); | |
| 19695 if (dimensionFilters != null) { | |
| 19696 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson
()).toList(); | |
| 19697 } | |
| 19698 if (dimensions != null) { | |
| 19699 _json["dimensions"] = dimensions.map((value) => (value).toJson()).toList()
; | |
| 19700 } | |
| 19701 if (kind != null) { | |
| 19702 _json["kind"] = kind; | |
| 19703 } | |
| 19704 if (metrics != null) { | |
| 19705 _json["metrics"] = metrics.map((value) => (value).toJson()).toList(); | |
| 19706 } | |
| 19707 return _json; | |
| 19708 } | |
| 19709 } | |
| 19710 | |
| 19711 /** Frequency Cap. */ | |
| 19712 class FrequencyCap { | |
| 19713 /** | |
| 19714 * Duration of time, in seconds, for this frequency cap. The maximum duration | |
| 19715 * is 90 days in seconds, or 7,776,000. | |
| 19716 */ | |
| 19717 core.String duration; | |
| 19718 /** | |
| 19719 * Number of times an individual user can be served the ad within the | |
| 19720 * specified duration. The maximum allowed is 15. | |
| 19721 */ | |
| 19722 core.String impressions; | |
| 19723 | |
| 19724 FrequencyCap(); | |
| 19725 | |
| 19726 FrequencyCap.fromJson(core.Map _json) { | |
| 19727 if (_json.containsKey("duration")) { | |
| 19728 duration = _json["duration"]; | |
| 19729 } | |
| 19730 if (_json.containsKey("impressions")) { | |
| 19731 impressions = _json["impressions"]; | |
| 19732 } | |
| 19733 } | |
| 19734 | |
| 19735 core.Map toJson() { | |
| 19736 var _json = new core.Map(); | |
| 19737 if (duration != null) { | |
| 19738 _json["duration"] = duration; | |
| 19739 } | |
| 19740 if (impressions != null) { | |
| 19741 _json["impressions"] = impressions; | |
| 19742 } | |
| 19743 return _json; | |
| 19744 } | |
| 19745 } | |
| 19746 | |
| 19747 /** FsCommand. */ | |
| 19748 class FsCommand { | |
| 19749 /** | |
| 19750 * Distance from the left of the browser.Applicable when positionOption is | |
| 19751 * DISTANCE_FROM_TOP_LEFT_CORNER. | |
| 19752 */ | |
| 19753 core.int left; | |
| 19754 /** | |
| 19755 * Position in the browser where the window will open. | |
| 19756 * Possible string values are: | |
| 19757 * - "CENTERED" | |
| 19758 * - "DISTANCE_FROM_TOP_LEFT_CORNER" | |
| 19759 */ | |
| 19760 core.String positionOption; | |
| 19761 /** | |
| 19762 * Distance from the top of the browser. Applicable when positionOption is | |
| 19763 * DISTANCE_FROM_TOP_LEFT_CORNER. | |
| 19764 */ | |
| 19765 core.int top; | |
| 19766 /** Height of the window. */ | |
| 19767 core.int windowHeight; | |
| 19768 /** Width of the window. */ | |
| 19769 core.int windowWidth; | |
| 19770 | |
| 19771 FsCommand(); | |
| 19772 | |
| 19773 FsCommand.fromJson(core.Map _json) { | |
| 19774 if (_json.containsKey("left")) { | |
| 19775 left = _json["left"]; | |
| 19776 } | |
| 19777 if (_json.containsKey("positionOption")) { | |
| 19778 positionOption = _json["positionOption"]; | |
| 19779 } | |
| 19780 if (_json.containsKey("top")) { | |
| 19781 top = _json["top"]; | |
| 19782 } | |
| 19783 if (_json.containsKey("windowHeight")) { | |
| 19784 windowHeight = _json["windowHeight"]; | |
| 19785 } | |
| 19786 if (_json.containsKey("windowWidth")) { | |
| 19787 windowWidth = _json["windowWidth"]; | |
| 19788 } | |
| 19789 } | |
| 19790 | |
| 19791 core.Map toJson() { | |
| 19792 var _json = new core.Map(); | |
| 19793 if (left != null) { | |
| 19794 _json["left"] = left; | |
| 19795 } | |
| 19796 if (positionOption != null) { | |
| 19797 _json["positionOption"] = positionOption; | |
| 19798 } | |
| 19799 if (top != null) { | |
| 19800 _json["top"] = top; | |
| 19801 } | |
| 19802 if (windowHeight != null) { | |
| 19803 _json["windowHeight"] = windowHeight; | |
| 19804 } | |
| 19805 if (windowWidth != null) { | |
| 19806 _json["windowWidth"] = windowWidth; | |
| 19807 } | |
| 19808 return _json; | |
| 19809 } | |
| 19810 } | |
| 19811 | |
| 19812 /** Geographical Targeting. */ | |
| 19813 class GeoTargeting { | |
| 19814 /** | |
| 19815 * Cities to be targeted. For each city only dartId is required. The other | |
| 19816 * fields are populated automatically when the ad is inserted or updated. If | |
| 19817 * targeting a city, do not target or exclude the country of the city, and do | |
| 19818 * not target the metro or region of the city. | |
| 19819 */ | |
| 19820 core.List<City> cities; | |
| 19821 /** | |
| 19822 * Countries to be targeted or excluded from targeting, depending on the | |
| 19823 * setting of the excludeCountries field. For each country only dartId is | |
| 19824 * required. The other fields are populated automatically when the ad is | |
| 19825 * inserted or updated. If targeting or excluding a country, do not target | |
| 19826 * regions, cities, metros, or postal codes in the same country. | |
| 19827 */ | |
| 19828 core.List<Country> countries; | |
| 19829 /** | |
| 19830 * Whether or not to exclude the countries in the countries field from | |
| 19831 * targeting. If false, the countries field refers to countries which will be | |
| 19832 * targeted by the ad. | |
| 19833 */ | |
| 19834 core.bool excludeCountries; | |
| 19835 /** | |
| 19836 * Metros to be targeted. For each metro only dmaId is required. The other | |
| 19837 * fields are populated automatically when the ad is inserted or updated. If | |
| 19838 * targeting a metro, do not target or exclude the country of the metro. | |
| 19839 */ | |
| 19840 core.List<Metro> metros; | |
| 19841 /** | |
| 19842 * Postal codes to be targeted. For each postal code only id is required. The | |
| 19843 * other fields are populated automatically when the ad is inserted or | |
| 19844 * updated. If targeting a postal code, do not target or exclude the country | |
| 19845 * of the postal code. | |
| 19846 */ | |
| 19847 core.List<PostalCode> postalCodes; | |
| 19848 /** | |
| 19849 * Regions to be targeted. For each region only dartId is required. The other | |
| 19850 * fields are populated automatically when the ad is inserted or updated. If | |
| 19851 * targeting a region, do not target or exclude the country of the region. | |
| 19852 */ | |
| 19853 core.List<Region> regions; | |
| 19854 | |
| 19855 GeoTargeting(); | |
| 19856 | |
| 19857 GeoTargeting.fromJson(core.Map _json) { | |
| 19858 if (_json.containsKey("cities")) { | |
| 19859 cities = _json["cities"].map((value) => new City.fromJson(value)).toList()
; | |
| 19860 } | |
| 19861 if (_json.containsKey("countries")) { | |
| 19862 countries = _json["countries"].map((value) => new Country.fromJson(value))
.toList(); | |
| 19863 } | |
| 19864 if (_json.containsKey("excludeCountries")) { | |
| 19865 excludeCountries = _json["excludeCountries"]; | |
| 19866 } | |
| 19867 if (_json.containsKey("metros")) { | |
| 19868 metros = _json["metros"].map((value) => new Metro.fromJson(value)).toList(
); | |
| 19869 } | |
| 19870 if (_json.containsKey("postalCodes")) { | |
| 19871 postalCodes = _json["postalCodes"].map((value) => new PostalCode.fromJson(
value)).toList(); | |
| 19872 } | |
| 19873 if (_json.containsKey("regions")) { | |
| 19874 regions = _json["regions"].map((value) => new Region.fromJson(value)).toLi
st(); | |
| 19875 } | |
| 19876 } | |
| 19877 | |
| 19878 core.Map toJson() { | |
| 19879 var _json = new core.Map(); | |
| 19880 if (cities != null) { | |
| 19881 _json["cities"] = cities.map((value) => (value).toJson()).toList(); | |
| 19882 } | |
| 19883 if (countries != null) { | |
| 19884 _json["countries"] = countries.map((value) => (value).toJson()).toList(); | |
| 19885 } | |
| 19886 if (excludeCountries != null) { | |
| 19887 _json["excludeCountries"] = excludeCountries; | |
| 19888 } | |
| 19889 if (metros != null) { | |
| 19890 _json["metros"] = metros.map((value) => (value).toJson()).toList(); | |
| 19891 } | |
| 19892 if (postalCodes != null) { | |
| 19893 _json["postalCodes"] = postalCodes.map((value) => (value).toJson()).toList
(); | |
| 19894 } | |
| 19895 if (regions != null) { | |
| 19896 _json["regions"] = regions.map((value) => (value).toJson()).toList(); | |
| 19897 } | |
| 19898 return _json; | |
| 19899 } | |
| 19900 } | |
| 19901 | |
| 19902 /** Represents a buy from the DoubleClick Planning inventory store. */ | |
| 19903 class InventoryItem { | |
| 19904 /** Account ID of this inventory item. */ | |
| 19905 core.String accountId; | |
| 19906 /** | |
| 19907 * Ad slots of this inventory item. If this inventory item represents a | |
| 19908 * standalone placement, there will be exactly one ad slot. If this inventory | |
| 19909 * item represents a placement group, there will be more than one ad slot, | |
| 19910 * each representing one child placement in that placement group. | |
| 19911 */ | |
| 19912 core.List<AdSlot> adSlots; | |
| 19913 /** Advertiser ID of this inventory item. */ | |
| 19914 core.String advertiserId; | |
| 19915 /** Content category ID of this inventory item. */ | |
| 19916 core.String contentCategoryId; | |
| 19917 /** Estimated click-through rate of this inventory item. */ | |
| 19918 core.String estimatedClickThroughRate; | |
| 19919 /** Estimated conversion rate of this inventory item. */ | |
| 19920 core.String estimatedConversionRate; | |
| 19921 /** ID of this inventory item. */ | |
| 19922 core.String id; | |
| 19923 /** Whether this inventory item is in plan. */ | |
| 19924 core.bool inPlan; | |
| 19925 /** | |
| 19926 * Identifies what kind of resource this is. Value: the fixed string | |
| 19927 * "dfareporting#inventoryItem". | |
| 19928 */ | |
| 19929 core.String kind; | |
| 19930 /** Information about the most recent modification of this inventory item. */ | |
| 19931 LastModifiedInfo lastModifiedInfo; | |
| 19932 /** | |
| 19933 * Name of this inventory item. For standalone inventory items, this is the | |
| 19934 * same name as that of its only ad slot. For group inventory items, this can | |
| 19935 * differ from the name of any of its ad slots. | |
| 19936 */ | |
| 19937 core.String name; | |
| 19938 /** Negotiation channel ID of this inventory item. */ | |
| 19939 core.String negotiationChannelId; | |
| 19940 /** Order ID of this inventory item. */ | |
| 19941 core.String orderId; | |
| 19942 /** Placement strategy ID of this inventory item. */ | |
| 19943 core.String placementStrategyId; | |
| 19944 /** Pricing of this inventory item. */ | |
| 19945 Pricing pricing; | |
| 19946 /** Project ID of this inventory item. */ | |
| 19947 core.String projectId; | |
| 19948 /** RFP ID of this inventory item. */ | |
| 19949 core.String rfpId; | |
| 19950 /** ID of the site this inventory item is associated with. */ | |
| 19951 core.String siteId; | |
| 19952 /** Subaccount ID of this inventory item. */ | |
| 19953 core.String subaccountId; | |
| 19954 | |
| 19955 InventoryItem(); | |
| 19956 | |
| 19957 InventoryItem.fromJson(core.Map _json) { | |
| 19958 if (_json.containsKey("accountId")) { | |
| 19959 accountId = _json["accountId"]; | |
| 19960 } | |
| 19961 if (_json.containsKey("adSlots")) { | |
| 19962 adSlots = _json["adSlots"].map((value) => new AdSlot.fromJson(value)).toLi
st(); | |
| 19963 } | |
| 19964 if (_json.containsKey("advertiserId")) { | |
| 19965 advertiserId = _json["advertiserId"]; | |
| 19966 } | |
| 19967 if (_json.containsKey("contentCategoryId")) { | |
| 19968 contentCategoryId = _json["contentCategoryId"]; | |
| 19969 } | |
| 19970 if (_json.containsKey("estimatedClickThroughRate")) { | |
| 19971 estimatedClickThroughRate = _json["estimatedClickThroughRate"]; | |
| 19972 } | |
| 19973 if (_json.containsKey("estimatedConversionRate")) { | |
| 19974 estimatedConversionRate = _json["estimatedConversionRate"]; | |
| 19975 } | |
| 19976 if (_json.containsKey("id")) { | |
| 19977 id = _json["id"]; | |
| 19978 } | |
| 19979 if (_json.containsKey("inPlan")) { | |
| 19980 inPlan = _json["inPlan"]; | |
| 19981 } | |
| 19982 if (_json.containsKey("kind")) { | |
| 19983 kind = _json["kind"]; | |
| 19984 } | |
| 19985 if (_json.containsKey("lastModifiedInfo")) { | |
| 19986 lastModifiedInfo = new LastModifiedInfo.fromJson(_json["lastModifiedInfo"]
); | |
| 19987 } | |
| 19988 if (_json.containsKey("name")) { | |
| 19989 name = _json["name"]; | |
| 19990 } | |
| 19991 if (_json.containsKey("negotiationChannelId")) { | |
| 19992 negotiationChannelId = _json["negotiationChannelId"]; | |
| 19993 } | |
| 19994 if (_json.containsKey("orderId")) { | |
| 19995 orderId = _json["orderId"]; | |
| 19996 } | |
| 19997 if (_json.containsKey("placementStrategyId")) { | |
| 19998 placementStrategyId = _json["placementStrategyId"]; | |
| 19999 } | |
| 20000 if (_json.containsKey("pricing")) { | |
| 20001 pricing = new Pricing.fromJson(_json["pricing"]); | |
| 20002 } | |
| 20003 if (_json.containsKey("projectId")) { | |
| 20004 projectId = _json["projectId"]; | |
| 20005 } | |
| 20006 if (_json.containsKey("rfpId")) { | |
| 20007 rfpId = _json["rfpId"]; | |
| 20008 } | |
| 20009 if (_json.containsKey("siteId")) { | |
| 20010 siteId = _json["siteId"]; | |
| 20011 } | |
| 20012 if (_json.containsKey("subaccountId")) { | |
| 20013 subaccountId = _json["subaccountId"]; | |
| 20014 } | |
| 20015 } | |
| 20016 | |
| 20017 core.Map toJson() { | |
| 20018 var _json = new core.Map(); | |
| 20019 if (accountId != null) { | |
| 20020 _json["accountId"] = accountId; | |
| 20021 } | |
| 20022 if (adSlots != null) { | |
| 20023 _json["adSlots"] = adSlots.map((value) => (value).toJson()).toList(); | |
| 20024 } | |
| 20025 if (advertiserId != null) { | |
| 20026 _json["advertiserId"] = advertiserId; | |
| 20027 } | |
| 20028 if (contentCategoryId != null) { | |
| 20029 _json["contentCategoryId"] = contentCategoryId; | |
| 20030 } | |
| 20031 if (estimatedClickThroughRate != null) { | |
| 20032 _json["estimatedClickThroughRate"] = estimatedClickThroughRate; | |
| 20033 } | |
| 20034 if (estimatedConversionRate != null) { | |
| 20035 _json["estimatedConversionRate"] = estimatedConversionRate; | |
| 20036 } | |
| 20037 if (id != null) { | |
| 20038 _json["id"] = id; | |
| 20039 } | |
| 20040 if (inPlan != null) { | |
| 20041 _json["inPlan"] = inPlan; | |
| 20042 } | |
| 20043 if (kind != null) { | |
| 20044 _json["kind"] = kind; | |
| 20045 } | |
| 20046 if (lastModifiedInfo != null) { | |
| 20047 _json["lastModifiedInfo"] = (lastModifiedInfo).toJson(); | |
| 20048 } | |
| 20049 if (name != null) { | |
| 20050 _json["name"] = name; | |
| 20051 } | |
| 20052 if (negotiationChannelId != null) { | |
| 20053 _json["negotiationChannelId"] = negotiationChannelId; | |
| 20054 } | |
| 20055 if (orderId != null) { | |
| 20056 _json["orderId"] = orderId; | |
| 20057 } | |
| 20058 if (placementStrategyId != null) { | |
| 20059 _json["placementStrategyId"] = placementStrategyId; | |
| 20060 } | |
| 20061 if (pricing != null) { | |
| 20062 _json["pricing"] = (pricing).toJson(); | |
| 20063 } | |
| 20064 if (projectId != null) { | |
| 20065 _json["projectId"] = projectId; | |
| 20066 } | |
| 20067 if (rfpId != null) { | |
| 20068 _json["rfpId"] = rfpId; | |
| 20069 } | |
| 20070 if (siteId != null) { | |
| 20071 _json["siteId"] = siteId; | |
| 20072 } | |
| 20073 if (subaccountId != null) { | |
| 20074 _json["subaccountId"] = subaccountId; | |
| 20075 } | |
| 20076 return _json; | |
| 20077 } | |
| 20078 } | |
| 20079 | |
| 20080 /** Inventory item List Response */ | |
| 20081 class InventoryItemsListResponse { | |
| 20082 /** Inventory item collection */ | |
| 20083 core.List<InventoryItem> inventoryItems; | |
| 20084 /** | |
| 20085 * Identifies what kind of resource this is. Value: the fixed string | |
| 20086 * "dfareporting#inventoryItemsListResponse". | |
| 20087 */ | |
| 20088 core.String kind; | |
| 20089 /** Pagination token to be used for the next list operation. */ | |
| 20090 core.String nextPageToken; | |
| 20091 | |
| 20092 InventoryItemsListResponse(); | |
| 20093 | |
| 20094 InventoryItemsListResponse.fromJson(core.Map _json) { | |
| 20095 if (_json.containsKey("inventoryItems")) { | |
| 20096 inventoryItems = _json["inventoryItems"].map((value) => new InventoryItem.
fromJson(value)).toList(); | |
| 20097 } | |
| 20098 if (_json.containsKey("kind")) { | |
| 20099 kind = _json["kind"]; | |
| 20100 } | |
| 20101 if (_json.containsKey("nextPageToken")) { | |
| 20102 nextPageToken = _json["nextPageToken"]; | |
| 20103 } | |
| 20104 } | |
| 20105 | |
| 20106 core.Map toJson() { | |
| 20107 var _json = new core.Map(); | |
| 20108 if (inventoryItems != null) { | |
| 20109 _json["inventoryItems"] = inventoryItems.map((value) => (value).toJson()).
toList(); | |
| 20110 } | |
| 20111 if (kind != null) { | |
| 20112 _json["kind"] = kind; | |
| 20113 } | |
| 20114 if (nextPageToken != null) { | |
| 20115 _json["nextPageToken"] = nextPageToken; | |
| 20116 } | |
| 20117 return _json; | |
| 20118 } | |
| 20119 } | |
| 20120 | |
| 20121 /** Key Value Targeting Expression. */ | |
| 20122 class KeyValueTargetingExpression { | |
| 20123 /** Keyword expression being targeted by the ad. */ | |
| 20124 core.String expression; | |
| 20125 | |
| 20126 KeyValueTargetingExpression(); | |
| 20127 | |
| 20128 KeyValueTargetingExpression.fromJson(core.Map _json) { | |
| 20129 if (_json.containsKey("expression")) { | |
| 20130 expression = _json["expression"]; | |
| 20131 } | |
| 20132 } | |
| 20133 | |
| 20134 core.Map toJson() { | |
| 20135 var _json = new core.Map(); | |
| 20136 if (expression != null) { | |
| 20137 _json["expression"] = expression; | |
| 20138 } | |
| 20139 return _json; | |
| 20140 } | |
| 20141 } | |
| 20142 | |
| 20143 /** | |
| 20144 * Contains information about where a user's browser is taken after the user | |
| 20145 * clicks an ad. | |
| 20146 */ | |
| 20147 class LandingPage { | |
| 20148 /** | |
| 20149 * Whether or not this landing page will be assigned to any ads or creatives | |
| 20150 * that do not have a landing page assigned explicitly. Only one default | |
| 20151 * landing page is allowed per campaign. | |
| 20152 */ | |
| 20153 core.bool default_; | |
| 20154 /** ID of this landing page. This is a read-only, auto-generated field. */ | |
| 20155 core.String id; | |
| 20156 /** | |
| 20157 * Identifies what kind of resource this is. Value: the fixed string | |
| 20158 * "dfareporting#landingPage". | |
| 20159 */ | |
| 20160 core.String kind; | |
| 20161 /** | |
| 20162 * Name of this landing page. This is a required field. It must be less than | |
| 20163 * 256 characters long, and must be unique among landing pages of the same | |
| 20164 * campaign. | |
| 20165 */ | |
| 20166 core.String name; | |
| 20167 /** URL of this landing page. This is a required field. */ | |
| 20168 core.String url; | |
| 20169 | |
| 20170 LandingPage(); | |
| 20171 | |
| 20172 LandingPage.fromJson(core.Map _json) { | |
| 20173 if (_json.containsKey("default")) { | |
| 20174 default_ = _json["default"]; | |
| 20175 } | |
| 20176 if (_json.containsKey("id")) { | |
| 20177 id = _json["id"]; | |
| 20178 } | |
| 20179 if (_json.containsKey("kind")) { | |
| 20180 kind = _json["kind"]; | |
| 20181 } | |
| 20182 if (_json.containsKey("name")) { | |
| 20183 name = _json["name"]; | |
| 20184 } | |
| 20185 if (_json.containsKey("url")) { | |
| 20186 url = _json["url"]; | |
| 20187 } | |
| 20188 } | |
| 20189 | |
| 20190 core.Map toJson() { | |
| 20191 var _json = new core.Map(); | |
| 20192 if (default_ != null) { | |
| 20193 _json["default"] = default_; | |
| 20194 } | |
| 20195 if (id != null) { | |
| 20196 _json["id"] = id; | |
| 20197 } | |
| 20198 if (kind != null) { | |
| 20199 _json["kind"] = kind; | |
| 20200 } | |
| 20201 if (name != null) { | |
| 20202 _json["name"] = name; | |
| 20203 } | |
| 20204 if (url != null) { | |
| 20205 _json["url"] = url; | |
| 20206 } | |
| 20207 return _json; | |
| 20208 } | |
| 20209 } | |
| 20210 | |
| 20211 /** Landing Page List Response */ | |
| 20212 class LandingPagesListResponse { | |
| 20213 /** | |
| 20214 * Identifies what kind of resource this is. Value: the fixed string | |
| 20215 * "dfareporting#landingPagesListResponse". | |
| 20216 */ | |
| 20217 core.String kind; | |
| 20218 /** Landing page collection */ | |
| 20219 core.List<LandingPage> landingPages; | |
| 20220 | |
| 20221 LandingPagesListResponse(); | |
| 20222 | |
| 20223 LandingPagesListResponse.fromJson(core.Map _json) { | |
| 20224 if (_json.containsKey("kind")) { | |
| 20225 kind = _json["kind"]; | |
| 20226 } | |
| 20227 if (_json.containsKey("landingPages")) { | |
| 20228 landingPages = _json["landingPages"].map((value) => new LandingPage.fromJs
on(value)).toList(); | |
| 20229 } | |
| 20230 } | |
| 20231 | |
| 20232 core.Map toJson() { | |
| 20233 var _json = new core.Map(); | |
| 20234 if (kind != null) { | |
| 20235 _json["kind"] = kind; | |
| 20236 } | |
| 20237 if (landingPages != null) { | |
| 20238 _json["landingPages"] = landingPages.map((value) => (value).toJson()).toLi
st(); | |
| 20239 } | |
| 20240 return _json; | |
| 20241 } | |
| 20242 } | |
| 20243 | |
| 20244 /** Modification timestamp. */ | |
| 20245 class LastModifiedInfo { | |
| 20246 /** Timestamp of the last change in milliseconds since epoch. */ | |
| 20247 core.String time; | |
| 20248 | |
| 20249 LastModifiedInfo(); | |
| 20250 | |
| 20251 LastModifiedInfo.fromJson(core.Map _json) { | |
| 20252 if (_json.containsKey("time")) { | |
| 20253 time = _json["time"]; | |
| 20254 } | |
| 20255 } | |
| 20256 | |
| 20257 core.Map toJson() { | |
| 20258 var _json = new core.Map(); | |
| 20259 if (time != null) { | |
| 20260 _json["time"] = time; | |
| 20261 } | |
| 20262 return _json; | |
| 20263 } | |
| 20264 } | |
| 20265 | |
| 20266 /** | |
| 20267 * A group clause made up of list population terms representing constraints | |
| 20268 * joined by ORs. | |
| 20269 */ | |
| 20270 class ListPopulationClause { | |
| 20271 /** | |
| 20272 * Terms of this list population clause. Each clause is made up of list | |
| 20273 * population terms representing constraints and are joined by ORs. | |
| 20274 */ | |
| 20275 core.List<ListPopulationTerm> terms; | |
| 20276 | |
| 20277 ListPopulationClause(); | |
| 20278 | |
| 20279 ListPopulationClause.fromJson(core.Map _json) { | |
| 20280 if (_json.containsKey("terms")) { | |
| 20281 terms = _json["terms"].map((value) => new ListPopulationTerm.fromJson(valu
e)).toList(); | |
| 20282 } | |
| 20283 } | |
| 20284 | |
| 20285 core.Map toJson() { | |
| 20286 var _json = new core.Map(); | |
| 20287 if (terms != null) { | |
| 20288 _json["terms"] = terms.map((value) => (value).toJson()).toList(); | |
| 20289 } | |
| 20290 return _json; | |
| 20291 } | |
| 20292 } | |
| 20293 | |
| 20294 /** Remarketing List Population Rule. */ | |
| 20295 class ListPopulationRule { | |
| 20296 /** | |
| 20297 * Floodlight activity ID associated with this rule. This field can be left | |
| 20298 * blank. | |
| 20299 */ | |
| 20300 core.String floodlightActivityId; | |
| 20301 /** | |
| 20302 * Name of floodlight activity associated with this rule. This is a read-only, | |
| 20303 * auto-generated field. | |
| 20304 */ | |
| 20305 core.String floodlightActivityName; | |
| 20306 /** | |
| 20307 * Clauses that make up this list population rule. Clauses are joined by ANDs, | |
| 20308 * and the clauses themselves are made up of list population terms which are | |
| 20309 * joined by ORs. | |
| 20310 */ | |
| 20311 core.List<ListPopulationClause> listPopulationClauses; | |
| 20312 | |
| 20313 ListPopulationRule(); | |
| 20314 | |
| 20315 ListPopulationRule.fromJson(core.Map _json) { | |
| 20316 if (_json.containsKey("floodlightActivityId")) { | |
| 20317 floodlightActivityId = _json["floodlightActivityId"]; | |
| 20318 } | |
| 20319 if (_json.containsKey("floodlightActivityName")) { | |
| 20320 floodlightActivityName = _json["floodlightActivityName"]; | |
| 20321 } | |
| 20322 if (_json.containsKey("listPopulationClauses")) { | |
| 20323 listPopulationClauses = _json["listPopulationClauses"].map((value) => new
ListPopulationClause.fromJson(value)).toList(); | |
| 20324 } | |
| 20325 } | |
| 20326 | |
| 20327 core.Map toJson() { | |
| 20328 var _json = new core.Map(); | |
| 20329 if (floodlightActivityId != null) { | |
| 20330 _json["floodlightActivityId"] = floodlightActivityId; | |
| 20331 } | |
| 20332 if (floodlightActivityName != null) { | |
| 20333 _json["floodlightActivityName"] = floodlightActivityName; | |
| 20334 } | |
| 20335 if (listPopulationClauses != null) { | |
| 20336 _json["listPopulationClauses"] = listPopulationClauses.map((value) => (val
ue).toJson()).toList(); | |
| 20337 } | |
| 20338 return _json; | |
| 20339 } | |
| 20340 } | |
| 20341 | |
| 20342 /** Remarketing List Population Rule Term. */ | |
| 20343 class ListPopulationTerm { | |
| 20344 /** | |
| 20345 * Will be true if the term should check if the user is in the list and false | |
| 20346 * if the term should check if the user is not in the list. This field is only | |
| 20347 * relevant when type is set to LIST_MEMBERSHIP_TERM. False by default. | |
| 20348 */ | |
| 20349 core.bool contains; | |
| 20350 /** | |
| 20351 * Whether to negate the comparison result of this term during rule | |
| 20352 * evaluation. This field is only relevant when type is left unset or set to | |
| 20353 * CUSTOM_VARIABLE_TERM or REFERRER_TERM. | |
| 20354 */ | |
| 20355 core.bool negation; | |
| 20356 /** | |
| 20357 * Comparison operator of this term. This field is only relevant when type is | |
| 20358 * left unset or set to CUSTOM_VARIABLE_TERM or REFERRER_TERM. | |
| 20359 * Possible string values are: | |
| 20360 * - "NUM_EQUALS" | |
| 20361 * - "NUM_GREATER_THAN" | |
| 20362 * - "NUM_GREATER_THAN_EQUAL" | |
| 20363 * - "NUM_LESS_THAN" | |
| 20364 * - "NUM_LESS_THAN_EQUAL" | |
| 20365 * - "STRING_CONTAINS" | |
| 20366 * - "STRING_EQUALS" | |
| 20367 */ | |
| 20368 core.String operator; | |
| 20369 /** | |
| 20370 * ID of the list in question. This field is only relevant when type is set to | |
| 20371 * LIST_MEMBERSHIP_TERM. | |
| 20372 */ | |
| 20373 core.String remarketingListId; | |
| 20374 /** | |
| 20375 * List population term type determines the applicable fields in this object. | |
| 20376 * If left unset or set to CUSTOM_VARIABLE_TERM, then variableName, | |
| 20377 * variableFriendlyName, operator, value, and negation are applicable. If set | |
| 20378 * to LIST_MEMBERSHIP_TERM then remarketingListId and contains are applicable. | |
| 20379 * If set to REFERRER_TERM then operator, value, and negation are applicable. | |
| 20380 * Possible string values are: | |
| 20381 * - "CUSTOM_VARIABLE_TERM" | |
| 20382 * - "LIST_MEMBERSHIP_TERM" | |
| 20383 * - "REFERRER_TERM" | |
| 20384 */ | |
| 20385 core.String type; | |
| 20386 /** | |
| 20387 * Literal to compare the variable to. This field is only relevant when type | |
| 20388 * is left unset or set to CUSTOM_VARIABLE_TERM or REFERRER_TERM. | |
| 20389 */ | |
| 20390 core.String value; | |
| 20391 /** | |
| 20392 * Friendly name of this term's variable. This is a read-only, auto-generated | |
| 20393 * field. This field is only relevant when type is left unset or set to | |
| 20394 * CUSTOM_VARIABLE_TERM. | |
| 20395 */ | |
| 20396 core.String variableFriendlyName; | |
| 20397 /** | |
| 20398 * Name of the variable (U1, U2, etc.) being compared in this term. This field | |
| 20399 * is only relevant when type is set to null, CUSTOM_VARIABLE_TERM or | |
| 20400 * REFERRER_TERM. | |
| 20401 */ | |
| 20402 core.String variableName; | |
| 20403 | |
| 20404 ListPopulationTerm(); | |
| 20405 | |
| 20406 ListPopulationTerm.fromJson(core.Map _json) { | |
| 20407 if (_json.containsKey("contains")) { | |
| 20408 contains = _json["contains"]; | |
| 20409 } | |
| 20410 if (_json.containsKey("negation")) { | |
| 20411 negation = _json["negation"]; | |
| 20412 } | |
| 20413 if (_json.containsKey("operator")) { | |
| 20414 operator = _json["operator"]; | |
| 20415 } | |
| 20416 if (_json.containsKey("remarketingListId")) { | |
| 20417 remarketingListId = _json["remarketingListId"]; | |
| 20418 } | |
| 20419 if (_json.containsKey("type")) { | |
| 20420 type = _json["type"]; | |
| 20421 } | |
| 20422 if (_json.containsKey("value")) { | |
| 20423 value = _json["value"]; | |
| 20424 } | |
| 20425 if (_json.containsKey("variableFriendlyName")) { | |
| 20426 variableFriendlyName = _json["variableFriendlyName"]; | |
| 20427 } | |
| 20428 if (_json.containsKey("variableName")) { | |
| 20429 variableName = _json["variableName"]; | |
| 20430 } | |
| 20431 } | |
| 20432 | |
| 20433 core.Map toJson() { | |
| 20434 var _json = new core.Map(); | |
| 20435 if (contains != null) { | |
| 20436 _json["contains"] = contains; | |
| 20437 } | |
| 20438 if (negation != null) { | |
| 20439 _json["negation"] = negation; | |
| 20440 } | |
| 20441 if (operator != null) { | |
| 20442 _json["operator"] = operator; | |
| 20443 } | |
| 20444 if (remarketingListId != null) { | |
| 20445 _json["remarketingListId"] = remarketingListId; | |
| 20446 } | |
| 20447 if (type != null) { | |
| 20448 _json["type"] = type; | |
| 20449 } | |
| 20450 if (value != null) { | |
| 20451 _json["value"] = value; | |
| 20452 } | |
| 20453 if (variableFriendlyName != null) { | |
| 20454 _json["variableFriendlyName"] = variableFriendlyName; | |
| 20455 } | |
| 20456 if (variableName != null) { | |
| 20457 _json["variableName"] = variableName; | |
| 20458 } | |
| 20459 return _json; | |
| 20460 } | |
| 20461 } | |
| 20462 | |
| 20463 /** Remarketing List Targeting Expression. */ | |
| 20464 class ListTargetingExpression { | |
| 20465 /** Expression describing which lists are being targeted by the ad. */ | |
| 20466 core.String expression; | |
| 20467 | |
| 20468 ListTargetingExpression(); | |
| 20469 | |
| 20470 ListTargetingExpression.fromJson(core.Map _json) { | |
| 20471 if (_json.containsKey("expression")) { | |
| 20472 expression = _json["expression"]; | |
| 20473 } | |
| 20474 } | |
| 20475 | |
| 20476 core.Map toJson() { | |
| 20477 var _json = new core.Map(); | |
| 20478 if (expression != null) { | |
| 20479 _json["expression"] = expression; | |
| 20480 } | |
| 20481 return _json; | |
| 20482 } | |
| 20483 } | |
| 20484 | |
| 20485 /** Lookback configuration settings. */ | |
| 20486 class LookbackConfiguration { | |
| 20487 /** | |
| 20488 * Lookback window, in days, from the last time a given user clicked on one of | |
| 20489 * your ads. If you enter 0, clicks will not be considered as triggering | |
| 20490 * events for floodlight tracking. If you leave this field blank, the default | |
| 20491 * value for your account will be used. | |
| 20492 */ | |
| 20493 core.int clickDuration; | |
| 20494 /** | |
| 20495 * Lookback window, in days, from the last time a given user viewed one of | |
| 20496 * your ads. If you enter 0, impressions will not be considered as triggering | |
| 20497 * events for floodlight tracking. If you leave this field blank, the default | |
| 20498 * value for your account will be used. | |
| 20499 */ | |
| 20500 core.int postImpressionActivitiesDuration; | |
| 20501 | |
| 20502 LookbackConfiguration(); | |
| 20503 | |
| 20504 LookbackConfiguration.fromJson(core.Map _json) { | |
| 20505 if (_json.containsKey("clickDuration")) { | |
| 20506 clickDuration = _json["clickDuration"]; | |
| 20507 } | |
| 20508 if (_json.containsKey("postImpressionActivitiesDuration")) { | |
| 20509 postImpressionActivitiesDuration = _json["postImpressionActivitiesDuration
"]; | |
| 20510 } | |
| 20511 } | |
| 20512 | |
| 20513 core.Map toJson() { | |
| 20514 var _json = new core.Map(); | |
| 20515 if (clickDuration != null) { | |
| 20516 _json["clickDuration"] = clickDuration; | |
| 20517 } | |
| 20518 if (postImpressionActivitiesDuration != null) { | |
| 20519 _json["postImpressionActivitiesDuration"] = postImpressionActivitiesDurati
on; | |
| 20520 } | |
| 20521 return _json; | |
| 20522 } | |
| 20523 } | |
| 20524 | |
| 20525 /** Represents a metric. */ | |
| 20526 class Metric { | |
| 20527 /** The kind of resource this is, in this case dfareporting#metric. */ | |
| 20528 core.String kind; | |
| 20529 /** The metric name, e.g. dfa:impressions */ | |
| 20530 core.String name; | |
| 20531 | |
| 20532 Metric(); | |
| 20533 | |
| 20534 Metric.fromJson(core.Map _json) { | |
| 20535 if (_json.containsKey("kind")) { | |
| 20536 kind = _json["kind"]; | |
| 20537 } | |
| 20538 if (_json.containsKey("name")) { | |
| 20539 name = _json["name"]; | |
| 20540 } | |
| 20541 } | |
| 20542 | |
| 20543 core.Map toJson() { | |
| 20544 var _json = new core.Map(); | |
| 20545 if (kind != null) { | |
| 20546 _json["kind"] = kind; | |
| 20547 } | |
| 20548 if (name != null) { | |
| 20549 _json["name"] = name; | |
| 20550 } | |
| 20551 return _json; | |
| 20552 } | |
| 20553 } | |
| 20554 | |
| 20555 /** Contains information about a metro region that can be targeted by ads. */ | |
| 20556 class Metro { | |
| 20557 /** Country code of the country to which this metro region belongs. */ | |
| 20558 core.String countryCode; | |
| 20559 /** DART ID of the country to which this metro region belongs. */ | |
| 20560 core.String countryDartId; | |
| 20561 /** DART ID of this metro region. */ | |
| 20562 core.String dartId; | |
| 20563 /** | |
| 20564 * DMA ID of this metro region. This is the ID used for targeting and | |
| 20565 * generating reports, and is equivalent to metro_code. | |
| 20566 */ | |
| 20567 core.String dmaId; | |
| 20568 /** | |
| 20569 * Identifies what kind of resource this is. Value: the fixed string | |
| 20570 * "dfareporting#metro". | |
| 20571 */ | |
| 20572 core.String kind; | |
| 20573 /** Metro code of this metro region. This is equivalent to dma_id. */ | |
| 20574 core.String metroCode; | |
| 20575 /** Name of this metro region. */ | |
| 20576 core.String name; | |
| 20577 | |
| 20578 Metro(); | |
| 20579 | |
| 20580 Metro.fromJson(core.Map _json) { | |
| 20581 if (_json.containsKey("countryCode")) { | |
| 20582 countryCode = _json["countryCode"]; | |
| 20583 } | |
| 20584 if (_json.containsKey("countryDartId")) { | |
| 20585 countryDartId = _json["countryDartId"]; | |
| 20586 } | |
| 20587 if (_json.containsKey("dartId")) { | |
| 20588 dartId = _json["dartId"]; | |
| 20589 } | |
| 20590 if (_json.containsKey("dmaId")) { | |
| 20591 dmaId = _json["dmaId"]; | |
| 20592 } | |
| 20593 if (_json.containsKey("kind")) { | |
| 20594 kind = _json["kind"]; | |
| 20595 } | |
| 20596 if (_json.containsKey("metroCode")) { | |
| 20597 metroCode = _json["metroCode"]; | |
| 20598 } | |
| 20599 if (_json.containsKey("name")) { | |
| 20600 name = _json["name"]; | |
| 20601 } | |
| 20602 } | |
| 20603 | |
| 20604 core.Map toJson() { | |
| 20605 var _json = new core.Map(); | |
| 20606 if (countryCode != null) { | |
| 20607 _json["countryCode"] = countryCode; | |
| 20608 } | |
| 20609 if (countryDartId != null) { | |
| 20610 _json["countryDartId"] = countryDartId; | |
| 20611 } | |
| 20612 if (dartId != null) { | |
| 20613 _json["dartId"] = dartId; | |
| 20614 } | |
| 20615 if (dmaId != null) { | |
| 20616 _json["dmaId"] = dmaId; | |
| 20617 } | |
| 20618 if (kind != null) { | |
| 20619 _json["kind"] = kind; | |
| 20620 } | |
| 20621 if (metroCode != null) { | |
| 20622 _json["metroCode"] = metroCode; | |
| 20623 } | |
| 20624 if (name != null) { | |
| 20625 _json["name"] = name; | |
| 20626 } | |
| 20627 return _json; | |
| 20628 } | |
| 20629 } | |
| 20630 | |
| 20631 /** Metro List Response */ | |
| 20632 class MetrosListResponse { | |
| 20633 /** | |
| 20634 * Identifies what kind of resource this is. Value: the fixed string | |
| 20635 * "dfareporting#metrosListResponse". | |
| 20636 */ | |
| 20637 core.String kind; | |
| 20638 /** Metro collection. */ | |
| 20639 core.List<Metro> metros; | |
| 20640 | |
| 20641 MetrosListResponse(); | |
| 20642 | |
| 20643 MetrosListResponse.fromJson(core.Map _json) { | |
| 20644 if (_json.containsKey("kind")) { | |
| 20645 kind = _json["kind"]; | |
| 20646 } | |
| 20647 if (_json.containsKey("metros")) { | |
| 20648 metros = _json["metros"].map((value) => new Metro.fromJson(value)).toList(
); | |
| 20649 } | |
| 20650 } | |
| 20651 | |
| 20652 core.Map toJson() { | |
| 20653 var _json = new core.Map(); | |
| 20654 if (kind != null) { | |
| 20655 _json["kind"] = kind; | |
| 20656 } | |
| 20657 if (metros != null) { | |
| 20658 _json["metros"] = metros.map((value) => (value).toJson()).toList(); | |
| 20659 } | |
| 20660 return _json; | |
| 20661 } | |
| 20662 } | |
| 20663 | |
| 20664 /** Contains information about a mobile carrier that can be targeted by ads. */ | |
| 20665 class MobileCarrier { | |
| 20666 /** Country code of the country to which this mobile carrier belongs. */ | |
| 20667 core.String countryCode; | |
| 20668 /** DART ID of the country to which this mobile carrier belongs. */ | |
| 20669 core.String countryDartId; | |
| 20670 /** ID of this mobile carrier. */ | |
| 20671 core.String id; | |
| 20672 /** | |
| 20673 * Identifies what kind of resource this is. Value: the fixed string | |
| 20674 * "dfareporting#mobileCarrier". | |
| 20675 */ | |
| 20676 core.String kind; | |
| 20677 /** Name of this mobile carrier. */ | |
| 20678 core.String name; | |
| 20679 | |
| 20680 MobileCarrier(); | |
| 20681 | |
| 20682 MobileCarrier.fromJson(core.Map _json) { | |
| 20683 if (_json.containsKey("countryCode")) { | |
| 20684 countryCode = _json["countryCode"]; | |
| 20685 } | |
| 20686 if (_json.containsKey("countryDartId")) { | |
| 20687 countryDartId = _json["countryDartId"]; | |
| 20688 } | |
| 20689 if (_json.containsKey("id")) { | |
| 20690 id = _json["id"]; | |
| 20691 } | |
| 20692 if (_json.containsKey("kind")) { | |
| 20693 kind = _json["kind"]; | |
| 20694 } | |
| 20695 if (_json.containsKey("name")) { | |
| 20696 name = _json["name"]; | |
| 20697 } | |
| 20698 } | |
| 20699 | |
| 20700 core.Map toJson() { | |
| 20701 var _json = new core.Map(); | |
| 20702 if (countryCode != null) { | |
| 20703 _json["countryCode"] = countryCode; | |
| 20704 } | |
| 20705 if (countryDartId != null) { | |
| 20706 _json["countryDartId"] = countryDartId; | |
| 20707 } | |
| 20708 if (id != null) { | |
| 20709 _json["id"] = id; | |
| 20710 } | |
| 20711 if (kind != null) { | |
| 20712 _json["kind"] = kind; | |
| 20713 } | |
| 20714 if (name != null) { | |
| 20715 _json["name"] = name; | |
| 20716 } | |
| 20717 return _json; | |
| 20718 } | |
| 20719 } | |
| 20720 | |
| 20721 /** Mobile Carrier List Response */ | |
| 20722 class MobileCarriersListResponse { | |
| 20723 /** | |
| 20724 * Identifies what kind of resource this is. Value: the fixed string | |
| 20725 * "dfareporting#mobileCarriersListResponse". | |
| 20726 */ | |
| 20727 core.String kind; | |
| 20728 /** Mobile carrier collection. */ | |
| 20729 core.List<MobileCarrier> mobileCarriers; | |
| 20730 | |
| 20731 MobileCarriersListResponse(); | |
| 20732 | |
| 20733 MobileCarriersListResponse.fromJson(core.Map _json) { | |
| 20734 if (_json.containsKey("kind")) { | |
| 20735 kind = _json["kind"]; | |
| 20736 } | |
| 20737 if (_json.containsKey("mobileCarriers")) { | |
| 20738 mobileCarriers = _json["mobileCarriers"].map((value) => new MobileCarrier.
fromJson(value)).toList(); | |
| 20739 } | |
| 20740 } | |
| 20741 | |
| 20742 core.Map toJson() { | |
| 20743 var _json = new core.Map(); | |
| 20744 if (kind != null) { | |
| 20745 _json["kind"] = kind; | |
| 20746 } | |
| 20747 if (mobileCarriers != null) { | |
| 20748 _json["mobileCarriers"] = mobileCarriers.map((value) => (value).toJson()).
toList(); | |
| 20749 } | |
| 20750 return _json; | |
| 20751 } | |
| 20752 } | |
| 20753 | |
| 20754 /** Object Filter. */ | |
| 20755 class ObjectFilter { | |
| 20756 /** | |
| 20757 * Identifies what kind of resource this is. Value: the fixed string | |
| 20758 * "dfareporting#objectFilter". | |
| 20759 */ | |
| 20760 core.String kind; | |
| 20761 /** | |
| 20762 * Applicable when status is ASSIGNED. The user has access to objects with | |
| 20763 * these object IDs. | |
| 20764 */ | |
| 20765 core.List<core.String> objectIds; | |
| 20766 /** | |
| 20767 * Status of the filter. NONE means the user has access to none of the | |
| 20768 * objects. ALL means the user has access to all objects. ASSIGNED means the | |
| 20769 * user has access to the objects with IDs in the objectIds list. | |
| 20770 * Possible string values are: | |
| 20771 * - "ALL" | |
| 20772 * - "ASSIGNED" | |
| 20773 * - "NONE" | |
| 20774 */ | |
| 20775 core.String status; | |
| 20776 | |
| 20777 ObjectFilter(); | |
| 20778 | |
| 20779 ObjectFilter.fromJson(core.Map _json) { | |
| 20780 if (_json.containsKey("kind")) { | |
| 20781 kind = _json["kind"]; | |
| 20782 } | |
| 20783 if (_json.containsKey("objectIds")) { | |
| 20784 objectIds = _json["objectIds"]; | |
| 20785 } | |
| 20786 if (_json.containsKey("status")) { | |
| 20787 status = _json["status"]; | |
| 20788 } | |
| 20789 } | |
| 20790 | |
| 20791 core.Map toJson() { | |
| 20792 var _json = new core.Map(); | |
| 20793 if (kind != null) { | |
| 20794 _json["kind"] = kind; | |
| 20795 } | |
| 20796 if (objectIds != null) { | |
| 20797 _json["objectIds"] = objectIds; | |
| 20798 } | |
| 20799 if (status != null) { | |
| 20800 _json["status"] = status; | |
| 20801 } | |
| 20802 return _json; | |
| 20803 } | |
| 20804 } | |
| 20805 | |
| 20806 /** Offset Position. */ | |
| 20807 class OffsetPosition { | |
| 20808 /** Offset distance from left side of an asset or a window. */ | |
| 20809 core.int left; | |
| 20810 /** Offset distance from top side of an asset or a window. */ | |
| 20811 core.int top; | |
| 20812 | |
| 20813 OffsetPosition(); | |
| 20814 | |
| 20815 OffsetPosition.fromJson(core.Map _json) { | |
| 20816 if (_json.containsKey("left")) { | |
| 20817 left = _json["left"]; | |
| 20818 } | |
| 20819 if (_json.containsKey("top")) { | |
| 20820 top = _json["top"]; | |
| 20821 } | |
| 20822 } | |
| 20823 | |
| 20824 core.Map toJson() { | |
| 20825 var _json = new core.Map(); | |
| 20826 if (left != null) { | |
| 20827 _json["left"] = left; | |
| 20828 } | |
| 20829 if (top != null) { | |
| 20830 _json["top"] = top; | |
| 20831 } | |
| 20832 return _json; | |
| 20833 } | |
| 20834 } | |
| 20835 | |
| 20836 /** Omniture Integration Settings. */ | |
| 20837 class OmnitureSettings { | |
| 20838 /** | |
| 20839 * Whether placement cost data will be sent to Omniture. This property can be | |
| 20840 * enabled only if omnitureIntegrationEnabled is true. | |
| 20841 */ | |
| 20842 core.bool omnitureCostDataEnabled; | |
| 20843 /** | |
| 20844 * Whether Omniture integration is enabled. This property can be enabled only | |
| 20845 * when the "Advanced Ad Serving" account setting is enabled. | |
| 20846 */ | |
| 20847 core.bool omnitureIntegrationEnabled; | |
| 20848 | |
| 20849 OmnitureSettings(); | |
| 20850 | |
| 20851 OmnitureSettings.fromJson(core.Map _json) { | |
| 20852 if (_json.containsKey("omnitureCostDataEnabled")) { | |
| 20853 omnitureCostDataEnabled = _json["omnitureCostDataEnabled"]; | |
| 20854 } | |
| 20855 if (_json.containsKey("omnitureIntegrationEnabled")) { | |
| 20856 omnitureIntegrationEnabled = _json["omnitureIntegrationEnabled"]; | |
| 20857 } | |
| 20858 } | |
| 20859 | |
| 20860 core.Map toJson() { | |
| 20861 var _json = new core.Map(); | |
| 20862 if (omnitureCostDataEnabled != null) { | |
| 20863 _json["omnitureCostDataEnabled"] = omnitureCostDataEnabled; | |
| 20864 } | |
| 20865 if (omnitureIntegrationEnabled != null) { | |
| 20866 _json["omnitureIntegrationEnabled"] = omnitureIntegrationEnabled; | |
| 20867 } | |
| 20868 return _json; | |
| 20869 } | |
| 20870 } | |
| 20871 | |
| 20872 /** | |
| 20873 * Contains information about an operating system that can be targeted by ads. | |
| 20874 */ | |
| 20875 class OperatingSystem { | |
| 20876 /** DART ID of this operating system. This is the ID used for targeting. */ | |
| 20877 core.String dartId; | |
| 20878 /** Whether this operating system is for desktop. */ | |
| 20879 core.bool desktop; | |
| 20880 /** | |
| 20881 * Identifies what kind of resource this is. Value: the fixed string | |
| 20882 * "dfareporting#operatingSystem". | |
| 20883 */ | |
| 20884 core.String kind; | |
| 20885 /** Whether this operating system is for mobile. */ | |
| 20886 core.bool mobile; | |
| 20887 /** Name of this operating system. */ | |
| 20888 core.String name; | |
| 20889 | |
| 20890 OperatingSystem(); | |
| 20891 | |
| 20892 OperatingSystem.fromJson(core.Map _json) { | |
| 20893 if (_json.containsKey("dartId")) { | |
| 20894 dartId = _json["dartId"]; | |
| 20895 } | |
| 20896 if (_json.containsKey("desktop")) { | |
| 20897 desktop = _json["desktop"]; | |
| 20898 } | |
| 20899 if (_json.containsKey("kind")) { | |
| 20900 kind = _json["kind"]; | |
| 20901 } | |
| 20902 if (_json.containsKey("mobile")) { | |
| 20903 mobile = _json["mobile"]; | |
| 20904 } | |
| 20905 if (_json.containsKey("name")) { | |
| 20906 name = _json["name"]; | |
| 20907 } | |
| 20908 } | |
| 20909 | |
| 20910 core.Map toJson() { | |
| 20911 var _json = new core.Map(); | |
| 20912 if (dartId != null) { | |
| 20913 _json["dartId"] = dartId; | |
| 20914 } | |
| 20915 if (desktop != null) { | |
| 20916 _json["desktop"] = desktop; | |
| 20917 } | |
| 20918 if (kind != null) { | |
| 20919 _json["kind"] = kind; | |
| 20920 } | |
| 20921 if (mobile != null) { | |
| 20922 _json["mobile"] = mobile; | |
| 20923 } | |
| 20924 if (name != null) { | |
| 20925 _json["name"] = name; | |
| 20926 } | |
| 20927 return _json; | |
| 20928 } | |
| 20929 } | |
| 20930 | |
| 20931 /** | |
| 20932 * Contains information about a particular version of an operating system that | |
| 20933 * can be targeted by ads. | |
| 20934 */ | |
| 20935 class OperatingSystemVersion { | |
| 20936 /** ID of this operating system version. */ | |
| 20937 core.String id; | |
| 20938 /** | |
| 20939 * Identifies what kind of resource this is. Value: the fixed string | |
| 20940 * "dfareporting#operatingSystemVersion". | |
| 20941 */ | |
| 20942 core.String kind; | |
| 20943 /** Major version (leftmost number) of this operating system version. */ | |
| 20944 core.String majorVersion; | |
| 20945 /** | |
| 20946 * Minor version (number after the first dot) of this operating system | |
| 20947 * version. | |
| 20948 */ | |
| 20949 core.String minorVersion; | |
| 20950 /** Name of this operating system version. */ | |
| 20951 core.String name; | |
| 20952 /** Operating system of this operating system version. */ | |
| 20953 OperatingSystem operatingSystem; | |
| 20954 | |
| 20955 OperatingSystemVersion(); | |
| 20956 | |
| 20957 OperatingSystemVersion.fromJson(core.Map _json) { | |
| 20958 if (_json.containsKey("id")) { | |
| 20959 id = _json["id"]; | |
| 20960 } | |
| 20961 if (_json.containsKey("kind")) { | |
| 20962 kind = _json["kind"]; | |
| 20963 } | |
| 20964 if (_json.containsKey("majorVersion")) { | |
| 20965 majorVersion = _json["majorVersion"]; | |
| 20966 } | |
| 20967 if (_json.containsKey("minorVersion")) { | |
| 20968 minorVersion = _json["minorVersion"]; | |
| 20969 } | |
| 20970 if (_json.containsKey("name")) { | |
| 20971 name = _json["name"]; | |
| 20972 } | |
| 20973 if (_json.containsKey("operatingSystem")) { | |
| 20974 operatingSystem = new OperatingSystem.fromJson(_json["operatingSystem"]); | |
| 20975 } | |
| 20976 } | |
| 20977 | |
| 20978 core.Map toJson() { | |
| 20979 var _json = new core.Map(); | |
| 20980 if (id != null) { | |
| 20981 _json["id"] = id; | |
| 20982 } | |
| 20983 if (kind != null) { | |
| 20984 _json["kind"] = kind; | |
| 20985 } | |
| 20986 if (majorVersion != null) { | |
| 20987 _json["majorVersion"] = majorVersion; | |
| 20988 } | |
| 20989 if (minorVersion != null) { | |
| 20990 _json["minorVersion"] = minorVersion; | |
| 20991 } | |
| 20992 if (name != null) { | |
| 20993 _json["name"] = name; | |
| 20994 } | |
| 20995 if (operatingSystem != null) { | |
| 20996 _json["operatingSystem"] = (operatingSystem).toJson(); | |
| 20997 } | |
| 20998 return _json; | |
| 20999 } | |
| 21000 } | |
| 21001 | |
| 21002 /** Operating System Version List Response */ | |
| 21003 class OperatingSystemVersionsListResponse { | |
| 21004 /** | |
| 21005 * Identifies what kind of resource this is. Value: the fixed string | |
| 21006 * "dfareporting#operatingSystemVersionsListResponse". | |
| 21007 */ | |
| 21008 core.String kind; | |
| 21009 /** Operating system version collection. */ | |
| 21010 core.List<OperatingSystemVersion> operatingSystemVersions; | |
| 21011 | |
| 21012 OperatingSystemVersionsListResponse(); | |
| 21013 | |
| 21014 OperatingSystemVersionsListResponse.fromJson(core.Map _json) { | |
| 21015 if (_json.containsKey("kind")) { | |
| 21016 kind = _json["kind"]; | |
| 21017 } | |
| 21018 if (_json.containsKey("operatingSystemVersions")) { | |
| 21019 operatingSystemVersions = _json["operatingSystemVersions"].map((value) =>
new OperatingSystemVersion.fromJson(value)).toList(); | |
| 21020 } | |
| 21021 } | |
| 21022 | |
| 21023 core.Map toJson() { | |
| 21024 var _json = new core.Map(); | |
| 21025 if (kind != null) { | |
| 21026 _json["kind"] = kind; | |
| 21027 } | |
| 21028 if (operatingSystemVersions != null) { | |
| 21029 _json["operatingSystemVersions"] = operatingSystemVersions.map((value) =>
(value).toJson()).toList(); | |
| 21030 } | |
| 21031 return _json; | |
| 21032 } | |
| 21033 } | |
| 21034 | |
| 21035 /** Operating System List Response */ | |
| 21036 class OperatingSystemsListResponse { | |
| 21037 /** | |
| 21038 * Identifies what kind of resource this is. Value: the fixed string | |
| 21039 * "dfareporting#operatingSystemsListResponse". | |
| 21040 */ | |
| 21041 core.String kind; | |
| 21042 /** Operating system collection. */ | |
| 21043 core.List<OperatingSystem> operatingSystems; | |
| 21044 | |
| 21045 OperatingSystemsListResponse(); | |
| 21046 | |
| 21047 OperatingSystemsListResponse.fromJson(core.Map _json) { | |
| 21048 if (_json.containsKey("kind")) { | |
| 21049 kind = _json["kind"]; | |
| 21050 } | |
| 21051 if (_json.containsKey("operatingSystems")) { | |
| 21052 operatingSystems = _json["operatingSystems"].map((value) => new OperatingS
ystem.fromJson(value)).toList(); | |
| 21053 } | |
| 21054 } | |
| 21055 | |
| 21056 core.Map toJson() { | |
| 21057 var _json = new core.Map(); | |
| 21058 if (kind != null) { | |
| 21059 _json["kind"] = kind; | |
| 21060 } | |
| 21061 if (operatingSystems != null) { | |
| 21062 _json["operatingSystems"] = operatingSystems.map((value) => (value).toJson
()).toList(); | |
| 21063 } | |
| 21064 return _json; | |
| 21065 } | |
| 21066 } | |
| 21067 | |
| 21068 /** Creative optimization activity. */ | |
| 21069 class OptimizationActivity { | |
| 21070 /** | |
| 21071 * Floodlight activity ID of this optimization activity. This is a required | |
| 21072 * field. | |
| 21073 */ | |
| 21074 core.String floodlightActivityId; | |
| 21075 /** | |
| 21076 * Dimension value for the ID of the floodlight activity. This is a read-only, | |
| 21077 * auto-generated field. | |
| 21078 */ | |
| 21079 DimensionValue floodlightActivityIdDimensionValue; | |
| 21080 /** | |
| 21081 * Weight associated with this optimization. Must be greater than 1. The | |
| 21082 * weight assigned will be understood in proportion to the weights assigned to | |
| 21083 * the other optimization activities. | |
| 21084 */ | |
| 21085 core.int weight; | |
| 21086 | |
| 21087 OptimizationActivity(); | |
| 21088 | |
| 21089 OptimizationActivity.fromJson(core.Map _json) { | |
| 21090 if (_json.containsKey("floodlightActivityId")) { | |
| 21091 floodlightActivityId = _json["floodlightActivityId"]; | |
| 21092 } | |
| 21093 if (_json.containsKey("floodlightActivityIdDimensionValue")) { | |
| 21094 floodlightActivityIdDimensionValue = new DimensionValue.fromJson(_json["fl
oodlightActivityIdDimensionValue"]); | |
| 21095 } | |
| 21096 if (_json.containsKey("weight")) { | |
| 21097 weight = _json["weight"]; | |
| 21098 } | |
| 21099 } | |
| 21100 | |
| 21101 core.Map toJson() { | |
| 21102 var _json = new core.Map(); | |
| 21103 if (floodlightActivityId != null) { | |
| 21104 _json["floodlightActivityId"] = floodlightActivityId; | |
| 21105 } | |
| 21106 if (floodlightActivityIdDimensionValue != null) { | |
| 21107 _json["floodlightActivityIdDimensionValue"] = (floodlightActivityIdDimensi
onValue).toJson(); | |
| 21108 } | |
| 21109 if (weight != null) { | |
| 21110 _json["weight"] = weight; | |
| 21111 } | |
| 21112 return _json; | |
| 21113 } | |
| 21114 } | |
| 21115 | |
| 21116 /** Describes properties of a DoubleClick Planning order. */ | |
| 21117 class Order { | |
| 21118 /** Account ID of this order. */ | |
| 21119 core.String accountId; | |
| 21120 /** Advertiser ID of this order. */ | |
| 21121 core.String advertiserId; | |
| 21122 /** IDs for users that have to approve documents created for this order. */ | |
| 21123 core.List<core.String> approverUserProfileIds; | |
| 21124 /** Buyer invoice ID associated with this order. */ | |
| 21125 core.String buyerInvoiceId; | |
| 21126 /** Name of the buyer organization. */ | |
| 21127 core.String buyerOrganizationName; | |
| 21128 /** Comments in this order. */ | |
| 21129 core.String comments; | |
| 21130 /** Contacts for this order. */ | |
| 21131 core.List<OrderContact> contacts; | |
| 21132 /** ID of this order. This is a read-only, auto-generated field. */ | |
| 21133 core.String id; | |
| 21134 /** | |
| 21135 * Identifies what kind of resource this is. Value: the fixed string | |
| 21136 * "dfareporting#order". | |
| 21137 */ | |
| 21138 core.String kind; | |
| 21139 /** Information about the most recent modification of this order. */ | |
| 21140 LastModifiedInfo lastModifiedInfo; | |
| 21141 /** Name of this order. */ | |
| 21142 core.String name; | |
| 21143 /** Notes of this order. */ | |
| 21144 core.String notes; | |
| 21145 /** ID of the terms and conditions template used in this order. */ | |
| 21146 core.String planningTermId; | |
| 21147 /** Project ID of this order. */ | |
| 21148 core.String projectId; | |
| 21149 /** Seller order ID associated with this order. */ | |
| 21150 core.String sellerOrderId; | |
| 21151 /** Name of the seller organization. */ | |
| 21152 core.String sellerOrganizationName; | |
| 21153 /** Site IDs this order is associated with. */ | |
| 21154 core.List<core.String> siteId; | |
| 21155 /** Free-form site names this order is associated with. */ | |
| 21156 core.List<core.String> siteNames; | |
| 21157 /** Subaccount ID of this order. */ | |
| 21158 core.String subaccountId; | |
| 21159 /** Terms and conditions of this order. */ | |
| 21160 core.String termsAndConditions; | |
| 21161 | |
| 21162 Order(); | |
| 21163 | |
| 21164 Order.fromJson(core.Map _json) { | |
| 21165 if (_json.containsKey("accountId")) { | |
| 21166 accountId = _json["accountId"]; | |
| 21167 } | |
| 21168 if (_json.containsKey("advertiserId")) { | |
| 21169 advertiserId = _json["advertiserId"]; | |
| 21170 } | |
| 21171 if (_json.containsKey("approverUserProfileIds")) { | |
| 21172 approverUserProfileIds = _json["approverUserProfileIds"]; | |
| 21173 } | |
| 21174 if (_json.containsKey("buyerInvoiceId")) { | |
| 21175 buyerInvoiceId = _json["buyerInvoiceId"]; | |
| 21176 } | |
| 21177 if (_json.containsKey("buyerOrganizationName")) { | |
| 21178 buyerOrganizationName = _json["buyerOrganizationName"]; | |
| 21179 } | |
| 21180 if (_json.containsKey("comments")) { | |
| 21181 comments = _json["comments"]; | |
| 21182 } | |
| 21183 if (_json.containsKey("contacts")) { | |
| 21184 contacts = _json["contacts"].map((value) => new OrderContact.fromJson(valu
e)).toList(); | |
| 21185 } | |
| 21186 if (_json.containsKey("id")) { | |
| 21187 id = _json["id"]; | |
| 21188 } | |
| 21189 if (_json.containsKey("kind")) { | |
| 21190 kind = _json["kind"]; | |
| 21191 } | |
| 21192 if (_json.containsKey("lastModifiedInfo")) { | |
| 21193 lastModifiedInfo = new LastModifiedInfo.fromJson(_json["lastModifiedInfo"]
); | |
| 21194 } | |
| 21195 if (_json.containsKey("name")) { | |
| 21196 name = _json["name"]; | |
| 21197 } | |
| 21198 if (_json.containsKey("notes")) { | |
| 21199 notes = _json["notes"]; | |
| 21200 } | |
| 21201 if (_json.containsKey("planningTermId")) { | |
| 21202 planningTermId = _json["planningTermId"]; | |
| 21203 } | |
| 21204 if (_json.containsKey("projectId")) { | |
| 21205 projectId = _json["projectId"]; | |
| 21206 } | |
| 21207 if (_json.containsKey("sellerOrderId")) { | |
| 21208 sellerOrderId = _json["sellerOrderId"]; | |
| 21209 } | |
| 21210 if (_json.containsKey("sellerOrganizationName")) { | |
| 21211 sellerOrganizationName = _json["sellerOrganizationName"]; | |
| 21212 } | |
| 21213 if (_json.containsKey("siteId")) { | |
| 21214 siteId = _json["siteId"]; | |
| 21215 } | |
| 21216 if (_json.containsKey("siteNames")) { | |
| 21217 siteNames = _json["siteNames"]; | |
| 21218 } | |
| 21219 if (_json.containsKey("subaccountId")) { | |
| 21220 subaccountId = _json["subaccountId"]; | |
| 21221 } | |
| 21222 if (_json.containsKey("termsAndConditions")) { | |
| 21223 termsAndConditions = _json["termsAndConditions"]; | |
| 21224 } | |
| 21225 } | |
| 21226 | |
| 21227 core.Map toJson() { | |
| 21228 var _json = new core.Map(); | |
| 21229 if (accountId != null) { | |
| 21230 _json["accountId"] = accountId; | |
| 21231 } | |
| 21232 if (advertiserId != null) { | |
| 21233 _json["advertiserId"] = advertiserId; | |
| 21234 } | |
| 21235 if (approverUserProfileIds != null) { | |
| 21236 _json["approverUserProfileIds"] = approverUserProfileIds; | |
| 21237 } | |
| 21238 if (buyerInvoiceId != null) { | |
| 21239 _json["buyerInvoiceId"] = buyerInvoiceId; | |
| 21240 } | |
| 21241 if (buyerOrganizationName != null) { | |
| 21242 _json["buyerOrganizationName"] = buyerOrganizationName; | |
| 21243 } | |
| 21244 if (comments != null) { | |
| 21245 _json["comments"] = comments; | |
| 21246 } | |
| 21247 if (contacts != null) { | |
| 21248 _json["contacts"] = contacts.map((value) => (value).toJson()).toList(); | |
| 21249 } | |
| 21250 if (id != null) { | |
| 21251 _json["id"] = id; | |
| 21252 } | |
| 21253 if (kind != null) { | |
| 21254 _json["kind"] = kind; | |
| 21255 } | |
| 21256 if (lastModifiedInfo != null) { | |
| 21257 _json["lastModifiedInfo"] = (lastModifiedInfo).toJson(); | |
| 21258 } | |
| 21259 if (name != null) { | |
| 21260 _json["name"] = name; | |
| 21261 } | |
| 21262 if (notes != null) { | |
| 21263 _json["notes"] = notes; | |
| 21264 } | |
| 21265 if (planningTermId != null) { | |
| 21266 _json["planningTermId"] = planningTermId; | |
| 21267 } | |
| 21268 if (projectId != null) { | |
| 21269 _json["projectId"] = projectId; | |
| 21270 } | |
| 21271 if (sellerOrderId != null) { | |
| 21272 _json["sellerOrderId"] = sellerOrderId; | |
| 21273 } | |
| 21274 if (sellerOrganizationName != null) { | |
| 21275 _json["sellerOrganizationName"] = sellerOrganizationName; | |
| 21276 } | |
| 21277 if (siteId != null) { | |
| 21278 _json["siteId"] = siteId; | |
| 21279 } | |
| 21280 if (siteNames != null) { | |
| 21281 _json["siteNames"] = siteNames; | |
| 21282 } | |
| 21283 if (subaccountId != null) { | |
| 21284 _json["subaccountId"] = subaccountId; | |
| 21285 } | |
| 21286 if (termsAndConditions != null) { | |
| 21287 _json["termsAndConditions"] = termsAndConditions; | |
| 21288 } | |
| 21289 return _json; | |
| 21290 } | |
| 21291 } | |
| 21292 | |
| 21293 /** Contact of an order. */ | |
| 21294 class OrderContact { | |
| 21295 /** | |
| 21296 * Free-form information about this contact. It could be any information | |
| 21297 * related to this contact in addition to type, title, name, and signature | |
| 21298 * user profile ID. | |
| 21299 */ | |
| 21300 core.String contactInfo; | |
| 21301 /** Name of this contact. */ | |
| 21302 core.String contactName; | |
| 21303 /** Title of this contact. */ | |
| 21304 core.String contactTitle; | |
| 21305 /** | |
| 21306 * Type of this contact. | |
| 21307 * Possible string values are: | |
| 21308 * - "PLANNING_ORDER_CONTACT_BUYER_BILLING_CONTACT" | |
| 21309 * - "PLANNING_ORDER_CONTACT_BUYER_CONTACT" | |
| 21310 * - "PLANNING_ORDER_CONTACT_SELLER_CONTACT" | |
| 21311 */ | |
| 21312 core.String contactType; | |
| 21313 /** | |
| 21314 * ID of the user profile containing the signature that will be embedded into | |
| 21315 * order documents. | |
| 21316 */ | |
| 21317 core.String signatureUserProfileId; | |
| 21318 | |
| 21319 OrderContact(); | |
| 21320 | |
| 21321 OrderContact.fromJson(core.Map _json) { | |
| 21322 if (_json.containsKey("contactInfo")) { | |
| 21323 contactInfo = _json["contactInfo"]; | |
| 21324 } | |
| 21325 if (_json.containsKey("contactName")) { | |
| 21326 contactName = _json["contactName"]; | |
| 21327 } | |
| 21328 if (_json.containsKey("contactTitle")) { | |
| 21329 contactTitle = _json["contactTitle"]; | |
| 21330 } | |
| 21331 if (_json.containsKey("contactType")) { | |
| 21332 contactType = _json["contactType"]; | |
| 21333 } | |
| 21334 if (_json.containsKey("signatureUserProfileId")) { | |
| 21335 signatureUserProfileId = _json["signatureUserProfileId"]; | |
| 21336 } | |
| 21337 } | |
| 21338 | |
| 21339 core.Map toJson() { | |
| 21340 var _json = new core.Map(); | |
| 21341 if (contactInfo != null) { | |
| 21342 _json["contactInfo"] = contactInfo; | |
| 21343 } | |
| 21344 if (contactName != null) { | |
| 21345 _json["contactName"] = contactName; | |
| 21346 } | |
| 21347 if (contactTitle != null) { | |
| 21348 _json["contactTitle"] = contactTitle; | |
| 21349 } | |
| 21350 if (contactType != null) { | |
| 21351 _json["contactType"] = contactType; | |
| 21352 } | |
| 21353 if (signatureUserProfileId != null) { | |
| 21354 _json["signatureUserProfileId"] = signatureUserProfileId; | |
| 21355 } | |
| 21356 return _json; | |
| 21357 } | |
| 21358 } | |
| 21359 | |
| 21360 /** Contains properties of a DoubleClick Planning order document. */ | |
| 21361 class OrderDocument { | |
| 21362 /** Account ID of this order document. */ | |
| 21363 core.String accountId; | |
| 21364 /** Advertiser ID of this order document. */ | |
| 21365 core.String advertiserId; | |
| 21366 /** | |
| 21367 * The amended order document ID of this order document. An order document can | |
| 21368 * be created by optionally amending another order document so that the change | |
| 21369 * history can be preserved. | |
| 21370 */ | |
| 21371 core.String amendedOrderDocumentId; | |
| 21372 /** IDs of users who have approved this order document. */ | |
| 21373 core.List<core.String> approvedByUserProfileIds; | |
| 21374 /** Whether this order document is cancelled. */ | |
| 21375 core.bool cancelled; | |
| 21376 /** Information about the creation of this order document. */ | |
| 21377 LastModifiedInfo createdInfo; | |
| 21378 /** Effective date of this order document. */ | |
| 21379 core.DateTime effectiveDate; | |
| 21380 /** ID of this order document. */ | |
| 21381 core.String id; | |
| 21382 /** | |
| 21383 * Identifies what kind of resource this is. Value: the fixed string | |
| 21384 * "dfareporting#orderDocument". | |
| 21385 */ | |
| 21386 core.String kind; | |
| 21387 /** List of email addresses that received the last sent document. */ | |
| 21388 core.List<core.String> lastSentRecipients; | |
| 21389 /** Timestamp of the last email sent with this order document. */ | |
| 21390 core.DateTime lastSentTime; | |
| 21391 /** ID of the order from which this order document is created. */ | |
| 21392 core.String orderId; | |
| 21393 /** Project ID of this order document. */ | |
| 21394 core.String projectId; | |
| 21395 /** Whether this order document has been signed. */ | |
| 21396 core.bool signed; | |
| 21397 /** Subaccount ID of this order document. */ | |
| 21398 core.String subaccountId; | |
| 21399 /** Title of this order document. */ | |
| 21400 core.String title; | |
| 21401 /** | |
| 21402 * Type of this order document | |
| 21403 * Possible string values are: | |
| 21404 * - "PLANNING_ORDER_TYPE_CHANGE_ORDER" | |
| 21405 * - "PLANNING_ORDER_TYPE_INSERTION_ORDER" | |
| 21406 */ | |
| 21407 core.String type; | |
| 21408 | |
| 21409 OrderDocument(); | |
| 21410 | |
| 21411 OrderDocument.fromJson(core.Map _json) { | |
| 21412 if (_json.containsKey("accountId")) { | |
| 21413 accountId = _json["accountId"]; | |
| 21414 } | |
| 21415 if (_json.containsKey("advertiserId")) { | |
| 21416 advertiserId = _json["advertiserId"]; | |
| 21417 } | |
| 21418 if (_json.containsKey("amendedOrderDocumentId")) { | |
| 21419 amendedOrderDocumentId = _json["amendedOrderDocumentId"]; | |
| 21420 } | |
| 21421 if (_json.containsKey("approvedByUserProfileIds")) { | |
| 21422 approvedByUserProfileIds = _json["approvedByUserProfileIds"]; | |
| 21423 } | |
| 21424 if (_json.containsKey("cancelled")) { | |
| 21425 cancelled = _json["cancelled"]; | |
| 21426 } | |
| 21427 if (_json.containsKey("createdInfo")) { | |
| 21428 createdInfo = new LastModifiedInfo.fromJson(_json["createdInfo"]); | |
| 21429 } | |
| 21430 if (_json.containsKey("effectiveDate")) { | |
| 21431 effectiveDate = core.DateTime.parse(_json["effectiveDate"]); | |
| 21432 } | |
| 21433 if (_json.containsKey("id")) { | |
| 21434 id = _json["id"]; | |
| 21435 } | |
| 21436 if (_json.containsKey("kind")) { | |
| 21437 kind = _json["kind"]; | |
| 21438 } | |
| 21439 if (_json.containsKey("lastSentRecipients")) { | |
| 21440 lastSentRecipients = _json["lastSentRecipients"]; | |
| 21441 } | |
| 21442 if (_json.containsKey("lastSentTime")) { | |
| 21443 lastSentTime = core.DateTime.parse(_json["lastSentTime"]); | |
| 21444 } | |
| 21445 if (_json.containsKey("orderId")) { | |
| 21446 orderId = _json["orderId"]; | |
| 21447 } | |
| 21448 if (_json.containsKey("projectId")) { | |
| 21449 projectId = _json["projectId"]; | |
| 21450 } | |
| 21451 if (_json.containsKey("signed")) { | |
| 21452 signed = _json["signed"]; | |
| 21453 } | |
| 21454 if (_json.containsKey("subaccountId")) { | |
| 21455 subaccountId = _json["subaccountId"]; | |
| 21456 } | |
| 21457 if (_json.containsKey("title")) { | |
| 21458 title = _json["title"]; | |
| 21459 } | |
| 21460 if (_json.containsKey("type")) { | |
| 21461 type = _json["type"]; | |
| 21462 } | |
| 21463 } | |
| 21464 | |
| 21465 core.Map toJson() { | |
| 21466 var _json = new core.Map(); | |
| 21467 if (accountId != null) { | |
| 21468 _json["accountId"] = accountId; | |
| 21469 } | |
| 21470 if (advertiserId != null) { | |
| 21471 _json["advertiserId"] = advertiserId; | |
| 21472 } | |
| 21473 if (amendedOrderDocumentId != null) { | |
| 21474 _json["amendedOrderDocumentId"] = amendedOrderDocumentId; | |
| 21475 } | |
| 21476 if (approvedByUserProfileIds != null) { | |
| 21477 _json["approvedByUserProfileIds"] = approvedByUserProfileIds; | |
| 21478 } | |
| 21479 if (cancelled != null) { | |
| 21480 _json["cancelled"] = cancelled; | |
| 21481 } | |
| 21482 if (createdInfo != null) { | |
| 21483 _json["createdInfo"] = (createdInfo).toJson(); | |
| 21484 } | |
| 21485 if (effectiveDate != null) { | |
| 21486 _json["effectiveDate"] = "${(effectiveDate).year.toString().padLeft(4, '0'
)}-${(effectiveDate).month.toString().padLeft(2, '0')}-${(effectiveDate).day.toS
tring().padLeft(2, '0')}"; | |
| 21487 } | |
| 21488 if (id != null) { | |
| 21489 _json["id"] = id; | |
| 21490 } | |
| 21491 if (kind != null) { | |
| 21492 _json["kind"] = kind; | |
| 21493 } | |
| 21494 if (lastSentRecipients != null) { | |
| 21495 _json["lastSentRecipients"] = lastSentRecipients; | |
| 21496 } | |
| 21497 if (lastSentTime != null) { | |
| 21498 _json["lastSentTime"] = (lastSentTime).toIso8601String(); | |
| 21499 } | |
| 21500 if (orderId != null) { | |
| 21501 _json["orderId"] = orderId; | |
| 21502 } | |
| 21503 if (projectId != null) { | |
| 21504 _json["projectId"] = projectId; | |
| 21505 } | |
| 21506 if (signed != null) { | |
| 21507 _json["signed"] = signed; | |
| 21508 } | |
| 21509 if (subaccountId != null) { | |
| 21510 _json["subaccountId"] = subaccountId; | |
| 21511 } | |
| 21512 if (title != null) { | |
| 21513 _json["title"] = title; | |
| 21514 } | |
| 21515 if (type != null) { | |
| 21516 _json["type"] = type; | |
| 21517 } | |
| 21518 return _json; | |
| 21519 } | |
| 21520 } | |
| 21521 | |
| 21522 /** Order document List Response */ | |
| 21523 class OrderDocumentsListResponse { | |
| 21524 /** | |
| 21525 * Identifies what kind of resource this is. Value: the fixed string | |
| 21526 * "dfareporting#orderDocumentsListResponse". | |
| 21527 */ | |
| 21528 core.String kind; | |
| 21529 /** Pagination token to be used for the next list operation. */ | |
| 21530 core.String nextPageToken; | |
| 21531 /** Order document collection */ | |
| 21532 core.List<OrderDocument> orderDocuments; | |
| 21533 | |
| 21534 OrderDocumentsListResponse(); | |
| 21535 | |
| 21536 OrderDocumentsListResponse.fromJson(core.Map _json) { | |
| 21537 if (_json.containsKey("kind")) { | |
| 21538 kind = _json["kind"]; | |
| 21539 } | |
| 21540 if (_json.containsKey("nextPageToken")) { | |
| 21541 nextPageToken = _json["nextPageToken"]; | |
| 21542 } | |
| 21543 if (_json.containsKey("orderDocuments")) { | |
| 21544 orderDocuments = _json["orderDocuments"].map((value) => new OrderDocument.
fromJson(value)).toList(); | |
| 21545 } | |
| 21546 } | |
| 21547 | |
| 21548 core.Map toJson() { | |
| 21549 var _json = new core.Map(); | |
| 21550 if (kind != null) { | |
| 21551 _json["kind"] = kind; | |
| 21552 } | |
| 21553 if (nextPageToken != null) { | |
| 21554 _json["nextPageToken"] = nextPageToken; | |
| 21555 } | |
| 21556 if (orderDocuments != null) { | |
| 21557 _json["orderDocuments"] = orderDocuments.map((value) => (value).toJson()).
toList(); | |
| 21558 } | |
| 21559 return _json; | |
| 21560 } | |
| 21561 } | |
| 21562 | |
| 21563 /** Order List Response */ | |
| 21564 class OrdersListResponse { | |
| 21565 /** | |
| 21566 * Identifies what kind of resource this is. Value: the fixed string | |
| 21567 * "dfareporting#ordersListResponse". | |
| 21568 */ | |
| 21569 core.String kind; | |
| 21570 /** Pagination token to be used for the next list operation. */ | |
| 21571 core.String nextPageToken; | |
| 21572 /** Order collection. */ | |
| 21573 core.List<Order> orders; | |
| 21574 | |
| 21575 OrdersListResponse(); | |
| 21576 | |
| 21577 OrdersListResponse.fromJson(core.Map _json) { | |
| 21578 if (_json.containsKey("kind")) { | |
| 21579 kind = _json["kind"]; | |
| 21580 } | |
| 21581 if (_json.containsKey("nextPageToken")) { | |
| 21582 nextPageToken = _json["nextPageToken"]; | |
| 21583 } | |
| 21584 if (_json.containsKey("orders")) { | |
| 21585 orders = _json["orders"].map((value) => new Order.fromJson(value)).toList(
); | |
| 21586 } | |
| 21587 } | |
| 21588 | |
| 21589 core.Map toJson() { | |
| 21590 var _json = new core.Map(); | |
| 21591 if (kind != null) { | |
| 21592 _json["kind"] = kind; | |
| 21593 } | |
| 21594 if (nextPageToken != null) { | |
| 21595 _json["nextPageToken"] = nextPageToken; | |
| 21596 } | |
| 21597 if (orders != null) { | |
| 21598 _json["orders"] = orders.map((value) => (value).toJson()).toList(); | |
| 21599 } | |
| 21600 return _json; | |
| 21601 } | |
| 21602 } | |
| 21603 | |
| 21604 /** | |
| 21605 * Represents fields that are compatible to be selected for a report of type | |
| 21606 * "PATH_TO_CONVERSION". | |
| 21607 */ | |
| 21608 class PathToConversionReportCompatibleFields { | |
| 21609 /** | |
| 21610 * Conversion dimensions which are compatible to be selected in the | |
| 21611 * "conversionDimensions" section of the report. | |
| 21612 */ | |
| 21613 core.List<Dimension> conversionDimensions; | |
| 21614 /** | |
| 21615 * Custom floodlight variables which are compatible to be selected in the | |
| 21616 * "customFloodlightVariables" section of the report. | |
| 21617 */ | |
| 21618 core.List<Dimension> customFloodlightVariables; | |
| 21619 /** | |
| 21620 * The kind of resource this is, in this case | |
| 21621 * dfareporting#pathToConversionReportCompatibleFields. | |
| 21622 */ | |
| 21623 core.String kind; | |
| 21624 /** | |
| 21625 * Metrics which are compatible to be selected in the "metricNames" section of | |
| 21626 * the report. | |
| 21627 */ | |
| 21628 core.List<Metric> metrics; | |
| 21629 /** | |
| 21630 * Per-interaction dimensions which are compatible to be selected in the | |
| 21631 * "perInteractionDimensions" section of the report. | |
| 21632 */ | |
| 21633 core.List<Dimension> perInteractionDimensions; | |
| 21634 | |
| 21635 PathToConversionReportCompatibleFields(); | |
| 21636 | |
| 21637 PathToConversionReportCompatibleFields.fromJson(core.Map _json) { | |
| 21638 if (_json.containsKey("conversionDimensions")) { | |
| 21639 conversionDimensions = _json["conversionDimensions"].map((value) => new Di
mension.fromJson(value)).toList(); | |
| 21640 } | |
| 21641 if (_json.containsKey("customFloodlightVariables")) { | |
| 21642 customFloodlightVariables = _json["customFloodlightVariables"].map((value)
=> new Dimension.fromJson(value)).toList(); | |
| 21643 } | |
| 21644 if (_json.containsKey("kind")) { | |
| 21645 kind = _json["kind"]; | |
| 21646 } | |
| 21647 if (_json.containsKey("metrics")) { | |
| 21648 metrics = _json["metrics"].map((value) => new Metric.fromJson(value)).toLi
st(); | |
| 21649 } | |
| 21650 if (_json.containsKey("perInteractionDimensions")) { | |
| 21651 perInteractionDimensions = _json["perInteractionDimensions"].map((value) =
> new Dimension.fromJson(value)).toList(); | |
| 21652 } | |
| 21653 } | |
| 21654 | |
| 21655 core.Map toJson() { | |
| 21656 var _json = new core.Map(); | |
| 21657 if (conversionDimensions != null) { | |
| 21658 _json["conversionDimensions"] = conversionDimensions.map((value) => (value
).toJson()).toList(); | |
| 21659 } | |
| 21660 if (customFloodlightVariables != null) { | |
| 21661 _json["customFloodlightVariables"] = customFloodlightVariables.map((value)
=> (value).toJson()).toList(); | |
| 21662 } | |
| 21663 if (kind != null) { | |
| 21664 _json["kind"] = kind; | |
| 21665 } | |
| 21666 if (metrics != null) { | |
| 21667 _json["metrics"] = metrics.map((value) => (value).toJson()).toList(); | |
| 21668 } | |
| 21669 if (perInteractionDimensions != null) { | |
| 21670 _json["perInteractionDimensions"] = perInteractionDimensions.map((value) =
> (value).toJson()).toList(); | |
| 21671 } | |
| 21672 return _json; | |
| 21673 } | |
| 21674 } | |
| 21675 | |
| 21676 /** Contains properties of a placement. */ | |
| 21677 class Placement { | |
| 21678 /** Account ID of this placement. This field can be left blank. */ | |
| 21679 core.String accountId; | |
| 21680 /** Advertiser ID of this placement. This field can be left blank. */ | |
| 21681 core.String advertiserId; | |
| 21682 /** | |
| 21683 * Dimension value for the ID of the advertiser. This is a read-only, | |
| 21684 * auto-generated field. | |
| 21685 */ | |
| 21686 DimensionValue advertiserIdDimensionValue; | |
| 21687 /** Whether this placement is archived. */ | |
| 21688 core.bool archived; | |
| 21689 /** | |
| 21690 * Campaign ID of this placement. This field is a required field on insertion. | |
| 21691 */ | |
| 21692 core.String campaignId; | |
| 21693 /** | |
| 21694 * Dimension value for the ID of the campaign. This is a read-only, | |
| 21695 * auto-generated field. | |
| 21696 */ | |
| 21697 DimensionValue campaignIdDimensionValue; | |
| 21698 /** Comments for this placement. */ | |
| 21699 core.String comment; | |
| 21700 /** | |
| 21701 * Placement compatibility. WEB and WEB_INTERSTITIAL refer to rendering either | |
| 21702 * on desktop or on mobile devices for regular or interstitial ads, | |
| 21703 * respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. | |
| 21704 * IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with | |
| 21705 * the VAST standard. This field is required on insertion. | |
| 21706 * Possible string values are: | |
| 21707 * - "APP" | |
| 21708 * - "APP_INTERSTITIAL" | |
| 21709 * - "IN_STREAM_VIDEO" | |
| 21710 * - "WEB" | |
| 21711 * - "WEB_INTERSTITIAL" | |
| 21712 */ | |
| 21713 core.String compatibility; | |
| 21714 /** ID of the content category assigned to this placement. */ | |
| 21715 core.String contentCategoryId; | |
| 21716 /** | |
| 21717 * Information about the creation of this placement. This is a read-only | |
| 21718 * field. | |
| 21719 */ | |
| 21720 LastModifiedInfo createInfo; | |
| 21721 /** | |
| 21722 * Directory site ID of this placement. On insert, you must set either this | |
| 21723 * field or the siteId field to specify the site associated with this | |
| 21724 * placement. This is a required field that is read-only after insertion. | |
| 21725 */ | |
| 21726 core.String directorySiteId; | |
| 21727 /** | |
| 21728 * Dimension value for the ID of the directory site. This is a read-only, | |
| 21729 * auto-generated field. | |
| 21730 */ | |
| 21731 DimensionValue directorySiteIdDimensionValue; | |
| 21732 /** External ID for this placement. */ | |
| 21733 core.String externalId; | |
| 21734 /** ID of this placement. This is a read-only, auto-generated field. */ | |
| 21735 core.String id; | |
| 21736 /** | |
| 21737 * Dimension value for the ID of this placement. This is a read-only, | |
| 21738 * auto-generated field. | |
| 21739 */ | |
| 21740 DimensionValue idDimensionValue; | |
| 21741 /** Key name of this placement. This is a read-only, auto-generated field. */ | |
| 21742 core.String keyName; | |
| 21743 /** | |
| 21744 * Identifies what kind of resource this is. Value: the fixed string | |
| 21745 * "dfareporting#placement". | |
| 21746 */ | |
| 21747 core.String kind; | |
| 21748 /** | |
| 21749 * Information about the most recent modification of this placement. This is a | |
| 21750 * read-only field. | |
| 21751 */ | |
| 21752 LastModifiedInfo lastModifiedInfo; | |
| 21753 /** Lookback window settings for this placement. */ | |
| 21754 LookbackConfiguration lookbackConfiguration; | |
| 21755 /** | |
| 21756 * Name of this placement.This is a required field and must be less than 256 | |
| 21757 * characters long. | |
| 21758 */ | |
| 21759 core.String name; | |
| 21760 /** | |
| 21761 * Whether payment was approved for this placement. This is a read-only field | |
| 21762 * relevant only to publisher-paid placements. | |
| 21763 */ | |
| 21764 core.bool paymentApproved; | |
| 21765 /** | |
| 21766 * Payment source for this placement. This is a required field that is | |
| 21767 * read-only after insertion. | |
| 21768 * Possible string values are: | |
| 21769 * - "PLACEMENT_AGENCY_PAID" | |
| 21770 * - "PLACEMENT_PUBLISHER_PAID" | |
| 21771 */ | |
| 21772 core.String paymentSource; | |
| 21773 /** ID of this placement's group, if applicable. */ | |
| 21774 core.String placementGroupId; | |
| 21775 /** | |
| 21776 * Dimension value for the ID of the placement group. This is a read-only, | |
| 21777 * auto-generated field. | |
| 21778 */ | |
| 21779 DimensionValue placementGroupIdDimensionValue; | |
| 21780 /** ID of the placement strategy assigned to this placement. */ | |
| 21781 core.String placementStrategyId; | |
| 21782 /** | |
| 21783 * Pricing schedule of this placement. This field is required on insertion, | |
| 21784 * specifically subfields startDate, endDate and pricingType. | |
| 21785 */ | |
| 21786 PricingSchedule pricingSchedule; | |
| 21787 /** | |
| 21788 * Whether this placement is the primary placement of a roadblock (placement | |
| 21789 * group). You cannot change this field from true to false. Setting this field | |
| 21790 * to true will automatically set the primary field on the original primary | |
| 21791 * placement of the roadblock to false, and it will automatically set the | |
| 21792 * roadblock's primaryPlacementId field to the ID of this placement. | |
| 21793 */ | |
| 21794 core.bool primary; | |
| 21795 /** | |
| 21796 * Information about the last publisher update. This is a read-only field. | |
| 21797 */ | |
| 21798 LastModifiedInfo publisherUpdateInfo; | |
| 21799 /** | |
| 21800 * Site ID associated with this placement. On insert, you must set either this | |
| 21801 * field or the directorySiteId field to specify the site associated with this | |
| 21802 * placement. This is a required field that is read-only after insertion. | |
| 21803 */ | |
| 21804 core.String siteId; | |
| 21805 /** | |
| 21806 * Dimension value for the ID of the site. This is a read-only, auto-generated | |
| 21807 * field. | |
| 21808 */ | |
| 21809 DimensionValue siteIdDimensionValue; | |
| 21810 /** | |
| 21811 * Size associated with this placement. When inserting or updating a | |
| 21812 * placement, only the size ID field is used. This field is required on | |
| 21813 * insertion. | |
| 21814 */ | |
| 21815 Size size; | |
| 21816 /** Whether creatives assigned to this placement must be SSL-compliant. */ | |
| 21817 core.bool sslRequired; | |
| 21818 /** | |
| 21819 * Third-party placement status. | |
| 21820 * Possible string values are: | |
| 21821 * - "ACKNOWLEDGE_ACCEPTANCE" | |
| 21822 * - "ACKNOWLEDGE_REJECTION" | |
| 21823 * - "DRAFT" | |
| 21824 * - "PAYMENT_ACCEPTED" | |
| 21825 * - "PAYMENT_REJECTED" | |
| 21826 * - "PENDING_REVIEW" | |
| 21827 */ | |
| 21828 core.String status; | |
| 21829 /** Subaccount ID of this placement. This field can be left blank. */ | |
| 21830 core.String subaccountId; | |
| 21831 /** | |
| 21832 * Tag formats to generate for this placement. This field is required on | |
| 21833 * insertion. | |
| 21834 * Acceptable values are: | |
| 21835 * - "PLACEMENT_TAG_STANDARD" | |
| 21836 * - "PLACEMENT_TAG_IFRAME_JAVASCRIPT" | |
| 21837 * - "PLACEMENT_TAG_IFRAME_ILAYER" | |
| 21838 * - "PLACEMENT_TAG_INTERNAL_REDIRECT" | |
| 21839 * - "PLACEMENT_TAG_JAVASCRIPT" | |
| 21840 * - "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT" | |
| 21841 * - "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT" | |
| 21842 * - "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT" | |
| 21843 * - "PLACEMENT_TAG_CLICK_COMMANDS" | |
| 21844 * - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH" | |
| 21845 * - "PLACEMENT_TAG_TRACKING" | |
| 21846 * - "PLACEMENT_TAG_TRACKING_IFRAME" | |
| 21847 * - "PLACEMENT_TAG_TRACKING_JAVASCRIPT" | |
| 21848 */ | |
| 21849 core.List<core.String> tagFormats; | |
| 21850 /** Tag settings for this placement. */ | |
| 21851 TagSetting tagSetting; | |
| 21852 | |
| 21853 Placement(); | |
| 21854 | |
| 21855 Placement.fromJson(core.Map _json) { | |
| 21856 if (_json.containsKey("accountId")) { | |
| 21857 accountId = _json["accountId"]; | |
| 21858 } | |
| 21859 if (_json.containsKey("advertiserId")) { | |
| 21860 advertiserId = _json["advertiserId"]; | |
| 21861 } | |
| 21862 if (_json.containsKey("advertiserIdDimensionValue")) { | |
| 21863 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser
IdDimensionValue"]); | |
| 21864 } | |
| 21865 if (_json.containsKey("archived")) { | |
| 21866 archived = _json["archived"]; | |
| 21867 } | |
| 21868 if (_json.containsKey("campaignId")) { | |
| 21869 campaignId = _json["campaignId"]; | |
| 21870 } | |
| 21871 if (_json.containsKey("campaignIdDimensionValue")) { | |
| 21872 campaignIdDimensionValue = new DimensionValue.fromJson(_json["campaignIdDi
mensionValue"]); | |
| 21873 } | |
| 21874 if (_json.containsKey("comment")) { | |
| 21875 comment = _json["comment"]; | |
| 21876 } | |
| 21877 if (_json.containsKey("compatibility")) { | |
| 21878 compatibility = _json["compatibility"]; | |
| 21879 } | |
| 21880 if (_json.containsKey("contentCategoryId")) { | |
| 21881 contentCategoryId = _json["contentCategoryId"]; | |
| 21882 } | |
| 21883 if (_json.containsKey("createInfo")) { | |
| 21884 createInfo = new LastModifiedInfo.fromJson(_json["createInfo"]); | |
| 21885 } | |
| 21886 if (_json.containsKey("directorySiteId")) { | |
| 21887 directorySiteId = _json["directorySiteId"]; | |
| 21888 } | |
| 21889 if (_json.containsKey("directorySiteIdDimensionValue")) { | |
| 21890 directorySiteIdDimensionValue = new DimensionValue.fromJson(_json["directo
rySiteIdDimensionValue"]); | |
| 21891 } | |
| 21892 if (_json.containsKey("externalId")) { | |
| 21893 externalId = _json["externalId"]; | |
| 21894 } | |
| 21895 if (_json.containsKey("id")) { | |
| 21896 id = _json["id"]; | |
| 21897 } | |
| 21898 if (_json.containsKey("idDimensionValue")) { | |
| 21899 idDimensionValue = new DimensionValue.fromJson(_json["idDimensionValue"]); | |
| 21900 } | |
| 21901 if (_json.containsKey("keyName")) { | |
| 21902 keyName = _json["keyName"]; | |
| 21903 } | |
| 21904 if (_json.containsKey("kind")) { | |
| 21905 kind = _json["kind"]; | |
| 21906 } | |
| 21907 if (_json.containsKey("lastModifiedInfo")) { | |
| 21908 lastModifiedInfo = new LastModifiedInfo.fromJson(_json["lastModifiedInfo"]
); | |
| 21909 } | |
| 21910 if (_json.containsKey("lookbackConfiguration")) { | |
| 21911 lookbackConfiguration = new LookbackConfiguration.fromJson(_json["lookback
Configuration"]); | |
| 21912 } | |
| 21913 if (_json.containsKey("name")) { | |
| 21914 name = _json["name"]; | |
| 21915 } | |
| 21916 if (_json.containsKey("paymentApproved")) { | |
| 21917 paymentApproved = _json["paymentApproved"]; | |
| 21918 } | |
| 21919 if (_json.containsKey("paymentSource")) { | |
| 21920 paymentSource = _json["paymentSource"]; | |
| 21921 } | |
| 21922 if (_json.containsKey("placementGroupId")) { | |
| 21923 placementGroupId = _json["placementGroupId"]; | |
| 21924 } | |
| 21925 if (_json.containsKey("placementGroupIdDimensionValue")) { | |
| 21926 placementGroupIdDimensionValue = new DimensionValue.fromJson(_json["placem
entGroupIdDimensionValue"]); | |
| 21927 } | |
| 21928 if (_json.containsKey("placementStrategyId")) { | |
| 21929 placementStrategyId = _json["placementStrategyId"]; | |
| 21930 } | |
| 21931 if (_json.containsKey("pricingSchedule")) { | |
| 21932 pricingSchedule = new PricingSchedule.fromJson(_json["pricingSchedule"]); | |
| 21933 } | |
| 21934 if (_json.containsKey("primary")) { | |
| 21935 primary = _json["primary"]; | |
| 21936 } | |
| 21937 if (_json.containsKey("publisherUpdateInfo")) { | |
| 21938 publisherUpdateInfo = new LastModifiedInfo.fromJson(_json["publisherUpdate
Info"]); | |
| 21939 } | |
| 21940 if (_json.containsKey("siteId")) { | |
| 21941 siteId = _json["siteId"]; | |
| 21942 } | |
| 21943 if (_json.containsKey("siteIdDimensionValue")) { | |
| 21944 siteIdDimensionValue = new DimensionValue.fromJson(_json["siteIdDimensionV
alue"]); | |
| 21945 } | |
| 21946 if (_json.containsKey("size")) { | |
| 21947 size = new Size.fromJson(_json["size"]); | |
| 21948 } | |
| 21949 if (_json.containsKey("sslRequired")) { | |
| 21950 sslRequired = _json["sslRequired"]; | |
| 21951 } | |
| 21952 if (_json.containsKey("status")) { | |
| 21953 status = _json["status"]; | |
| 21954 } | |
| 21955 if (_json.containsKey("subaccountId")) { | |
| 21956 subaccountId = _json["subaccountId"]; | |
| 21957 } | |
| 21958 if (_json.containsKey("tagFormats")) { | |
| 21959 tagFormats = _json["tagFormats"]; | |
| 21960 } | |
| 21961 if (_json.containsKey("tagSetting")) { | |
| 21962 tagSetting = new TagSetting.fromJson(_json["tagSetting"]); | |
| 21963 } | |
| 21964 } | |
| 21965 | |
| 21966 core.Map toJson() { | |
| 21967 var _json = new core.Map(); | |
| 21968 if (accountId != null) { | |
| 21969 _json["accountId"] = accountId; | |
| 21970 } | |
| 21971 if (advertiserId != null) { | |
| 21972 _json["advertiserId"] = advertiserId; | |
| 21973 } | |
| 21974 if (advertiserIdDimensionValue != null) { | |
| 21975 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson(
); | |
| 21976 } | |
| 21977 if (archived != null) { | |
| 21978 _json["archived"] = archived; | |
| 21979 } | |
| 21980 if (campaignId != null) { | |
| 21981 _json["campaignId"] = campaignId; | |
| 21982 } | |
| 21983 if (campaignIdDimensionValue != null) { | |
| 21984 _json["campaignIdDimensionValue"] = (campaignIdDimensionValue).toJson(); | |
| 21985 } | |
| 21986 if (comment != null) { | |
| 21987 _json["comment"] = comment; | |
| 21988 } | |
| 21989 if (compatibility != null) { | |
| 21990 _json["compatibility"] = compatibility; | |
| 21991 } | |
| 21992 if (contentCategoryId != null) { | |
| 21993 _json["contentCategoryId"] = contentCategoryId; | |
| 21994 } | |
| 21995 if (createInfo != null) { | |
| 21996 _json["createInfo"] = (createInfo).toJson(); | |
| 21997 } | |
| 21998 if (directorySiteId != null) { | |
| 21999 _json["directorySiteId"] = directorySiteId; | |
| 22000 } | |
| 22001 if (directorySiteIdDimensionValue != null) { | |
| 22002 _json["directorySiteIdDimensionValue"] = (directorySiteIdDimensionValue).t
oJson(); | |
| 22003 } | |
| 22004 if (externalId != null) { | |
| 22005 _json["externalId"] = externalId; | |
| 22006 } | |
| 22007 if (id != null) { | |
| 22008 _json["id"] = id; | |
| 22009 } | |
| 22010 if (idDimensionValue != null) { | |
| 22011 _json["idDimensionValue"] = (idDimensionValue).toJson(); | |
| 22012 } | |
| 22013 if (keyName != null) { | |
| 22014 _json["keyName"] = keyName; | |
| 22015 } | |
| 22016 if (kind != null) { | |
| 22017 _json["kind"] = kind; | |
| 22018 } | |
| 22019 if (lastModifiedInfo != null) { | |
| 22020 _json["lastModifiedInfo"] = (lastModifiedInfo).toJson(); | |
| 22021 } | |
| 22022 if (lookbackConfiguration != null) { | |
| 22023 _json["lookbackConfiguration"] = (lookbackConfiguration).toJson(); | |
| 22024 } | |
| 22025 if (name != null) { | |
| 22026 _json["name"] = name; | |
| 22027 } | |
| 22028 if (paymentApproved != null) { | |
| 22029 _json["paymentApproved"] = paymentApproved; | |
| 22030 } | |
| 22031 if (paymentSource != null) { | |
| 22032 _json["paymentSource"] = paymentSource; | |
| 22033 } | |
| 22034 if (placementGroupId != null) { | |
| 22035 _json["placementGroupId"] = placementGroupId; | |
| 22036 } | |
| 22037 if (placementGroupIdDimensionValue != null) { | |
| 22038 _json["placementGroupIdDimensionValue"] = (placementGroupIdDimensionValue)
.toJson(); | |
| 22039 } | |
| 22040 if (placementStrategyId != null) { | |
| 22041 _json["placementStrategyId"] = placementStrategyId; | |
| 22042 } | |
| 22043 if (pricingSchedule != null) { | |
| 22044 _json["pricingSchedule"] = (pricingSchedule).toJson(); | |
| 22045 } | |
| 22046 if (primary != null) { | |
| 22047 _json["primary"] = primary; | |
| 22048 } | |
| 22049 if (publisherUpdateInfo != null) { | |
| 22050 _json["publisherUpdateInfo"] = (publisherUpdateInfo).toJson(); | |
| 22051 } | |
| 22052 if (siteId != null) { | |
| 22053 _json["siteId"] = siteId; | |
| 22054 } | |
| 22055 if (siteIdDimensionValue != null) { | |
| 22056 _json["siteIdDimensionValue"] = (siteIdDimensionValue).toJson(); | |
| 22057 } | |
| 22058 if (size != null) { | |
| 22059 _json["size"] = (size).toJson(); | |
| 22060 } | |
| 22061 if (sslRequired != null) { | |
| 22062 _json["sslRequired"] = sslRequired; | |
| 22063 } | |
| 22064 if (status != null) { | |
| 22065 _json["status"] = status; | |
| 22066 } | |
| 22067 if (subaccountId != null) { | |
| 22068 _json["subaccountId"] = subaccountId; | |
| 22069 } | |
| 22070 if (tagFormats != null) { | |
| 22071 _json["tagFormats"] = tagFormats; | |
| 22072 } | |
| 22073 if (tagSetting != null) { | |
| 22074 _json["tagSetting"] = (tagSetting).toJson(); | |
| 22075 } | |
| 22076 return _json; | |
| 22077 } | |
| 22078 } | |
| 22079 | |
| 22080 /** Placement Assignment. */ | |
| 22081 class PlacementAssignment { | |
| 22082 /** | |
| 22083 * Whether this placement assignment is active. When true, the placement will | |
| 22084 * be included in the ad's rotation. | |
| 22085 */ | |
| 22086 core.bool active; | |
| 22087 /** ID of the placement to be assigned. This is a required field. */ | |
| 22088 core.String placementId; | |
| 22089 /** | |
| 22090 * Dimension value for the ID of the placement. This is a read-only, | |
| 22091 * auto-generated field. | |
| 22092 */ | |
| 22093 DimensionValue placementIdDimensionValue; | |
| 22094 /** | |
| 22095 * Whether the placement to be assigned requires SSL. This is a read-only | |
| 22096 * field that is auto-generated when the ad is inserted or updated. | |
| 22097 */ | |
| 22098 core.bool sslRequired; | |
| 22099 | |
| 22100 PlacementAssignment(); | |
| 22101 | |
| 22102 PlacementAssignment.fromJson(core.Map _json) { | |
| 22103 if (_json.containsKey("active")) { | |
| 22104 active = _json["active"]; | |
| 22105 } | |
| 22106 if (_json.containsKey("placementId")) { | |
| 22107 placementId = _json["placementId"]; | |
| 22108 } | |
| 22109 if (_json.containsKey("placementIdDimensionValue")) { | |
| 22110 placementIdDimensionValue = new DimensionValue.fromJson(_json["placementId
DimensionValue"]); | |
| 22111 } | |
| 22112 if (_json.containsKey("sslRequired")) { | |
| 22113 sslRequired = _json["sslRequired"]; | |
| 22114 } | |
| 22115 } | |
| 22116 | |
| 22117 core.Map toJson() { | |
| 22118 var _json = new core.Map(); | |
| 22119 if (active != null) { | |
| 22120 _json["active"] = active; | |
| 22121 } | |
| 22122 if (placementId != null) { | |
| 22123 _json["placementId"] = placementId; | |
| 22124 } | |
| 22125 if (placementIdDimensionValue != null) { | |
| 22126 _json["placementIdDimensionValue"] = (placementIdDimensionValue).toJson(); | |
| 22127 } | |
| 22128 if (sslRequired != null) { | |
| 22129 _json["sslRequired"] = sslRequired; | |
| 22130 } | |
| 22131 return _json; | |
| 22132 } | |
| 22133 } | |
| 22134 | |
| 22135 /** Contains properties of a package or roadblock. */ | |
| 22136 class PlacementGroup { | |
| 22137 /** | |
| 22138 * Account ID of this placement group. This is a read-only field that can be | |
| 22139 * left blank. | |
| 22140 */ | |
| 22141 core.String accountId; | |
| 22142 /** | |
| 22143 * Advertiser ID of this placement group. This is a required field on | |
| 22144 * insertion. | |
| 22145 */ | |
| 22146 core.String advertiserId; | |
| 22147 /** | |
| 22148 * Dimension value for the ID of the advertiser. This is a read-only, | |
| 22149 * auto-generated field. | |
| 22150 */ | |
| 22151 DimensionValue advertiserIdDimensionValue; | |
| 22152 /** Whether this placement group is archived. */ | |
| 22153 core.bool archived; | |
| 22154 /** | |
| 22155 * Campaign ID of this placement group. This field is required on insertion. | |
| 22156 */ | |
| 22157 core.String campaignId; | |
| 22158 /** | |
| 22159 * Dimension value for the ID of the campaign. This is a read-only, | |
| 22160 * auto-generated field. | |
| 22161 */ | |
| 22162 DimensionValue campaignIdDimensionValue; | |
| 22163 /** | |
| 22164 * IDs of placements which are assigned to this placement group. This is a | |
| 22165 * read-only, auto-generated field. | |
| 22166 */ | |
| 22167 core.List<core.String> childPlacementIds; | |
| 22168 /** Comments for this placement group. */ | |
| 22169 core.String comment; | |
| 22170 /** ID of the content category assigned to this placement group. */ | |
| 22171 core.String contentCategoryId; | |
| 22172 /** | |
| 22173 * Information about the creation of this placement group. This is a read-only | |
| 22174 * field. | |
| 22175 */ | |
| 22176 LastModifiedInfo createInfo; | |
| 22177 /** | |
| 22178 * Directory site ID associated with this placement group. On insert, you must | |
| 22179 * set either this field or the site_id field to specify the site associated | |
| 22180 * with this placement group. This is a required field that is read-only after | |
| 22181 * insertion. | |
| 22182 */ | |
| 22183 core.String directorySiteId; | |
| 22184 /** | |
| 22185 * Dimension value for the ID of the directory site. This is a read-only, | |
| 22186 * auto-generated field. | |
| 22187 */ | |
| 22188 DimensionValue directorySiteIdDimensionValue; | |
| 22189 /** External ID for this placement. */ | |
| 22190 core.String externalId; | |
| 22191 /** ID of this placement group. This is a read-only, auto-generated field. */ | |
| 22192 core.String id; | |
| 22193 /** | |
| 22194 * Dimension value for the ID of this placement group. This is a read-only, | |
| 22195 * auto-generated field. | |
| 22196 */ | |
| 22197 DimensionValue idDimensionValue; | |
| 22198 /** | |
| 22199 * Identifies what kind of resource this is. Value: the fixed string | |
| 22200 * "dfareporting#placementGroup". | |
| 22201 */ | |
| 22202 core.String kind; | |
| 22203 /** | |
| 22204 * Information about the most recent modification of this placement group. | |
| 22205 * This is a read-only field. | |
| 22206 */ | |
| 22207 LastModifiedInfo lastModifiedInfo; | |
| 22208 /** | |
| 22209 * Name of this placement group. This is a required field and must be less | |
| 22210 * than 256 characters long. | |
| 22211 */ | |
| 22212 core.String name; | |
| 22213 /** | |
| 22214 * Type of this placement group. A package is a simple group of placements | |
| 22215 * that acts as a single pricing point for a group of tags. A roadblock is a | |
| 22216 * group of placements that not only acts as a single pricing point, but also | |
| 22217 * assumes that all the tags in it will be served at the same time. A | |
| 22218 * roadblock requires one of its assigned placements to be marked as primary | |
| 22219 * for reporting. This field is required on insertion. | |
| 22220 * Possible string values are: | |
| 22221 * - "PLACEMENT_PACKAGE" | |
| 22222 * - "PLACEMENT_ROADBLOCK" | |
| 22223 */ | |
| 22224 core.String placementGroupType; | |
| 22225 /** ID of the placement strategy assigned to this placement group. */ | |
| 22226 core.String placementStrategyId; | |
| 22227 /** | |
| 22228 * Pricing schedule of this placement group. This field is required on | |
| 22229 * insertion. | |
| 22230 */ | |
| 22231 PricingSchedule pricingSchedule; | |
| 22232 /** | |
| 22233 * ID of the primary placement, used to calculate the media cost of a | |
| 22234 * roadblock (placement group). Modifying this field will automatically modify | |
| 22235 * the primary field on all affected roadblock child placements. | |
| 22236 */ | |
| 22237 core.String primaryPlacementId; | |
| 22238 /** | |
| 22239 * Dimension value for the ID of the primary placement. This is a read-only, | |
| 22240 * auto-generated field. | |
| 22241 */ | |
| 22242 DimensionValue primaryPlacementIdDimensionValue; | |
| 22243 /** | |
| 22244 * Site ID associated with this placement group. On insert, you must set | |
| 22245 * either this field or the directorySiteId field to specify the site | |
| 22246 * associated with this placement group. This is a required field that is | |
| 22247 * read-only after insertion. | |
| 22248 */ | |
| 22249 core.String siteId; | |
| 22250 /** | |
| 22251 * Dimension value for the ID of the site. This is a read-only, auto-generated | |
| 22252 * field. | |
| 22253 */ | |
| 22254 DimensionValue siteIdDimensionValue; | |
| 22255 /** | |
| 22256 * Subaccount ID of this placement group. This is a read-only field that can | |
| 22257 * be left blank. | |
| 22258 */ | |
| 22259 core.String subaccountId; | |
| 22260 | |
| 22261 PlacementGroup(); | |
| 22262 | |
| 22263 PlacementGroup.fromJson(core.Map _json) { | |
| 22264 if (_json.containsKey("accountId")) { | |
| 22265 accountId = _json["accountId"]; | |
| 22266 } | |
| 22267 if (_json.containsKey("advertiserId")) { | |
| 22268 advertiserId = _json["advertiserId"]; | |
| 22269 } | |
| 22270 if (_json.containsKey("advertiserIdDimensionValue")) { | |
| 22271 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser
IdDimensionValue"]); | |
| 22272 } | |
| 22273 if (_json.containsKey("archived")) { | |
| 22274 archived = _json["archived"]; | |
| 22275 } | |
| 22276 if (_json.containsKey("campaignId")) { | |
| 22277 campaignId = _json["campaignId"]; | |
| 22278 } | |
| 22279 if (_json.containsKey("campaignIdDimensionValue")) { | |
| 22280 campaignIdDimensionValue = new DimensionValue.fromJson(_json["campaignIdDi
mensionValue"]); | |
| 22281 } | |
| 22282 if (_json.containsKey("childPlacementIds")) { | |
| 22283 childPlacementIds = _json["childPlacementIds"]; | |
| 22284 } | |
| 22285 if (_json.containsKey("comment")) { | |
| 22286 comment = _json["comment"]; | |
| 22287 } | |
| 22288 if (_json.containsKey("contentCategoryId")) { | |
| 22289 contentCategoryId = _json["contentCategoryId"]; | |
| 22290 } | |
| 22291 if (_json.containsKey("createInfo")) { | |
| 22292 createInfo = new LastModifiedInfo.fromJson(_json["createInfo"]); | |
| 22293 } | |
| 22294 if (_json.containsKey("directorySiteId")) { | |
| 22295 directorySiteId = _json["directorySiteId"]; | |
| 22296 } | |
| 22297 if (_json.containsKey("directorySiteIdDimensionValue")) { | |
| 22298 directorySiteIdDimensionValue = new DimensionValue.fromJson(_json["directo
rySiteIdDimensionValue"]); | |
| 22299 } | |
| 22300 if (_json.containsKey("externalId")) { | |
| 22301 externalId = _json["externalId"]; | |
| 22302 } | |
| 22303 if (_json.containsKey("id")) { | |
| 22304 id = _json["id"]; | |
| 22305 } | |
| 22306 if (_json.containsKey("idDimensionValue")) { | |
| 22307 idDimensionValue = new DimensionValue.fromJson(_json["idDimensionValue"]); | |
| 22308 } | |
| 22309 if (_json.containsKey("kind")) { | |
| 22310 kind = _json["kind"]; | |
| 22311 } | |
| 22312 if (_json.containsKey("lastModifiedInfo")) { | |
| 22313 lastModifiedInfo = new LastModifiedInfo.fromJson(_json["lastModifiedInfo"]
); | |
| 22314 } | |
| 22315 if (_json.containsKey("name")) { | |
| 22316 name = _json["name"]; | |
| 22317 } | |
| 22318 if (_json.containsKey("placementGroupType")) { | |
| 22319 placementGroupType = _json["placementGroupType"]; | |
| 22320 } | |
| 22321 if (_json.containsKey("placementStrategyId")) { | |
| 22322 placementStrategyId = _json["placementStrategyId"]; | |
| 22323 } | |
| 22324 if (_json.containsKey("pricingSchedule")) { | |
| 22325 pricingSchedule = new PricingSchedule.fromJson(_json["pricingSchedule"]); | |
| 22326 } | |
| 22327 if (_json.containsKey("primaryPlacementId")) { | |
| 22328 primaryPlacementId = _json["primaryPlacementId"]; | |
| 22329 } | |
| 22330 if (_json.containsKey("primaryPlacementIdDimensionValue")) { | |
| 22331 primaryPlacementIdDimensionValue = new DimensionValue.fromJson(_json["prim
aryPlacementIdDimensionValue"]); | |
| 22332 } | |
| 22333 if (_json.containsKey("siteId")) { | |
| 22334 siteId = _json["siteId"]; | |
| 22335 } | |
| 22336 if (_json.containsKey("siteIdDimensionValue")) { | |
| 22337 siteIdDimensionValue = new DimensionValue.fromJson(_json["siteIdDimensionV
alue"]); | |
| 22338 } | |
| 22339 if (_json.containsKey("subaccountId")) { | |
| 22340 subaccountId = _json["subaccountId"]; | |
| 22341 } | |
| 22342 } | |
| 22343 | |
| 22344 core.Map toJson() { | |
| 22345 var _json = new core.Map(); | |
| 22346 if (accountId != null) { | |
| 22347 _json["accountId"] = accountId; | |
| 22348 } | |
| 22349 if (advertiserId != null) { | |
| 22350 _json["advertiserId"] = advertiserId; | |
| 22351 } | |
| 22352 if (advertiserIdDimensionValue != null) { | |
| 22353 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson(
); | |
| 22354 } | |
| 22355 if (archived != null) { | |
| 22356 _json["archived"] = archived; | |
| 22357 } | |
| 22358 if (campaignId != null) { | |
| 22359 _json["campaignId"] = campaignId; | |
| 22360 } | |
| 22361 if (campaignIdDimensionValue != null) { | |
| 22362 _json["campaignIdDimensionValue"] = (campaignIdDimensionValue).toJson(); | |
| 22363 } | |
| 22364 if (childPlacementIds != null) { | |
| 22365 _json["childPlacementIds"] = childPlacementIds; | |
| 22366 } | |
| 22367 if (comment != null) { | |
| 22368 _json["comment"] = comment; | |
| 22369 } | |
| 22370 if (contentCategoryId != null) { | |
| 22371 _json["contentCategoryId"] = contentCategoryId; | |
| 22372 } | |
| 22373 if (createInfo != null) { | |
| 22374 _json["createInfo"] = (createInfo).toJson(); | |
| 22375 } | |
| 22376 if (directorySiteId != null) { | |
| 22377 _json["directorySiteId"] = directorySiteId; | |
| 22378 } | |
| 22379 if (directorySiteIdDimensionValue != null) { | |
| 22380 _json["directorySiteIdDimensionValue"] = (directorySiteIdDimensionValue).t
oJson(); | |
| 22381 } | |
| 22382 if (externalId != null) { | |
| 22383 _json["externalId"] = externalId; | |
| 22384 } | |
| 22385 if (id != null) { | |
| 22386 _json["id"] = id; | |
| 22387 } | |
| 22388 if (idDimensionValue != null) { | |
| 22389 _json["idDimensionValue"] = (idDimensionValue).toJson(); | |
| 22390 } | |
| 22391 if (kind != null) { | |
| 22392 _json["kind"] = kind; | |
| 22393 } | |
| 22394 if (lastModifiedInfo != null) { | |
| 22395 _json["lastModifiedInfo"] = (lastModifiedInfo).toJson(); | |
| 22396 } | |
| 22397 if (name != null) { | |
| 22398 _json["name"] = name; | |
| 22399 } | |
| 22400 if (placementGroupType != null) { | |
| 22401 _json["placementGroupType"] = placementGroupType; | |
| 22402 } | |
| 22403 if (placementStrategyId != null) { | |
| 22404 _json["placementStrategyId"] = placementStrategyId; | |
| 22405 } | |
| 22406 if (pricingSchedule != null) { | |
| 22407 _json["pricingSchedule"] = (pricingSchedule).toJson(); | |
| 22408 } | |
| 22409 if (primaryPlacementId != null) { | |
| 22410 _json["primaryPlacementId"] = primaryPlacementId; | |
| 22411 } | |
| 22412 if (primaryPlacementIdDimensionValue != null) { | |
| 22413 _json["primaryPlacementIdDimensionValue"] = (primaryPlacementIdDimensionVa
lue).toJson(); | |
| 22414 } | |
| 22415 if (siteId != null) { | |
| 22416 _json["siteId"] = siteId; | |
| 22417 } | |
| 22418 if (siteIdDimensionValue != null) { | |
| 22419 _json["siteIdDimensionValue"] = (siteIdDimensionValue).toJson(); | |
| 22420 } | |
| 22421 if (subaccountId != null) { | |
| 22422 _json["subaccountId"] = subaccountId; | |
| 22423 } | |
| 22424 return _json; | |
| 22425 } | |
| 22426 } | |
| 22427 | |
| 22428 /** Placement Group List Response */ | |
| 22429 class PlacementGroupsListResponse { | |
| 22430 /** | |
| 22431 * Identifies what kind of resource this is. Value: the fixed string | |
| 22432 * "dfareporting#placementGroupsListResponse". | |
| 22433 */ | |
| 22434 core.String kind; | |
| 22435 /** Pagination token to be used for the next list operation. */ | |
| 22436 core.String nextPageToken; | |
| 22437 /** Placement group collection. */ | |
| 22438 core.List<PlacementGroup> placementGroups; | |
| 22439 | |
| 22440 PlacementGroupsListResponse(); | |
| 22441 | |
| 22442 PlacementGroupsListResponse.fromJson(core.Map _json) { | |
| 22443 if (_json.containsKey("kind")) { | |
| 22444 kind = _json["kind"]; | |
| 22445 } | |
| 22446 if (_json.containsKey("nextPageToken")) { | |
| 22447 nextPageToken = _json["nextPageToken"]; | |
| 22448 } | |
| 22449 if (_json.containsKey("placementGroups")) { | |
| 22450 placementGroups = _json["placementGroups"].map((value) => new PlacementGro
up.fromJson(value)).toList(); | |
| 22451 } | |
| 22452 } | |
| 22453 | |
| 22454 core.Map toJson() { | |
| 22455 var _json = new core.Map(); | |
| 22456 if (kind != null) { | |
| 22457 _json["kind"] = kind; | |
| 22458 } | |
| 22459 if (nextPageToken != null) { | |
| 22460 _json["nextPageToken"] = nextPageToken; | |
| 22461 } | |
| 22462 if (placementGroups != null) { | |
| 22463 _json["placementGroups"] = placementGroups.map((value) => (value).toJson()
).toList(); | |
| 22464 } | |
| 22465 return _json; | |
| 22466 } | |
| 22467 } | |
| 22468 | |
| 22469 /** Placement Strategy List Response */ | |
| 22470 class PlacementStrategiesListResponse { | |
| 22471 /** | |
| 22472 * Identifies what kind of resource this is. Value: the fixed string | |
| 22473 * "dfareporting#placementStrategiesListResponse". | |
| 22474 */ | |
| 22475 core.String kind; | |
| 22476 /** Pagination token to be used for the next list operation. */ | |
| 22477 core.String nextPageToken; | |
| 22478 /** Placement strategy collection. */ | |
| 22479 core.List<PlacementStrategy> placementStrategies; | |
| 22480 | |
| 22481 PlacementStrategiesListResponse(); | |
| 22482 | |
| 22483 PlacementStrategiesListResponse.fromJson(core.Map _json) { | |
| 22484 if (_json.containsKey("kind")) { | |
| 22485 kind = _json["kind"]; | |
| 22486 } | |
| 22487 if (_json.containsKey("nextPageToken")) { | |
| 22488 nextPageToken = _json["nextPageToken"]; | |
| 22489 } | |
| 22490 if (_json.containsKey("placementStrategies")) { | |
| 22491 placementStrategies = _json["placementStrategies"].map((value) => new Plac
ementStrategy.fromJson(value)).toList(); | |
| 22492 } | |
| 22493 } | |
| 22494 | |
| 22495 core.Map toJson() { | |
| 22496 var _json = new core.Map(); | |
| 22497 if (kind != null) { | |
| 22498 _json["kind"] = kind; | |
| 22499 } | |
| 22500 if (nextPageToken != null) { | |
| 22501 _json["nextPageToken"] = nextPageToken; | |
| 22502 } | |
| 22503 if (placementStrategies != null) { | |
| 22504 _json["placementStrategies"] = placementStrategies.map((value) => (value).
toJson()).toList(); | |
| 22505 } | |
| 22506 return _json; | |
| 22507 } | |
| 22508 } | |
| 22509 | |
| 22510 /** Contains properties of a placement strategy. */ | |
| 22511 class PlacementStrategy { | |
| 22512 /** | |
| 22513 * Account ID of this placement strategy.This is a read-only field that can be | |
| 22514 * left blank. | |
| 22515 */ | |
| 22516 core.String accountId; | |
| 22517 /** | |
| 22518 * ID of this placement strategy. This is a read-only, auto-generated field. | |
| 22519 */ | |
| 22520 core.String id; | |
| 22521 /** | |
| 22522 * Identifies what kind of resource this is. Value: the fixed string | |
| 22523 * "dfareporting#placementStrategy". | |
| 22524 */ | |
| 22525 core.String kind; | |
| 22526 /** | |
| 22527 * Name of this placement strategy. This is a required field. It must be less | |
| 22528 * than 256 characters long and unique among placement strategies of the same | |
| 22529 * account. | |
| 22530 */ | |
| 22531 core.String name; | |
| 22532 | |
| 22533 PlacementStrategy(); | |
| 22534 | |
| 22535 PlacementStrategy.fromJson(core.Map _json) { | |
| 22536 if (_json.containsKey("accountId")) { | |
| 22537 accountId = _json["accountId"]; | |
| 22538 } | |
| 22539 if (_json.containsKey("id")) { | |
| 22540 id = _json["id"]; | |
| 22541 } | |
| 22542 if (_json.containsKey("kind")) { | |
| 22543 kind = _json["kind"]; | |
| 22544 } | |
| 22545 if (_json.containsKey("name")) { | |
| 22546 name = _json["name"]; | |
| 22547 } | |
| 22548 } | |
| 22549 | |
| 22550 core.Map toJson() { | |
| 22551 var _json = new core.Map(); | |
| 22552 if (accountId != null) { | |
| 22553 _json["accountId"] = accountId; | |
| 22554 } | |
| 22555 if (id != null) { | |
| 22556 _json["id"] = id; | |
| 22557 } | |
| 22558 if (kind != null) { | |
| 22559 _json["kind"] = kind; | |
| 22560 } | |
| 22561 if (name != null) { | |
| 22562 _json["name"] = name; | |
| 22563 } | |
| 22564 return _json; | |
| 22565 } | |
| 22566 } | |
| 22567 | |
| 22568 /** Placement Tag */ | |
| 22569 class PlacementTag { | |
| 22570 /** Placement ID */ | |
| 22571 core.String placementId; | |
| 22572 /** Tags generated for this placement. */ | |
| 22573 core.List<TagData> tagDatas; | |
| 22574 | |
| 22575 PlacementTag(); | |
| 22576 | |
| 22577 PlacementTag.fromJson(core.Map _json) { | |
| 22578 if (_json.containsKey("placementId")) { | |
| 22579 placementId = _json["placementId"]; | |
| 22580 } | |
| 22581 if (_json.containsKey("tagDatas")) { | |
| 22582 tagDatas = _json["tagDatas"].map((value) => new TagData.fromJson(value)).t
oList(); | |
| 22583 } | |
| 22584 } | |
| 22585 | |
| 22586 core.Map toJson() { | |
| 22587 var _json = new core.Map(); | |
| 22588 if (placementId != null) { | |
| 22589 _json["placementId"] = placementId; | |
| 22590 } | |
| 22591 if (tagDatas != null) { | |
| 22592 _json["tagDatas"] = tagDatas.map((value) => (value).toJson()).toList(); | |
| 22593 } | |
| 22594 return _json; | |
| 22595 } | |
| 22596 } | |
| 22597 | |
| 22598 /** Placement GenerateTags Response */ | |
| 22599 class PlacementsGenerateTagsResponse { | |
| 22600 /** | |
| 22601 * Identifies what kind of resource this is. Value: the fixed string | |
| 22602 * "dfareporting#placementsGenerateTagsResponse". | |
| 22603 */ | |
| 22604 core.String kind; | |
| 22605 /** Set of generated tags for the specified placements. */ | |
| 22606 core.List<PlacementTag> placementTags; | |
| 22607 | |
| 22608 PlacementsGenerateTagsResponse(); | |
| 22609 | |
| 22610 PlacementsGenerateTagsResponse.fromJson(core.Map _json) { | |
| 22611 if (_json.containsKey("kind")) { | |
| 22612 kind = _json["kind"]; | |
| 22613 } | |
| 22614 if (_json.containsKey("placementTags")) { | |
| 22615 placementTags = _json["placementTags"].map((value) => new PlacementTag.fro
mJson(value)).toList(); | |
| 22616 } | |
| 22617 } | |
| 22618 | |
| 22619 core.Map toJson() { | |
| 22620 var _json = new core.Map(); | |
| 22621 if (kind != null) { | |
| 22622 _json["kind"] = kind; | |
| 22623 } | |
| 22624 if (placementTags != null) { | |
| 22625 _json["placementTags"] = placementTags.map((value) => (value).toJson()).to
List(); | |
| 22626 } | |
| 22627 return _json; | |
| 22628 } | |
| 22629 } | |
| 22630 | |
| 22631 /** Placement List Response */ | |
| 22632 class PlacementsListResponse { | |
| 22633 /** | |
| 22634 * Identifies what kind of resource this is. Value: the fixed string | |
| 22635 * "dfareporting#placementsListResponse". | |
| 22636 */ | |
| 22637 core.String kind; | |
| 22638 /** Pagination token to be used for the next list operation. */ | |
| 22639 core.String nextPageToken; | |
| 22640 /** Placement collection. */ | |
| 22641 core.List<Placement> placements; | |
| 22642 | |
| 22643 PlacementsListResponse(); | |
| 22644 | |
| 22645 PlacementsListResponse.fromJson(core.Map _json) { | |
| 22646 if (_json.containsKey("kind")) { | |
| 22647 kind = _json["kind"]; | |
| 22648 } | |
| 22649 if (_json.containsKey("nextPageToken")) { | |
| 22650 nextPageToken = _json["nextPageToken"]; | |
| 22651 } | |
| 22652 if (_json.containsKey("placements")) { | |
| 22653 placements = _json["placements"].map((value) => new Placement.fromJson(val
ue)).toList(); | |
| 22654 } | |
| 22655 } | |
| 22656 | |
| 22657 core.Map toJson() { | |
| 22658 var _json = new core.Map(); | |
| 22659 if (kind != null) { | |
| 22660 _json["kind"] = kind; | |
| 22661 } | |
| 22662 if (nextPageToken != null) { | |
| 22663 _json["nextPageToken"] = nextPageToken; | |
| 22664 } | |
| 22665 if (placements != null) { | |
| 22666 _json["placements"] = placements.map((value) => (value).toJson()).toList()
; | |
| 22667 } | |
| 22668 return _json; | |
| 22669 } | |
| 22670 } | |
| 22671 | |
| 22672 /** Contains information about a platform type that can be targeted by ads. */ | |
| 22673 class PlatformType { | |
| 22674 /** ID of this platform type. */ | |
| 22675 core.String id; | |
| 22676 /** | |
| 22677 * Identifies what kind of resource this is. Value: the fixed string | |
| 22678 * "dfareporting#platformType". | |
| 22679 */ | |
| 22680 core.String kind; | |
| 22681 /** Name of this platform type. */ | |
| 22682 core.String name; | |
| 22683 | |
| 22684 PlatformType(); | |
| 22685 | |
| 22686 PlatformType.fromJson(core.Map _json) { | |
| 22687 if (_json.containsKey("id")) { | |
| 22688 id = _json["id"]; | |
| 22689 } | |
| 22690 if (_json.containsKey("kind")) { | |
| 22691 kind = _json["kind"]; | |
| 22692 } | |
| 22693 if (_json.containsKey("name")) { | |
| 22694 name = _json["name"]; | |
| 22695 } | |
| 22696 } | |
| 22697 | |
| 22698 core.Map toJson() { | |
| 22699 var _json = new core.Map(); | |
| 22700 if (id != null) { | |
| 22701 _json["id"] = id; | |
| 22702 } | |
| 22703 if (kind != null) { | |
| 22704 _json["kind"] = kind; | |
| 22705 } | |
| 22706 if (name != null) { | |
| 22707 _json["name"] = name; | |
| 22708 } | |
| 22709 return _json; | |
| 22710 } | |
| 22711 } | |
| 22712 | |
| 22713 /** Platform Type List Response */ | |
| 22714 class PlatformTypesListResponse { | |
| 22715 /** | |
| 22716 * Identifies what kind of resource this is. Value: the fixed string | |
| 22717 * "dfareporting#platformTypesListResponse". | |
| 22718 */ | |
| 22719 core.String kind; | |
| 22720 /** Platform type collection. */ | |
| 22721 core.List<PlatformType> platformTypes; | |
| 22722 | |
| 22723 PlatformTypesListResponse(); | |
| 22724 | |
| 22725 PlatformTypesListResponse.fromJson(core.Map _json) { | |
| 22726 if (_json.containsKey("kind")) { | |
| 22727 kind = _json["kind"]; | |
| 22728 } | |
| 22729 if (_json.containsKey("platformTypes")) { | |
| 22730 platformTypes = _json["platformTypes"].map((value) => new PlatformType.fro
mJson(value)).toList(); | |
| 22731 } | |
| 22732 } | |
| 22733 | |
| 22734 core.Map toJson() { | |
| 22735 var _json = new core.Map(); | |
| 22736 if (kind != null) { | |
| 22737 _json["kind"] = kind; | |
| 22738 } | |
| 22739 if (platformTypes != null) { | |
| 22740 _json["platformTypes"] = platformTypes.map((value) => (value).toJson()).to
List(); | |
| 22741 } | |
| 22742 return _json; | |
| 22743 } | |
| 22744 } | |
| 22745 | |
| 22746 /** Popup Window Properties. */ | |
| 22747 class PopupWindowProperties { | |
| 22748 /** | |
| 22749 * Popup dimension for a creative. This is a read-only field. Applicable to | |
| 22750 * the following creative types: all RICH_MEDIA and all VPAID | |
| 22751 */ | |
| 22752 Size dimension; | |
| 22753 /** | |
| 22754 * Upper-left corner coordinates of the popup window. Applicable if | |
| 22755 * positionType is COORDINATES. | |
| 22756 */ | |
| 22757 OffsetPosition offset; | |
| 22758 /** | |
| 22759 * Popup window position either centered or at specific coordinate. | |
| 22760 * Possible string values are: | |
| 22761 * - "CENTER" | |
| 22762 * - "COORDINATES" | |
| 22763 */ | |
| 22764 core.String positionType; | |
| 22765 /** Whether to display the browser address bar. */ | |
| 22766 core.bool showAddressBar; | |
| 22767 /** Whether to display the browser menu bar. */ | |
| 22768 core.bool showMenuBar; | |
| 22769 /** Whether to display the browser scroll bar. */ | |
| 22770 core.bool showScrollBar; | |
| 22771 /** Whether to display the browser status bar. */ | |
| 22772 core.bool showStatusBar; | |
| 22773 /** Whether to display the browser tool bar. */ | |
| 22774 core.bool showToolBar; | |
| 22775 /** Title of popup window. */ | |
| 22776 core.String title; | |
| 22777 | |
| 22778 PopupWindowProperties(); | |
| 22779 | |
| 22780 PopupWindowProperties.fromJson(core.Map _json) { | |
| 22781 if (_json.containsKey("dimension")) { | |
| 22782 dimension = new Size.fromJson(_json["dimension"]); | |
| 22783 } | |
| 22784 if (_json.containsKey("offset")) { | |
| 22785 offset = new OffsetPosition.fromJson(_json["offset"]); | |
| 22786 } | |
| 22787 if (_json.containsKey("positionType")) { | |
| 22788 positionType = _json["positionType"]; | |
| 22789 } | |
| 22790 if (_json.containsKey("showAddressBar")) { | |
| 22791 showAddressBar = _json["showAddressBar"]; | |
| 22792 } | |
| 22793 if (_json.containsKey("showMenuBar")) { | |
| 22794 showMenuBar = _json["showMenuBar"]; | |
| 22795 } | |
| 22796 if (_json.containsKey("showScrollBar")) { | |
| 22797 showScrollBar = _json["showScrollBar"]; | |
| 22798 } | |
| 22799 if (_json.containsKey("showStatusBar")) { | |
| 22800 showStatusBar = _json["showStatusBar"]; | |
| 22801 } | |
| 22802 if (_json.containsKey("showToolBar")) { | |
| 22803 showToolBar = _json["showToolBar"]; | |
| 22804 } | |
| 22805 if (_json.containsKey("title")) { | |
| 22806 title = _json["title"]; | |
| 22807 } | |
| 22808 } | |
| 22809 | |
| 22810 core.Map toJson() { | |
| 22811 var _json = new core.Map(); | |
| 22812 if (dimension != null) { | |
| 22813 _json["dimension"] = (dimension).toJson(); | |
| 22814 } | |
| 22815 if (offset != null) { | |
| 22816 _json["offset"] = (offset).toJson(); | |
| 22817 } | |
| 22818 if (positionType != null) { | |
| 22819 _json["positionType"] = positionType; | |
| 22820 } | |
| 22821 if (showAddressBar != null) { | |
| 22822 _json["showAddressBar"] = showAddressBar; | |
| 22823 } | |
| 22824 if (showMenuBar != null) { | |
| 22825 _json["showMenuBar"] = showMenuBar; | |
| 22826 } | |
| 22827 if (showScrollBar != null) { | |
| 22828 _json["showScrollBar"] = showScrollBar; | |
| 22829 } | |
| 22830 if (showStatusBar != null) { | |
| 22831 _json["showStatusBar"] = showStatusBar; | |
| 22832 } | |
| 22833 if (showToolBar != null) { | |
| 22834 _json["showToolBar"] = showToolBar; | |
| 22835 } | |
| 22836 if (title != null) { | |
| 22837 _json["title"] = title; | |
| 22838 } | |
| 22839 return _json; | |
| 22840 } | |
| 22841 } | |
| 22842 | |
| 22843 /** Contains information about a postal code that can be targeted by ads. */ | |
| 22844 class PostalCode { | |
| 22845 /** Postal code. This is equivalent to the id field. */ | |
| 22846 core.String code; | |
| 22847 /** Country code of the country to which this postal code belongs. */ | |
| 22848 core.String countryCode; | |
| 22849 /** DART ID of the country to which this postal code belongs. */ | |
| 22850 core.String countryDartId; | |
| 22851 /** ID of this postal code. */ | |
| 22852 core.String id; | |
| 22853 /** | |
| 22854 * Identifies what kind of resource this is. Value: the fixed string | |
| 22855 * "dfareporting#postalCode". | |
| 22856 */ | |
| 22857 core.String kind; | |
| 22858 | |
| 22859 PostalCode(); | |
| 22860 | |
| 22861 PostalCode.fromJson(core.Map _json) { | |
| 22862 if (_json.containsKey("code")) { | |
| 22863 code = _json["code"]; | |
| 22864 } | |
| 22865 if (_json.containsKey("countryCode")) { | |
| 22866 countryCode = _json["countryCode"]; | |
| 22867 } | |
| 22868 if (_json.containsKey("countryDartId")) { | |
| 22869 countryDartId = _json["countryDartId"]; | |
| 22870 } | |
| 22871 if (_json.containsKey("id")) { | |
| 22872 id = _json["id"]; | |
| 22873 } | |
| 22874 if (_json.containsKey("kind")) { | |
| 22875 kind = _json["kind"]; | |
| 22876 } | |
| 22877 } | |
| 22878 | |
| 22879 core.Map toJson() { | |
| 22880 var _json = new core.Map(); | |
| 22881 if (code != null) { | |
| 22882 _json["code"] = code; | |
| 22883 } | |
| 22884 if (countryCode != null) { | |
| 22885 _json["countryCode"] = countryCode; | |
| 22886 } | |
| 22887 if (countryDartId != null) { | |
| 22888 _json["countryDartId"] = countryDartId; | |
| 22889 } | |
| 22890 if (id != null) { | |
| 22891 _json["id"] = id; | |
| 22892 } | |
| 22893 if (kind != null) { | |
| 22894 _json["kind"] = kind; | |
| 22895 } | |
| 22896 return _json; | |
| 22897 } | |
| 22898 } | |
| 22899 | |
| 22900 /** Postal Code List Response */ | |
| 22901 class PostalCodesListResponse { | |
| 22902 /** | |
| 22903 * Identifies what kind of resource this is. Value: the fixed string | |
| 22904 * "dfareporting#postalCodesListResponse". | |
| 22905 */ | |
| 22906 core.String kind; | |
| 22907 /** Postal code collection. */ | |
| 22908 core.List<PostalCode> postalCodes; | |
| 22909 | |
| 22910 PostalCodesListResponse(); | |
| 22911 | |
| 22912 PostalCodesListResponse.fromJson(core.Map _json) { | |
| 22913 if (_json.containsKey("kind")) { | |
| 22914 kind = _json["kind"]; | |
| 22915 } | |
| 22916 if (_json.containsKey("postalCodes")) { | |
| 22917 postalCodes = _json["postalCodes"].map((value) => new PostalCode.fromJson(
value)).toList(); | |
| 22918 } | |
| 22919 } | |
| 22920 | |
| 22921 core.Map toJson() { | |
| 22922 var _json = new core.Map(); | |
| 22923 if (kind != null) { | |
| 22924 _json["kind"] = kind; | |
| 22925 } | |
| 22926 if (postalCodes != null) { | |
| 22927 _json["postalCodes"] = postalCodes.map((value) => (value).toJson()).toList
(); | |
| 22928 } | |
| 22929 return _json; | |
| 22930 } | |
| 22931 } | |
| 22932 | |
| 22933 /** Pricing Information */ | |
| 22934 class Pricing { | |
| 22935 /** | |
| 22936 * Cap cost type of this inventory item. | |
| 22937 * Possible string values are: | |
| 22938 * - "PLANNING_PLACEMENT_CAP_COST_TYPE_CUMULATIVE" | |
| 22939 * - "PLANNING_PLACEMENT_CAP_COST_TYPE_MONTHLY" | |
| 22940 * - "PLANNING_PLACEMENT_CAP_COST_TYPE_NONE" | |
| 22941 */ | |
| 22942 core.String capCostType; | |
| 22943 /** End date of this inventory item. */ | |
| 22944 core.DateTime endDate; | |
| 22945 /** | |
| 22946 * Flights of this inventory item. A flight (a.k.a. pricing period) represents | |
| 22947 * the inventory item pricing information for a specific period of time. | |
| 22948 */ | |
| 22949 core.List<Flight> flights; | |
| 22950 /** | |
| 22951 * Group type of this inventory item if it represents a placement group. Is | |
| 22952 * null otherwise. There are two type of placement groups: | |
| 22953 * PLANNING_PLACEMENT_GROUP_TYPE_PACKAGE is a simple group of inventory items | |
| 22954 * that acts as a single pricing point for a group of tags. | |
| 22955 * PLANNING_PLACEMENT_GROUP_TYPE_ROADBLOCK is a group of inventory items that | |
| 22956 * not only acts as a single pricing point, but also assumes that all the tags | |
| 22957 * in it will be served at the same time. A roadblock requires one of its | |
| 22958 * assigned inventory items to be marked as primary. | |
| 22959 * Possible string values are: | |
| 22960 * - "PLANNING_PLACEMENT_GROUP_TYPE_PACKAGE" | |
| 22961 * - "PLANNING_PLACEMENT_GROUP_TYPE_ROADBLOCK" | |
| 22962 */ | |
| 22963 core.String groupType; | |
| 22964 /** | |
| 22965 * Pricing type of this inventory item. | |
| 22966 * Possible string values are: | |
| 22967 * - "PLANNING_PLACEMENT_PRICING_TYPE_CLICKS" | |
| 22968 * - "PLANNING_PLACEMENT_PRICING_TYPE_CPA" | |
| 22969 * - "PLANNING_PLACEMENT_PRICING_TYPE_CPC" | |
| 22970 * - "PLANNING_PLACEMENT_PRICING_TYPE_CPM" | |
| 22971 * - "PLANNING_PLACEMENT_PRICING_TYPE_CPM_ACTIVEVIEW" | |
| 22972 * - "PLANNING_PLACEMENT_PRICING_TYPE_FLAT_RATE_CLICKS" | |
| 22973 * - "PLANNING_PLACEMENT_PRICING_TYPE_FLAT_RATE_IMPRESSIONS" | |
| 22974 * - "PLANNING_PLACEMENT_PRICING_TYPE_IMPRESSIONS" | |
| 22975 */ | |
| 22976 core.String pricingType; | |
| 22977 /** Start date of this inventory item. */ | |
| 22978 core.DateTime startDate; | |
| 22979 | |
| 22980 Pricing(); | |
| 22981 | |
| 22982 Pricing.fromJson(core.Map _json) { | |
| 22983 if (_json.containsKey("capCostType")) { | |
| 22984 capCostType = _json["capCostType"]; | |
| 22985 } | |
| 22986 if (_json.containsKey("endDate")) { | |
| 22987 endDate = core.DateTime.parse(_json["endDate"]); | |
| 22988 } | |
| 22989 if (_json.containsKey("flights")) { | |
| 22990 flights = _json["flights"].map((value) => new Flight.fromJson(value)).toLi
st(); | |
| 22991 } | |
| 22992 if (_json.containsKey("groupType")) { | |
| 22993 groupType = _json["groupType"]; | |
| 22994 } | |
| 22995 if (_json.containsKey("pricingType")) { | |
| 22996 pricingType = _json["pricingType"]; | |
| 22997 } | |
| 22998 if (_json.containsKey("startDate")) { | |
| 22999 startDate = core.DateTime.parse(_json["startDate"]); | |
| 23000 } | |
| 23001 } | |
| 23002 | |
| 23003 core.Map toJson() { | |
| 23004 var _json = new core.Map(); | |
| 23005 if (capCostType != null) { | |
| 23006 _json["capCostType"] = capCostType; | |
| 23007 } | |
| 23008 if (endDate != null) { | |
| 23009 _json["endDate"] = "${(endDate).year.toString().padLeft(4, '0')}-${(endDat
e).month.toString().padLeft(2, '0')}-${(endDate).day.toString().padLeft(2, '0')}
"; | |
| 23010 } | |
| 23011 if (flights != null) { | |
| 23012 _json["flights"] = flights.map((value) => (value).toJson()).toList(); | |
| 23013 } | |
| 23014 if (groupType != null) { | |
| 23015 _json["groupType"] = groupType; | |
| 23016 } | |
| 23017 if (pricingType != null) { | |
| 23018 _json["pricingType"] = pricingType; | |
| 23019 } | |
| 23020 if (startDate != null) { | |
| 23021 _json["startDate"] = "${(startDate).year.toString().padLeft(4, '0')}-${(st
artDate).month.toString().padLeft(2, '0')}-${(startDate).day.toString().padLeft(
2, '0')}"; | |
| 23022 } | |
| 23023 return _json; | |
| 23024 } | |
| 23025 } | |
| 23026 | |
| 23027 /** Pricing Schedule */ | |
| 23028 class PricingSchedule { | |
| 23029 /** | |
| 23030 * Placement cap cost option. | |
| 23031 * Possible string values are: | |
| 23032 * - "CAP_COST_CUMULATIVE" | |
| 23033 * - "CAP_COST_MONTHLY" | |
| 23034 * - "CAP_COST_NONE" | |
| 23035 */ | |
| 23036 core.String capCostOption; | |
| 23037 /** Whether cap costs are ignored by ad serving. */ | |
| 23038 core.bool disregardOverdelivery; | |
| 23039 /** | |
| 23040 * Placement end date. This date must be later than, or the same day as, the | |
| 23041 * placement start date, but not later than the campaign end date. If, for | |
| 23042 * example, you set 6/25/2015 as both the start and end dates, the effective | |
| 23043 * placement date is just that day only, 6/25/2015. The hours, minutes, and | |
| 23044 * seconds of the end date should not be set, as doing so will result in an | |
| 23045 * error. This field is required on insertion. | |
| 23046 */ | |
| 23047 core.DateTime endDate; | |
| 23048 /** | |
| 23049 * Whether this placement is flighted. If true, pricing periods will be | |
| 23050 * computed automatically. | |
| 23051 */ | |
| 23052 core.bool flighted; | |
| 23053 /** | |
| 23054 * Floodlight activity ID associated with this placement. This field should be | |
| 23055 * set when placement pricing type is set to PRICING_TYPE_CPA. | |
| 23056 */ | |
| 23057 core.String floodlightActivityId; | |
| 23058 /** Pricing periods for this placement. */ | |
| 23059 core.List<PricingSchedulePricingPeriod> pricingPeriods; | |
| 23060 /** | |
| 23061 * Placement pricing type. This field is required on insertion. | |
| 23062 * Possible string values are: | |
| 23063 * - "PRICING_TYPE_CPA" | |
| 23064 * - "PRICING_TYPE_CPC" | |
| 23065 * - "PRICING_TYPE_CPM" | |
| 23066 * - "PRICING_TYPE_CPM_ACTIVEVIEW" | |
| 23067 * - "PRICING_TYPE_FLAT_RATE_CLICKS" | |
| 23068 * - "PRICING_TYPE_FLAT_RATE_IMPRESSIONS" | |
| 23069 */ | |
| 23070 core.String pricingType; | |
| 23071 /** | |
| 23072 * Placement start date. This date must be later than, or the same day as, the | |
| 23073 * campaign start date. The hours, minutes, and seconds of the start date | |
| 23074 * should not be set, as doing so will result in an error. This field is | |
| 23075 * required on insertion. | |
| 23076 */ | |
| 23077 core.DateTime startDate; | |
| 23078 /** | |
| 23079 * Testing start date of this placement. The hours, minutes, and seconds of | |
| 23080 * the start date should not be set, as doing so will result in an error. | |
| 23081 */ | |
| 23082 core.DateTime testingStartDate; | |
| 23083 | |
| 23084 PricingSchedule(); | |
| 23085 | |
| 23086 PricingSchedule.fromJson(core.Map _json) { | |
| 23087 if (_json.containsKey("capCostOption")) { | |
| 23088 capCostOption = _json["capCostOption"]; | |
| 23089 } | |
| 23090 if (_json.containsKey("disregardOverdelivery")) { | |
| 23091 disregardOverdelivery = _json["disregardOverdelivery"]; | |
| 23092 } | |
| 23093 if (_json.containsKey("endDate")) { | |
| 23094 endDate = core.DateTime.parse(_json["endDate"]); | |
| 23095 } | |
| 23096 if (_json.containsKey("flighted")) { | |
| 23097 flighted = _json["flighted"]; | |
| 23098 } | |
| 23099 if (_json.containsKey("floodlightActivityId")) { | |
| 23100 floodlightActivityId = _json["floodlightActivityId"]; | |
| 23101 } | |
| 23102 if (_json.containsKey("pricingPeriods")) { | |
| 23103 pricingPeriods = _json["pricingPeriods"].map((value) => new PricingSchedul
ePricingPeriod.fromJson(value)).toList(); | |
| 23104 } | |
| 23105 if (_json.containsKey("pricingType")) { | |
| 23106 pricingType = _json["pricingType"]; | |
| 23107 } | |
| 23108 if (_json.containsKey("startDate")) { | |
| 23109 startDate = core.DateTime.parse(_json["startDate"]); | |
| 23110 } | |
| 23111 if (_json.containsKey("testingStartDate")) { | |
| 23112 testingStartDate = core.DateTime.parse(_json["testingStartDate"]); | |
| 23113 } | |
| 23114 } | |
| 23115 | |
| 23116 core.Map toJson() { | |
| 23117 var _json = new core.Map(); | |
| 23118 if (capCostOption != null) { | |
| 23119 _json["capCostOption"] = capCostOption; | |
| 23120 } | |
| 23121 if (disregardOverdelivery != null) { | |
| 23122 _json["disregardOverdelivery"] = disregardOverdelivery; | |
| 23123 } | |
| 23124 if (endDate != null) { | |
| 23125 _json["endDate"] = "${(endDate).year.toString().padLeft(4, '0')}-${(endDat
e).month.toString().padLeft(2, '0')}-${(endDate).day.toString().padLeft(2, '0')}
"; | |
| 23126 } | |
| 23127 if (flighted != null) { | |
| 23128 _json["flighted"] = flighted; | |
| 23129 } | |
| 23130 if (floodlightActivityId != null) { | |
| 23131 _json["floodlightActivityId"] = floodlightActivityId; | |
| 23132 } | |
| 23133 if (pricingPeriods != null) { | |
| 23134 _json["pricingPeriods"] = pricingPeriods.map((value) => (value).toJson()).
toList(); | |
| 23135 } | |
| 23136 if (pricingType != null) { | |
| 23137 _json["pricingType"] = pricingType; | |
| 23138 } | |
| 23139 if (startDate != null) { | |
| 23140 _json["startDate"] = "${(startDate).year.toString().padLeft(4, '0')}-${(st
artDate).month.toString().padLeft(2, '0')}-${(startDate).day.toString().padLeft(
2, '0')}"; | |
| 23141 } | |
| 23142 if (testingStartDate != null) { | |
| 23143 _json["testingStartDate"] = "${(testingStartDate).year.toString().padLeft(
4, '0')}-${(testingStartDate).month.toString().padLeft(2, '0')}-${(testingStartD
ate).day.toString().padLeft(2, '0')}"; | |
| 23144 } | |
| 23145 return _json; | |
| 23146 } | |
| 23147 } | |
| 23148 | |
| 23149 /** Pricing Period */ | |
| 23150 class PricingSchedulePricingPeriod { | |
| 23151 /** | |
| 23152 * Pricing period end date. This date must be later than, or the same day as, | |
| 23153 * the pricing period start date, but not later than the placement end date. | |
| 23154 * The period end date can be the same date as the period start date. If, for | |
| 23155 * example, you set 6/25/2015 as both the start and end dates, the effective | |
| 23156 * pricing period date is just that day only, 6/25/2015. The hours, minutes, | |
| 23157 * and seconds of the end date should not be set, as doing so will result in | |
| 23158 * an error. | |
| 23159 */ | |
| 23160 core.DateTime endDate; | |
| 23161 /** Comments for this pricing period. */ | |
| 23162 core.String pricingComment; | |
| 23163 /** Rate or cost of this pricing period. */ | |
| 23164 core.String rateOrCostNanos; | |
| 23165 /** | |
| 23166 * Pricing period start date. This date must be later than, or the same day | |
| 23167 * as, the placement start date. The hours, minutes, and seconds of the start | |
| 23168 * date should not be set, as doing so will result in an error. | |
| 23169 */ | |
| 23170 core.DateTime startDate; | |
| 23171 /** Units of this pricing period. */ | |
| 23172 core.String units; | |
| 23173 | |
| 23174 PricingSchedulePricingPeriod(); | |
| 23175 | |
| 23176 PricingSchedulePricingPeriod.fromJson(core.Map _json) { | |
| 23177 if (_json.containsKey("endDate")) { | |
| 23178 endDate = core.DateTime.parse(_json["endDate"]); | |
| 23179 } | |
| 23180 if (_json.containsKey("pricingComment")) { | |
| 23181 pricingComment = _json["pricingComment"]; | |
| 23182 } | |
| 23183 if (_json.containsKey("rateOrCostNanos")) { | |
| 23184 rateOrCostNanos = _json["rateOrCostNanos"]; | |
| 23185 } | |
| 23186 if (_json.containsKey("startDate")) { | |
| 23187 startDate = core.DateTime.parse(_json["startDate"]); | |
| 23188 } | |
| 23189 if (_json.containsKey("units")) { | |
| 23190 units = _json["units"]; | |
| 23191 } | |
| 23192 } | |
| 23193 | |
| 23194 core.Map toJson() { | |
| 23195 var _json = new core.Map(); | |
| 23196 if (endDate != null) { | |
| 23197 _json["endDate"] = "${(endDate).year.toString().padLeft(4, '0')}-${(endDat
e).month.toString().padLeft(2, '0')}-${(endDate).day.toString().padLeft(2, '0')}
"; | |
| 23198 } | |
| 23199 if (pricingComment != null) { | |
| 23200 _json["pricingComment"] = pricingComment; | |
| 23201 } | |
| 23202 if (rateOrCostNanos != null) { | |
| 23203 _json["rateOrCostNanos"] = rateOrCostNanos; | |
| 23204 } | |
| 23205 if (startDate != null) { | |
| 23206 _json["startDate"] = "${(startDate).year.toString().padLeft(4, '0')}-${(st
artDate).month.toString().padLeft(2, '0')}-${(startDate).day.toString().padLeft(
2, '0')}"; | |
| 23207 } | |
| 23208 if (units != null) { | |
| 23209 _json["units"] = units; | |
| 23210 } | |
| 23211 return _json; | |
| 23212 } | |
| 23213 } | |
| 23214 | |
| 23215 /** Contains properties of a DoubleClick Planning project. */ | |
| 23216 class Project { | |
| 23217 /** Account ID of this project. */ | |
| 23218 core.String accountId; | |
| 23219 /** Advertiser ID of this project. */ | |
| 23220 core.String advertiserId; | |
| 23221 /** | |
| 23222 * Audience age group of this project. | |
| 23223 * Possible string values are: | |
| 23224 * - "PLANNING_AUDIENCE_AGE_18_24" | |
| 23225 * - "PLANNING_AUDIENCE_AGE_25_34" | |
| 23226 * - "PLANNING_AUDIENCE_AGE_35_44" | |
| 23227 * - "PLANNING_AUDIENCE_AGE_45_54" | |
| 23228 * - "PLANNING_AUDIENCE_AGE_55_64" | |
| 23229 * - "PLANNING_AUDIENCE_AGE_65_OR_MORE" | |
| 23230 * - "PLANNING_AUDIENCE_AGE_UNKNOWN" | |
| 23231 */ | |
| 23232 core.String audienceAgeGroup; | |
| 23233 /** | |
| 23234 * Audience gender of this project. | |
| 23235 * Possible string values are: | |
| 23236 * - "PLANNING_AUDIENCE_GENDER_FEMALE" | |
| 23237 * - "PLANNING_AUDIENCE_GENDER_MALE" | |
| 23238 */ | |
| 23239 core.String audienceGender; | |
| 23240 /** | |
| 23241 * Budget of this project in the currency specified by the current account. | |
| 23242 * The value stored in this field represents only the non-fractional amount. | |
| 23243 * For example, for USD, the smallest value that can be represented by this | |
| 23244 * field is 1 US dollar. | |
| 23245 */ | |
| 23246 core.String budget; | |
| 23247 /** Client billing code of this project. */ | |
| 23248 core.String clientBillingCode; | |
| 23249 /** Name of the project client. */ | |
| 23250 core.String clientName; | |
| 23251 /** End date of the project. */ | |
| 23252 core.DateTime endDate; | |
| 23253 /** ID of this project. This is a read-only, auto-generated field. */ | |
| 23254 core.String id; | |
| 23255 /** | |
| 23256 * Identifies what kind of resource this is. Value: the fixed string | |
| 23257 * "dfareporting#project". | |
| 23258 */ | |
| 23259 core.String kind; | |
| 23260 /** Information about the most recent modification of this project. */ | |
| 23261 LastModifiedInfo lastModifiedInfo; | |
| 23262 /** Name of this project. */ | |
| 23263 core.String name; | |
| 23264 /** Overview of this project. */ | |
| 23265 core.String overview; | |
| 23266 /** Start date of the project. */ | |
| 23267 core.DateTime startDate; | |
| 23268 /** Subaccount ID of this project. */ | |
| 23269 core.String subaccountId; | |
| 23270 /** Number of clicks that the advertiser is targeting. */ | |
| 23271 core.String targetClicks; | |
| 23272 /** Number of conversions that the advertiser is targeting. */ | |
| 23273 core.String targetConversions; | |
| 23274 /** CPA that the advertiser is targeting. */ | |
| 23275 core.String targetCpaNanos; | |
| 23276 /** CPC that the advertiser is targeting. */ | |
| 23277 core.String targetCpcNanos; | |
| 23278 /** CPM that the advertiser is targeting. */ | |
| 23279 core.String targetCpmNanos; | |
| 23280 /** Number of impressions that the advertiser is targeting. */ | |
| 23281 core.String targetImpressions; | |
| 23282 | |
| 23283 Project(); | |
| 23284 | |
| 23285 Project.fromJson(core.Map _json) { | |
| 23286 if (_json.containsKey("accountId")) { | |
| 23287 accountId = _json["accountId"]; | |
| 23288 } | |
| 23289 if (_json.containsKey("advertiserId")) { | |
| 23290 advertiserId = _json["advertiserId"]; | |
| 23291 } | |
| 23292 if (_json.containsKey("audienceAgeGroup")) { | |
| 23293 audienceAgeGroup = _json["audienceAgeGroup"]; | |
| 23294 } | |
| 23295 if (_json.containsKey("audienceGender")) { | |
| 23296 audienceGender = _json["audienceGender"]; | |
| 23297 } | |
| 23298 if (_json.containsKey("budget")) { | |
| 23299 budget = _json["budget"]; | |
| 23300 } | |
| 23301 if (_json.containsKey("clientBillingCode")) { | |
| 23302 clientBillingCode = _json["clientBillingCode"]; | |
| 23303 } | |
| 23304 if (_json.containsKey("clientName")) { | |
| 23305 clientName = _json["clientName"]; | |
| 23306 } | |
| 23307 if (_json.containsKey("endDate")) { | |
| 23308 endDate = core.DateTime.parse(_json["endDate"]); | |
| 23309 } | |
| 23310 if (_json.containsKey("id")) { | |
| 23311 id = _json["id"]; | |
| 23312 } | |
| 23313 if (_json.containsKey("kind")) { | |
| 23314 kind = _json["kind"]; | |
| 23315 } | |
| 23316 if (_json.containsKey("lastModifiedInfo")) { | |
| 23317 lastModifiedInfo = new LastModifiedInfo.fromJson(_json["lastModifiedInfo"]
); | |
| 23318 } | |
| 23319 if (_json.containsKey("name")) { | |
| 23320 name = _json["name"]; | |
| 23321 } | |
| 23322 if (_json.containsKey("overview")) { | |
| 23323 overview = _json["overview"]; | |
| 23324 } | |
| 23325 if (_json.containsKey("startDate")) { | |
| 23326 startDate = core.DateTime.parse(_json["startDate"]); | |
| 23327 } | |
| 23328 if (_json.containsKey("subaccountId")) { | |
| 23329 subaccountId = _json["subaccountId"]; | |
| 23330 } | |
| 23331 if (_json.containsKey("targetClicks")) { | |
| 23332 targetClicks = _json["targetClicks"]; | |
| 23333 } | |
| 23334 if (_json.containsKey("targetConversions")) { | |
| 23335 targetConversions = _json["targetConversions"]; | |
| 23336 } | |
| 23337 if (_json.containsKey("targetCpaNanos")) { | |
| 23338 targetCpaNanos = _json["targetCpaNanos"]; | |
| 23339 } | |
| 23340 if (_json.containsKey("targetCpcNanos")) { | |
| 23341 targetCpcNanos = _json["targetCpcNanos"]; | |
| 23342 } | |
| 23343 if (_json.containsKey("targetCpmNanos")) { | |
| 23344 targetCpmNanos = _json["targetCpmNanos"]; | |
| 23345 } | |
| 23346 if (_json.containsKey("targetImpressions")) { | |
| 23347 targetImpressions = _json["targetImpressions"]; | |
| 23348 } | |
| 23349 } | |
| 23350 | |
| 23351 core.Map toJson() { | |
| 23352 var _json = new core.Map(); | |
| 23353 if (accountId != null) { | |
| 23354 _json["accountId"] = accountId; | |
| 23355 } | |
| 23356 if (advertiserId != null) { | |
| 23357 _json["advertiserId"] = advertiserId; | |
| 23358 } | |
| 23359 if (audienceAgeGroup != null) { | |
| 23360 _json["audienceAgeGroup"] = audienceAgeGroup; | |
| 23361 } | |
| 23362 if (audienceGender != null) { | |
| 23363 _json["audienceGender"] = audienceGender; | |
| 23364 } | |
| 23365 if (budget != null) { | |
| 23366 _json["budget"] = budget; | |
| 23367 } | |
| 23368 if (clientBillingCode != null) { | |
| 23369 _json["clientBillingCode"] = clientBillingCode; | |
| 23370 } | |
| 23371 if (clientName != null) { | |
| 23372 _json["clientName"] = clientName; | |
| 23373 } | |
| 23374 if (endDate != null) { | |
| 23375 _json["endDate"] = "${(endDate).year.toString().padLeft(4, '0')}-${(endDat
e).month.toString().padLeft(2, '0')}-${(endDate).day.toString().padLeft(2, '0')}
"; | |
| 23376 } | |
| 23377 if (id != null) { | |
| 23378 _json["id"] = id; | |
| 23379 } | |
| 23380 if (kind != null) { | |
| 23381 _json["kind"] = kind; | |
| 23382 } | |
| 23383 if (lastModifiedInfo != null) { | |
| 23384 _json["lastModifiedInfo"] = (lastModifiedInfo).toJson(); | |
| 23385 } | |
| 23386 if (name != null) { | |
| 23387 _json["name"] = name; | |
| 23388 } | |
| 23389 if (overview != null) { | |
| 23390 _json["overview"] = overview; | |
| 23391 } | |
| 23392 if (startDate != null) { | |
| 23393 _json["startDate"] = "${(startDate).year.toString().padLeft(4, '0')}-${(st
artDate).month.toString().padLeft(2, '0')}-${(startDate).day.toString().padLeft(
2, '0')}"; | |
| 23394 } | |
| 23395 if (subaccountId != null) { | |
| 23396 _json["subaccountId"] = subaccountId; | |
| 23397 } | |
| 23398 if (targetClicks != null) { | |
| 23399 _json["targetClicks"] = targetClicks; | |
| 23400 } | |
| 23401 if (targetConversions != null) { | |
| 23402 _json["targetConversions"] = targetConversions; | |
| 23403 } | |
| 23404 if (targetCpaNanos != null) { | |
| 23405 _json["targetCpaNanos"] = targetCpaNanos; | |
| 23406 } | |
| 23407 if (targetCpcNanos != null) { | |
| 23408 _json["targetCpcNanos"] = targetCpcNanos; | |
| 23409 } | |
| 23410 if (targetCpmNanos != null) { | |
| 23411 _json["targetCpmNanos"] = targetCpmNanos; | |
| 23412 } | |
| 23413 if (targetImpressions != null) { | |
| 23414 _json["targetImpressions"] = targetImpressions; | |
| 23415 } | |
| 23416 return _json; | |
| 23417 } | |
| 23418 } | |
| 23419 | |
| 23420 /** Project List Response */ | |
| 23421 class ProjectsListResponse { | |
| 23422 /** | |
| 23423 * Identifies what kind of resource this is. Value: the fixed string | |
| 23424 * "dfareporting#projectsListResponse". | |
| 23425 */ | |
| 23426 core.String kind; | |
| 23427 /** Pagination token to be used for the next list operation. */ | |
| 23428 core.String nextPageToken; | |
| 23429 /** Project collection. */ | |
| 23430 core.List<Project> projects; | |
| 23431 | |
| 23432 ProjectsListResponse(); | |
| 23433 | |
| 23434 ProjectsListResponse.fromJson(core.Map _json) { | |
| 23435 if (_json.containsKey("kind")) { | |
| 23436 kind = _json["kind"]; | |
| 23437 } | |
| 23438 if (_json.containsKey("nextPageToken")) { | |
| 23439 nextPageToken = _json["nextPageToken"]; | |
| 23440 } | |
| 23441 if (_json.containsKey("projects")) { | |
| 23442 projects = _json["projects"].map((value) => new Project.fromJson(value)).t
oList(); | |
| 23443 } | |
| 23444 } | |
| 23445 | |
| 23446 core.Map toJson() { | |
| 23447 var _json = new core.Map(); | |
| 23448 if (kind != null) { | |
| 23449 _json["kind"] = kind; | |
| 23450 } | |
| 23451 if (nextPageToken != null) { | |
| 23452 _json["nextPageToken"] = nextPageToken; | |
| 23453 } | |
| 23454 if (projects != null) { | |
| 23455 _json["projects"] = projects.map((value) => (value).toJson()).toList(); | |
| 23456 } | |
| 23457 return _json; | |
| 23458 } | |
| 23459 } | |
| 23460 | |
| 23461 /** | |
| 23462 * Represents fields that are compatible to be selected for a report of type | |
| 23463 * "REACH". | |
| 23464 */ | |
| 23465 class ReachReportCompatibleFields { | |
| 23466 /** | |
| 23467 * Dimensions which are compatible to be selected in the "dimensionFilters" | |
| 23468 * section of the report. | |
| 23469 */ | |
| 23470 core.List<Dimension> dimensionFilters; | |
| 23471 /** | |
| 23472 * Dimensions which are compatible to be selected in the "dimensions" section | |
| 23473 * of the report. | |
| 23474 */ | |
| 23475 core.List<Dimension> dimensions; | |
| 23476 /** | |
| 23477 * The kind of resource this is, in this case | |
| 23478 * dfareporting#reachReportCompatibleFields. | |
| 23479 */ | |
| 23480 core.String kind; | |
| 23481 /** | |
| 23482 * Metrics which are compatible to be selected in the "metricNames" section of | |
| 23483 * the report. | |
| 23484 */ | |
| 23485 core.List<Metric> metrics; | |
| 23486 /** | |
| 23487 * Metrics which are compatible to be selected as activity metrics to pivot on | |
| 23488 * in the "activities" section of the report. | |
| 23489 */ | |
| 23490 core.List<Metric> pivotedActivityMetrics; | |
| 23491 /** | |
| 23492 * Metrics which are compatible to be selected in the | |
| 23493 * "reachByFrequencyMetricNames" section of the report. | |
| 23494 */ | |
| 23495 core.List<Metric> reachByFrequencyMetrics; | |
| 23496 | |
| 23497 ReachReportCompatibleFields(); | |
| 23498 | |
| 23499 ReachReportCompatibleFields.fromJson(core.Map _json) { | |
| 23500 if (_json.containsKey("dimensionFilters")) { | |
| 23501 dimensionFilters = _json["dimensionFilters"].map((value) => new Dimension.
fromJson(value)).toList(); | |
| 23502 } | |
| 23503 if (_json.containsKey("dimensions")) { | |
| 23504 dimensions = _json["dimensions"].map((value) => new Dimension.fromJson(val
ue)).toList(); | |
| 23505 } | |
| 23506 if (_json.containsKey("kind")) { | |
| 23507 kind = _json["kind"]; | |
| 23508 } | |
| 23509 if (_json.containsKey("metrics")) { | |
| 23510 metrics = _json["metrics"].map((value) => new Metric.fromJson(value)).toLi
st(); | |
| 23511 } | |
| 23512 if (_json.containsKey("pivotedActivityMetrics")) { | |
| 23513 pivotedActivityMetrics = _json["pivotedActivityMetrics"].map((value) => ne
w Metric.fromJson(value)).toList(); | |
| 23514 } | |
| 23515 if (_json.containsKey("reachByFrequencyMetrics")) { | |
| 23516 reachByFrequencyMetrics = _json["reachByFrequencyMetrics"].map((value) =>
new Metric.fromJson(value)).toList(); | |
| 23517 } | |
| 23518 } | |
| 23519 | |
| 23520 core.Map toJson() { | |
| 23521 var _json = new core.Map(); | |
| 23522 if (dimensionFilters != null) { | |
| 23523 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson
()).toList(); | |
| 23524 } | |
| 23525 if (dimensions != null) { | |
| 23526 _json["dimensions"] = dimensions.map((value) => (value).toJson()).toList()
; | |
| 23527 } | |
| 23528 if (kind != null) { | |
| 23529 _json["kind"] = kind; | |
| 23530 } | |
| 23531 if (metrics != null) { | |
| 23532 _json["metrics"] = metrics.map((value) => (value).toJson()).toList(); | |
| 23533 } | |
| 23534 if (pivotedActivityMetrics != null) { | |
| 23535 _json["pivotedActivityMetrics"] = pivotedActivityMetrics.map((value) => (v
alue).toJson()).toList(); | |
| 23536 } | |
| 23537 if (reachByFrequencyMetrics != null) { | |
| 23538 _json["reachByFrequencyMetrics"] = reachByFrequencyMetrics.map((value) =>
(value).toJson()).toList(); | |
| 23539 } | |
| 23540 return _json; | |
| 23541 } | |
| 23542 } | |
| 23543 | |
| 23544 /** Represents a recipient. */ | |
| 23545 class Recipient { | |
| 23546 /** | |
| 23547 * The delivery type for the recipient. | |
| 23548 * Possible string values are: | |
| 23549 * - "ATTACHMENT" | |
| 23550 * - "LINK" | |
| 23551 */ | |
| 23552 core.String deliveryType; | |
| 23553 /** The email address of the recipient. */ | |
| 23554 core.String email; | |
| 23555 /** The kind of resource this is, in this case dfareporting#recipient. */ | |
| 23556 core.String kind; | |
| 23557 | |
| 23558 Recipient(); | |
| 23559 | |
| 23560 Recipient.fromJson(core.Map _json) { | |
| 23561 if (_json.containsKey("deliveryType")) { | |
| 23562 deliveryType = _json["deliveryType"]; | |
| 23563 } | |
| 23564 if (_json.containsKey("email")) { | |
| 23565 email = _json["email"]; | |
| 23566 } | |
| 23567 if (_json.containsKey("kind")) { | |
| 23568 kind = _json["kind"]; | |
| 23569 } | |
| 23570 } | |
| 23571 | |
| 23572 core.Map toJson() { | |
| 23573 var _json = new core.Map(); | |
| 23574 if (deliveryType != null) { | |
| 23575 _json["deliveryType"] = deliveryType; | |
| 23576 } | |
| 23577 if (email != null) { | |
| 23578 _json["email"] = email; | |
| 23579 } | |
| 23580 if (kind != null) { | |
| 23581 _json["kind"] = kind; | |
| 23582 } | |
| 23583 return _json; | |
| 23584 } | |
| 23585 } | |
| 23586 | |
| 23587 /** Contains information about a region that can be targeted by ads. */ | |
| 23588 class Region { | |
| 23589 /** Country code of the country to which this region belongs. */ | |
| 23590 core.String countryCode; | |
| 23591 /** DART ID of the country to which this region belongs. */ | |
| 23592 core.String countryDartId; | |
| 23593 /** DART ID of this region. */ | |
| 23594 core.String dartId; | |
| 23595 /** | |
| 23596 * Identifies what kind of resource this is. Value: the fixed string | |
| 23597 * "dfareporting#region". | |
| 23598 */ | |
| 23599 core.String kind; | |
| 23600 /** Name of this region. */ | |
| 23601 core.String name; | |
| 23602 /** Region code. */ | |
| 23603 core.String regionCode; | |
| 23604 | |
| 23605 Region(); | |
| 23606 | |
| 23607 Region.fromJson(core.Map _json) { | |
| 23608 if (_json.containsKey("countryCode")) { | |
| 23609 countryCode = _json["countryCode"]; | |
| 23610 } | |
| 23611 if (_json.containsKey("countryDartId")) { | |
| 23612 countryDartId = _json["countryDartId"]; | |
| 23613 } | |
| 23614 if (_json.containsKey("dartId")) { | |
| 23615 dartId = _json["dartId"]; | |
| 23616 } | |
| 23617 if (_json.containsKey("kind")) { | |
| 23618 kind = _json["kind"]; | |
| 23619 } | |
| 23620 if (_json.containsKey("name")) { | |
| 23621 name = _json["name"]; | |
| 23622 } | |
| 23623 if (_json.containsKey("regionCode")) { | |
| 23624 regionCode = _json["regionCode"]; | |
| 23625 } | |
| 23626 } | |
| 23627 | |
| 23628 core.Map toJson() { | |
| 23629 var _json = new core.Map(); | |
| 23630 if (countryCode != null) { | |
| 23631 _json["countryCode"] = countryCode; | |
| 23632 } | |
| 23633 if (countryDartId != null) { | |
| 23634 _json["countryDartId"] = countryDartId; | |
| 23635 } | |
| 23636 if (dartId != null) { | |
| 23637 _json["dartId"] = dartId; | |
| 23638 } | |
| 23639 if (kind != null) { | |
| 23640 _json["kind"] = kind; | |
| 23641 } | |
| 23642 if (name != null) { | |
| 23643 _json["name"] = name; | |
| 23644 } | |
| 23645 if (regionCode != null) { | |
| 23646 _json["regionCode"] = regionCode; | |
| 23647 } | |
| 23648 return _json; | |
| 23649 } | |
| 23650 } | |
| 23651 | |
| 23652 /** Region List Response */ | |
| 23653 class RegionsListResponse { | |
| 23654 /** | |
| 23655 * Identifies what kind of resource this is. Value: the fixed string | |
| 23656 * "dfareporting#regionsListResponse". | |
| 23657 */ | |
| 23658 core.String kind; | |
| 23659 /** Region collection. */ | |
| 23660 core.List<Region> regions; | |
| 23661 | |
| 23662 RegionsListResponse(); | |
| 23663 | |
| 23664 RegionsListResponse.fromJson(core.Map _json) { | |
| 23665 if (_json.containsKey("kind")) { | |
| 23666 kind = _json["kind"]; | |
| 23667 } | |
| 23668 if (_json.containsKey("regions")) { | |
| 23669 regions = _json["regions"].map((value) => new Region.fromJson(value)).toLi
st(); | |
| 23670 } | |
| 23671 } | |
| 23672 | |
| 23673 core.Map toJson() { | |
| 23674 var _json = new core.Map(); | |
| 23675 if (kind != null) { | |
| 23676 _json["kind"] = kind; | |
| 23677 } | |
| 23678 if (regions != null) { | |
| 23679 _json["regions"] = regions.map((value) => (value).toJson()).toList(); | |
| 23680 } | |
| 23681 return _json; | |
| 23682 } | |
| 23683 } | |
| 23684 | |
| 23685 /** | |
| 23686 * Contains properties of a remarketing list. Remarketing enables you to create | |
| 23687 * lists of users who have performed specific actions on a site, then target ads | |
| 23688 * to members of those lists. This resource can be used to manage remarketing | |
| 23689 * lists that are owned by your advertisers. To see all remarketing lists that | |
| 23690 * are visible to your advertisers, including those that are shared to your | |
| 23691 * advertiser or account, use the TargetableRemarketingLists resource. | |
| 23692 */ | |
| 23693 class RemarketingList { | |
| 23694 /** | |
| 23695 * Account ID of this remarketing list. This is a read-only, auto-generated | |
| 23696 * field that is only returned in GET requests. | |
| 23697 */ | |
| 23698 core.String accountId; | |
| 23699 /** Whether this remarketing list is active. */ | |
| 23700 core.bool active; | |
| 23701 /** | |
| 23702 * Dimension value for the advertiser ID that owns this remarketing list. This | |
| 23703 * is a required field. | |
| 23704 */ | |
| 23705 core.String advertiserId; | |
| 23706 /** | |
| 23707 * Dimension value for the ID of the advertiser. This is a read-only, | |
| 23708 * auto-generated field. | |
| 23709 */ | |
| 23710 DimensionValue advertiserIdDimensionValue; | |
| 23711 /** Remarketing list description. */ | |
| 23712 core.String description; | |
| 23713 /** Remarketing list ID. This is a read-only, auto-generated field. */ | |
| 23714 core.String id; | |
| 23715 /** | |
| 23716 * Identifies what kind of resource this is. Value: the fixed string | |
| 23717 * "dfareporting#remarketingList". | |
| 23718 */ | |
| 23719 core.String kind; | |
| 23720 /** | |
| 23721 * Number of days that a user should remain in the remarketing list without an | |
| 23722 * impression. | |
| 23723 */ | |
| 23724 core.String lifeSpan; | |
| 23725 /** Rule used to populate the remarketing list with users. */ | |
| 23726 ListPopulationRule listPopulationRule; | |
| 23727 /** Number of users currently in the list. This is a read-only field. */ | |
| 23728 core.String listSize; | |
| 23729 /** | |
| 23730 * Product from which this remarketing list was originated. | |
| 23731 * Possible string values are: | |
| 23732 * - "REMARKETING_LIST_SOURCE_ADX" | |
| 23733 * - "REMARKETING_LIST_SOURCE_DBM" | |
| 23734 * - "REMARKETING_LIST_SOURCE_DFA" | |
| 23735 * - "REMARKETING_LIST_SOURCE_DFP" | |
| 23736 * - "REMARKETING_LIST_SOURCE_DMP" | |
| 23737 * - "REMARKETING_LIST_SOURCE_GA" | |
| 23738 * - "REMARKETING_LIST_SOURCE_GPLUS" | |
| 23739 * - "REMARKETING_LIST_SOURCE_OTHER" | |
| 23740 * - "REMARKETING_LIST_SOURCE_PLAY_STORE" | |
| 23741 * - "REMARKETING_LIST_SOURCE_XFP" | |
| 23742 * - "REMARKETING_LIST_SOURCE_YOUTUBE" | |
| 23743 */ | |
| 23744 core.String listSource; | |
| 23745 /** | |
| 23746 * Name of the remarketing list. This is a required field. Must be no greater | |
| 23747 * than 128 characters long. | |
| 23748 */ | |
| 23749 core.String name; | |
| 23750 /** | |
| 23751 * Subaccount ID of this remarketing list. This is a read-only, auto-generated | |
| 23752 * field that is only returned in GET requests. | |
| 23753 */ | |
| 23754 core.String subaccountId; | |
| 23755 | |
| 23756 RemarketingList(); | |
| 23757 | |
| 23758 RemarketingList.fromJson(core.Map _json) { | |
| 23759 if (_json.containsKey("accountId")) { | |
| 23760 accountId = _json["accountId"]; | |
| 23761 } | |
| 23762 if (_json.containsKey("active")) { | |
| 23763 active = _json["active"]; | |
| 23764 } | |
| 23765 if (_json.containsKey("advertiserId")) { | |
| 23766 advertiserId = _json["advertiserId"]; | |
| 23767 } | |
| 23768 if (_json.containsKey("advertiserIdDimensionValue")) { | |
| 23769 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser
IdDimensionValue"]); | |
| 23770 } | |
| 23771 if (_json.containsKey("description")) { | |
| 23772 description = _json["description"]; | |
| 23773 } | |
| 23774 if (_json.containsKey("id")) { | |
| 23775 id = _json["id"]; | |
| 23776 } | |
| 23777 if (_json.containsKey("kind")) { | |
| 23778 kind = _json["kind"]; | |
| 23779 } | |
| 23780 if (_json.containsKey("lifeSpan")) { | |
| 23781 lifeSpan = _json["lifeSpan"]; | |
| 23782 } | |
| 23783 if (_json.containsKey("listPopulationRule")) { | |
| 23784 listPopulationRule = new ListPopulationRule.fromJson(_json["listPopulation
Rule"]); | |
| 23785 } | |
| 23786 if (_json.containsKey("listSize")) { | |
| 23787 listSize = _json["listSize"]; | |
| 23788 } | |
| 23789 if (_json.containsKey("listSource")) { | |
| 23790 listSource = _json["listSource"]; | |
| 23791 } | |
| 23792 if (_json.containsKey("name")) { | |
| 23793 name = _json["name"]; | |
| 23794 } | |
| 23795 if (_json.containsKey("subaccountId")) { | |
| 23796 subaccountId = _json["subaccountId"]; | |
| 23797 } | |
| 23798 } | |
| 23799 | |
| 23800 core.Map toJson() { | |
| 23801 var _json = new core.Map(); | |
| 23802 if (accountId != null) { | |
| 23803 _json["accountId"] = accountId; | |
| 23804 } | |
| 23805 if (active != null) { | |
| 23806 _json["active"] = active; | |
| 23807 } | |
| 23808 if (advertiserId != null) { | |
| 23809 _json["advertiserId"] = advertiserId; | |
| 23810 } | |
| 23811 if (advertiserIdDimensionValue != null) { | |
| 23812 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson(
); | |
| 23813 } | |
| 23814 if (description != null) { | |
| 23815 _json["description"] = description; | |
| 23816 } | |
| 23817 if (id != null) { | |
| 23818 _json["id"] = id; | |
| 23819 } | |
| 23820 if (kind != null) { | |
| 23821 _json["kind"] = kind; | |
| 23822 } | |
| 23823 if (lifeSpan != null) { | |
| 23824 _json["lifeSpan"] = lifeSpan; | |
| 23825 } | |
| 23826 if (listPopulationRule != null) { | |
| 23827 _json["listPopulationRule"] = (listPopulationRule).toJson(); | |
| 23828 } | |
| 23829 if (listSize != null) { | |
| 23830 _json["listSize"] = listSize; | |
| 23831 } | |
| 23832 if (listSource != null) { | |
| 23833 _json["listSource"] = listSource; | |
| 23834 } | |
| 23835 if (name != null) { | |
| 23836 _json["name"] = name; | |
| 23837 } | |
| 23838 if (subaccountId != null) { | |
| 23839 _json["subaccountId"] = subaccountId; | |
| 23840 } | |
| 23841 return _json; | |
| 23842 } | |
| 23843 } | |
| 23844 | |
| 23845 /** | |
| 23846 * Contains properties of a remarketing list's sharing information. Sharing | |
| 23847 * allows other accounts or advertisers to target to your remarketing lists. | |
| 23848 * This resource can be used to manage remarketing list sharing to other | |
| 23849 * accounts and advertisers. | |
| 23850 */ | |
| 23851 class RemarketingListShare { | |
| 23852 /** | |
| 23853 * Identifies what kind of resource this is. Value: the fixed string | |
| 23854 * "dfareporting#remarketingListShare". | |
| 23855 */ | |
| 23856 core.String kind; | |
| 23857 /** Remarketing list ID. This is a read-only, auto-generated field. */ | |
| 23858 core.String remarketingListId; | |
| 23859 /** Accounts that the remarketing list is shared with. */ | |
| 23860 core.List<core.String> sharedAccountIds; | |
| 23861 /** Advertisers that the remarketing list is shared with. */ | |
| 23862 core.List<core.String> sharedAdvertiserIds; | |
| 23863 | |
| 23864 RemarketingListShare(); | |
| 23865 | |
| 23866 RemarketingListShare.fromJson(core.Map _json) { | |
| 23867 if (_json.containsKey("kind")) { | |
| 23868 kind = _json["kind"]; | |
| 23869 } | |
| 23870 if (_json.containsKey("remarketingListId")) { | |
| 23871 remarketingListId = _json["remarketingListId"]; | |
| 23872 } | |
| 23873 if (_json.containsKey("sharedAccountIds")) { | |
| 23874 sharedAccountIds = _json["sharedAccountIds"]; | |
| 23875 } | |
| 23876 if (_json.containsKey("sharedAdvertiserIds")) { | |
| 23877 sharedAdvertiserIds = _json["sharedAdvertiserIds"]; | |
| 23878 } | |
| 23879 } | |
| 23880 | |
| 23881 core.Map toJson() { | |
| 23882 var _json = new core.Map(); | |
| 23883 if (kind != null) { | |
| 23884 _json["kind"] = kind; | |
| 23885 } | |
| 23886 if (remarketingListId != null) { | |
| 23887 _json["remarketingListId"] = remarketingListId; | |
| 23888 } | |
| 23889 if (sharedAccountIds != null) { | |
| 23890 _json["sharedAccountIds"] = sharedAccountIds; | |
| 23891 } | |
| 23892 if (sharedAdvertiserIds != null) { | |
| 23893 _json["sharedAdvertiserIds"] = sharedAdvertiserIds; | |
| 23894 } | |
| 23895 return _json; | |
| 23896 } | |
| 23897 } | |
| 23898 | |
| 23899 /** Remarketing list response */ | |
| 23900 class RemarketingListsListResponse { | |
| 23901 /** | |
| 23902 * Identifies what kind of resource this is. Value: the fixed string | |
| 23903 * "dfareporting#remarketingListsListResponse". | |
| 23904 */ | |
| 23905 core.String kind; | |
| 23906 /** Pagination token to be used for the next list operation. */ | |
| 23907 core.String nextPageToken; | |
| 23908 /** Remarketing list collection. */ | |
| 23909 core.List<RemarketingList> remarketingLists; | |
| 23910 | |
| 23911 RemarketingListsListResponse(); | |
| 23912 | |
| 23913 RemarketingListsListResponse.fromJson(core.Map _json) { | |
| 23914 if (_json.containsKey("kind")) { | |
| 23915 kind = _json["kind"]; | |
| 23916 } | |
| 23917 if (_json.containsKey("nextPageToken")) { | |
| 23918 nextPageToken = _json["nextPageToken"]; | |
| 23919 } | |
| 23920 if (_json.containsKey("remarketingLists")) { | |
| 23921 remarketingLists = _json["remarketingLists"].map((value) => new Remarketin
gList.fromJson(value)).toList(); | |
| 23922 } | |
| 23923 } | |
| 23924 | |
| 23925 core.Map toJson() { | |
| 23926 var _json = new core.Map(); | |
| 23927 if (kind != null) { | |
| 23928 _json["kind"] = kind; | |
| 23929 } | |
| 23930 if (nextPageToken != null) { | |
| 23931 _json["nextPageToken"] = nextPageToken; | |
| 23932 } | |
| 23933 if (remarketingLists != null) { | |
| 23934 _json["remarketingLists"] = remarketingLists.map((value) => (value).toJson
()).toList(); | |
| 23935 } | |
| 23936 return _json; | |
| 23937 } | |
| 23938 } | |
| 23939 | |
| 23940 /** The report criteria for a report of type "STANDARD". */ | |
| 23941 class ReportCriteria { | |
| 23942 /** Activity group. */ | |
| 23943 Activities activities; | |
| 23944 /** Custom Rich Media Events group. */ | |
| 23945 CustomRichMediaEvents customRichMediaEvents; | |
| 23946 /** The date range for which this report should be run. */ | |
| 23947 DateRange dateRange; | |
| 23948 /** | |
| 23949 * The list of filters on which dimensions are filtered. | |
| 23950 * Filters for different dimensions are ANDed, filters for the same dimension | |
| 23951 * are grouped together and ORed. | |
| 23952 */ | |
| 23953 core.List<DimensionValue> dimensionFilters; | |
| 23954 /** The list of standard dimensions the report should include. */ | |
| 23955 core.List<SortedDimension> dimensions; | |
| 23956 /** The list of names of metrics the report should include. */ | |
| 23957 core.List<core.String> metricNames; | |
| 23958 | |
| 23959 ReportCriteria(); | |
| 23960 | |
| 23961 ReportCriteria.fromJson(core.Map _json) { | |
| 23962 if (_json.containsKey("activities")) { | |
| 23963 activities = new Activities.fromJson(_json["activities"]); | |
| 23964 } | |
| 23965 if (_json.containsKey("customRichMediaEvents")) { | |
| 23966 customRichMediaEvents = new CustomRichMediaEvents.fromJson(_json["customRi
chMediaEvents"]); | |
| 23967 } | |
| 23968 if (_json.containsKey("dateRange")) { | |
| 23969 dateRange = new DateRange.fromJson(_json["dateRange"]); | |
| 23970 } | |
| 23971 if (_json.containsKey("dimensionFilters")) { | |
| 23972 dimensionFilters = _json["dimensionFilters"].map((value) => new DimensionV
alue.fromJson(value)).toList(); | |
| 23973 } | |
| 23974 if (_json.containsKey("dimensions")) { | |
| 23975 dimensions = _json["dimensions"].map((value) => new SortedDimension.fromJs
on(value)).toList(); | |
| 23976 } | |
| 23977 if (_json.containsKey("metricNames")) { | |
| 23978 metricNames = _json["metricNames"]; | |
| 23979 } | |
| 23980 } | |
| 23981 | |
| 23982 core.Map toJson() { | |
| 23983 var _json = new core.Map(); | |
| 23984 if (activities != null) { | |
| 23985 _json["activities"] = (activities).toJson(); | |
| 23986 } | |
| 23987 if (customRichMediaEvents != null) { | |
| 23988 _json["customRichMediaEvents"] = (customRichMediaEvents).toJson(); | |
| 23989 } | |
| 23990 if (dateRange != null) { | |
| 23991 _json["dateRange"] = (dateRange).toJson(); | |
| 23992 } | |
| 23993 if (dimensionFilters != null) { | |
| 23994 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson
()).toList(); | |
| 23995 } | |
| 23996 if (dimensions != null) { | |
| 23997 _json["dimensions"] = dimensions.map((value) => (value).toJson()).toList()
; | |
| 23998 } | |
| 23999 if (metricNames != null) { | |
| 24000 _json["metricNames"] = metricNames; | |
| 24001 } | |
| 24002 return _json; | |
| 24003 } | |
| 24004 } | |
| 24005 | |
| 24006 /** The report criteria for a report of type "CROSS_DIMENSION_REACH". */ | |
| 24007 class ReportCrossDimensionReachCriteria { | |
| 24008 /** The list of dimensions the report should include. */ | |
| 24009 core.List<SortedDimension> breakdown; | |
| 24010 /** The date range this report should be run for. */ | |
| 24011 DateRange dateRange; | |
| 24012 /** | |
| 24013 * The dimension option. | |
| 24014 * Possible string values are: | |
| 24015 * - "ADVERTISER" | |
| 24016 * - "CAMPAIGN" | |
| 24017 * - "SITE_BY_ADVERTISER" | |
| 24018 * - "SITE_BY_CAMPAIGN" | |
| 24019 */ | |
| 24020 core.String dimension; | |
| 24021 /** The list of filters on which dimensions are filtered. */ | |
| 24022 core.List<DimensionValue> dimensionFilters; | |
| 24023 /** The list of names of metrics the report should include. */ | |
| 24024 core.List<core.String> metricNames; | |
| 24025 /** The list of names of overlap metrics the report should include. */ | |
| 24026 core.List<core.String> overlapMetricNames; | |
| 24027 /** Whether the report is pivoted or not. Defaults to true. */ | |
| 24028 core.bool pivoted; | |
| 24029 | |
| 24030 ReportCrossDimensionReachCriteria(); | |
| 24031 | |
| 24032 ReportCrossDimensionReachCriteria.fromJson(core.Map _json) { | |
| 24033 if (_json.containsKey("breakdown")) { | |
| 24034 breakdown = _json["breakdown"].map((value) => new SortedDimension.fromJson
(value)).toList(); | |
| 24035 } | |
| 24036 if (_json.containsKey("dateRange")) { | |
| 24037 dateRange = new DateRange.fromJson(_json["dateRange"]); | |
| 24038 } | |
| 24039 if (_json.containsKey("dimension")) { | |
| 24040 dimension = _json["dimension"]; | |
| 24041 } | |
| 24042 if (_json.containsKey("dimensionFilters")) { | |
| 24043 dimensionFilters = _json["dimensionFilters"].map((value) => new DimensionV
alue.fromJson(value)).toList(); | |
| 24044 } | |
| 24045 if (_json.containsKey("metricNames")) { | |
| 24046 metricNames = _json["metricNames"]; | |
| 24047 } | |
| 24048 if (_json.containsKey("overlapMetricNames")) { | |
| 24049 overlapMetricNames = _json["overlapMetricNames"]; | |
| 24050 } | |
| 24051 if (_json.containsKey("pivoted")) { | |
| 24052 pivoted = _json["pivoted"]; | |
| 24053 } | |
| 24054 } | |
| 24055 | |
| 24056 core.Map toJson() { | |
| 24057 var _json = new core.Map(); | |
| 24058 if (breakdown != null) { | |
| 24059 _json["breakdown"] = breakdown.map((value) => (value).toJson()).toList(); | |
| 24060 } | |
| 24061 if (dateRange != null) { | |
| 24062 _json["dateRange"] = (dateRange).toJson(); | |
| 24063 } | |
| 24064 if (dimension != null) { | |
| 24065 _json["dimension"] = dimension; | |
| 24066 } | |
| 24067 if (dimensionFilters != null) { | |
| 24068 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson
()).toList(); | |
| 24069 } | |
| 24070 if (metricNames != null) { | |
| 24071 _json["metricNames"] = metricNames; | |
| 24072 } | |
| 24073 if (overlapMetricNames != null) { | |
| 24074 _json["overlapMetricNames"] = overlapMetricNames; | |
| 24075 } | |
| 24076 if (pivoted != null) { | |
| 24077 _json["pivoted"] = pivoted; | |
| 24078 } | |
| 24079 return _json; | |
| 24080 } | |
| 24081 } | |
| 24082 | |
| 24083 /** The report's email delivery settings. */ | |
| 24084 class ReportDelivery { | |
| 24085 /** Whether the report should be emailed to the report owner. */ | |
| 24086 core.bool emailOwner; | |
| 24087 /** | |
| 24088 * The type of delivery for the owner to receive, if enabled. | |
| 24089 * Possible string values are: | |
| 24090 * - "ATTACHMENT" | |
| 24091 * - "LINK" | |
| 24092 */ | |
| 24093 core.String emailOwnerDeliveryType; | |
| 24094 /** The message to be sent with each email. */ | |
| 24095 core.String message; | |
| 24096 /** The list of recipients to which to email the report. */ | |
| 24097 core.List<Recipient> recipients; | |
| 24098 | |
| 24099 ReportDelivery(); | |
| 24100 | |
| 24101 ReportDelivery.fromJson(core.Map _json) { | |
| 24102 if (_json.containsKey("emailOwner")) { | |
| 24103 emailOwner = _json["emailOwner"]; | |
| 24104 } | |
| 24105 if (_json.containsKey("emailOwnerDeliveryType")) { | |
| 24106 emailOwnerDeliveryType = _json["emailOwnerDeliveryType"]; | |
| 24107 } | |
| 24108 if (_json.containsKey("message")) { | |
| 24109 message = _json["message"]; | |
| 24110 } | |
| 24111 if (_json.containsKey("recipients")) { | |
| 24112 recipients = _json["recipients"].map((value) => new Recipient.fromJson(val
ue)).toList(); | |
| 24113 } | |
| 24114 } | |
| 24115 | |
| 24116 core.Map toJson() { | |
| 24117 var _json = new core.Map(); | |
| 24118 if (emailOwner != null) { | |
| 24119 _json["emailOwner"] = emailOwner; | |
| 24120 } | |
| 24121 if (emailOwnerDeliveryType != null) { | |
| 24122 _json["emailOwnerDeliveryType"] = emailOwnerDeliveryType; | |
| 24123 } | |
| 24124 if (message != null) { | |
| 24125 _json["message"] = message; | |
| 24126 } | |
| 24127 if (recipients != null) { | |
| 24128 _json["recipients"] = recipients.map((value) => (value).toJson()).toList()
; | |
| 24129 } | |
| 24130 return _json; | |
| 24131 } | |
| 24132 } | |
| 24133 | |
| 24134 /** The properties of the report. */ | |
| 24135 class ReportFloodlightCriteriaReportProperties { | |
| 24136 /** Include conversions that have no cookie, but do have an exposure path. */ | |
| 24137 core.bool includeAttributedIPConversions; | |
| 24138 /** | |
| 24139 * Include conversions of users with a DoubleClick cookie but without an | |
| 24140 * exposure. That means the user did not click or see an ad from the | |
| 24141 * advertiser within the Floodlight group, or that the interaction happened | |
| 24142 * outside the lookback window. | |
| 24143 */ | |
| 24144 core.bool includeUnattributedCookieConversions; | |
| 24145 /** | |
| 24146 * Include conversions that have no associated cookies and no exposures. It’s | |
| 24147 * therefore impossible to know how the user was exposed to your ads during | |
| 24148 * the lookback window prior to a conversion. | |
| 24149 */ | |
| 24150 core.bool includeUnattributedIPConversions; | |
| 24151 | |
| 24152 ReportFloodlightCriteriaReportProperties(); | |
| 24153 | |
| 24154 ReportFloodlightCriteriaReportProperties.fromJson(core.Map _json) { | |
| 24155 if (_json.containsKey("includeAttributedIPConversions")) { | |
| 24156 includeAttributedIPConversions = _json["includeAttributedIPConversions"]; | |
| 24157 } | |
| 24158 if (_json.containsKey("includeUnattributedCookieConversions")) { | |
| 24159 includeUnattributedCookieConversions = _json["includeUnattributedCookieCon
versions"]; | |
| 24160 } | |
| 24161 if (_json.containsKey("includeUnattributedIPConversions")) { | |
| 24162 includeUnattributedIPConversions = _json["includeUnattributedIPConversions
"]; | |
| 24163 } | |
| 24164 } | |
| 24165 | |
| 24166 core.Map toJson() { | |
| 24167 var _json = new core.Map(); | |
| 24168 if (includeAttributedIPConversions != null) { | |
| 24169 _json["includeAttributedIPConversions"] = includeAttributedIPConversions; | |
| 24170 } | |
| 24171 if (includeUnattributedCookieConversions != null) { | |
| 24172 _json["includeUnattributedCookieConversions"] = includeUnattributedCookieC
onversions; | |
| 24173 } | |
| 24174 if (includeUnattributedIPConversions != null) { | |
| 24175 _json["includeUnattributedIPConversions"] = includeUnattributedIPConversio
ns; | |
| 24176 } | |
| 24177 return _json; | |
| 24178 } | |
| 24179 } | |
| 24180 | |
| 24181 /** The report criteria for a report of type "FLOODLIGHT". */ | |
| 24182 class ReportFloodlightCriteria { | |
| 24183 /** The list of custom rich media events to include. */ | |
| 24184 core.List<DimensionValue> customRichMediaEvents; | |
| 24185 /** The date range this report should be run for. */ | |
| 24186 DateRange dateRange; | |
| 24187 /** | |
| 24188 * The list of filters on which dimensions are filtered. | |
| 24189 * Filters for different dimensions are ANDed, filters for the same dimension | |
| 24190 * are grouped together and ORed. | |
| 24191 */ | |
| 24192 core.List<DimensionValue> dimensionFilters; | |
| 24193 /** The list of dimensions the report should include. */ | |
| 24194 core.List<SortedDimension> dimensions; | |
| 24195 /** | |
| 24196 * The floodlight ID for which to show data in this report. All advertisers | |
| 24197 * associated with that ID will automatically be added. The dimension of the | |
| 24198 * value needs to be 'dfa:floodlightConfigId'. | |
| 24199 */ | |
| 24200 DimensionValue floodlightConfigId; | |
| 24201 /** The list of names of metrics the report should include. */ | |
| 24202 core.List<core.String> metricNames; | |
| 24203 /** The properties of the report. */ | |
| 24204 ReportFloodlightCriteriaReportProperties reportProperties; | |
| 24205 | |
| 24206 ReportFloodlightCriteria(); | |
| 24207 | |
| 24208 ReportFloodlightCriteria.fromJson(core.Map _json) { | |
| 24209 if (_json.containsKey("customRichMediaEvents")) { | |
| 24210 customRichMediaEvents = _json["customRichMediaEvents"].map((value) => new
DimensionValue.fromJson(value)).toList(); | |
| 24211 } | |
| 24212 if (_json.containsKey("dateRange")) { | |
| 24213 dateRange = new DateRange.fromJson(_json["dateRange"]); | |
| 24214 } | |
| 24215 if (_json.containsKey("dimensionFilters")) { | |
| 24216 dimensionFilters = _json["dimensionFilters"].map((value) => new DimensionV
alue.fromJson(value)).toList(); | |
| 24217 } | |
| 24218 if (_json.containsKey("dimensions")) { | |
| 24219 dimensions = _json["dimensions"].map((value) => new SortedDimension.fromJs
on(value)).toList(); | |
| 24220 } | |
| 24221 if (_json.containsKey("floodlightConfigId")) { | |
| 24222 floodlightConfigId = new DimensionValue.fromJson(_json["floodlightConfigId
"]); | |
| 24223 } | |
| 24224 if (_json.containsKey("metricNames")) { | |
| 24225 metricNames = _json["metricNames"]; | |
| 24226 } | |
| 24227 if (_json.containsKey("reportProperties")) { | |
| 24228 reportProperties = new ReportFloodlightCriteriaReportProperties.fromJson(_
json["reportProperties"]); | |
| 24229 } | |
| 24230 } | |
| 24231 | |
| 24232 core.Map toJson() { | |
| 24233 var _json = new core.Map(); | |
| 24234 if (customRichMediaEvents != null) { | |
| 24235 _json["customRichMediaEvents"] = customRichMediaEvents.map((value) => (val
ue).toJson()).toList(); | |
| 24236 } | |
| 24237 if (dateRange != null) { | |
| 24238 _json["dateRange"] = (dateRange).toJson(); | |
| 24239 } | |
| 24240 if (dimensionFilters != null) { | |
| 24241 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson
()).toList(); | |
| 24242 } | |
| 24243 if (dimensions != null) { | |
| 24244 _json["dimensions"] = dimensions.map((value) => (value).toJson()).toList()
; | |
| 24245 } | |
| 24246 if (floodlightConfigId != null) { | |
| 24247 _json["floodlightConfigId"] = (floodlightConfigId).toJson(); | |
| 24248 } | |
| 24249 if (metricNames != null) { | |
| 24250 _json["metricNames"] = metricNames; | |
| 24251 } | |
| 24252 if (reportProperties != null) { | |
| 24253 _json["reportProperties"] = (reportProperties).toJson(); | |
| 24254 } | |
| 24255 return _json; | |
| 24256 } | |
| 24257 } | |
| 24258 | |
| 24259 /** The properties of the report. */ | |
| 24260 class ReportPathToConversionCriteriaReportProperties { | |
| 24261 /** | |
| 24262 * DFA checks to see if a click interaction occurred within the specified | |
| 24263 * period of time before a conversion. By default the value is pulled from | |
| 24264 * Floodlight or you can manually enter a custom value. Valid values: 1-90. | |
| 24265 */ | |
| 24266 core.int clicksLookbackWindow; | |
| 24267 /** | |
| 24268 * DFA checks to see if an impression interaction occurred within the | |
| 24269 * specified period of time before a conversion. By default the value is | |
| 24270 * pulled from Floodlight or you can manually enter a custom value. Valid | |
| 24271 * values: 1-90. | |
| 24272 */ | |
| 24273 core.int impressionsLookbackWindow; | |
| 24274 /** Deprecated: has no effect. */ | |
| 24275 core.bool includeAttributedIPConversions; | |
| 24276 /** | |
| 24277 * Include conversions of users with a DoubleClick cookie but without an | |
| 24278 * exposure. That means the user did not click or see an ad from the | |
| 24279 * advertiser within the Floodlight group, or that the interaction happened | |
| 24280 * outside the lookback window. | |
| 24281 */ | |
| 24282 core.bool includeUnattributedCookieConversions; | |
| 24283 /** | |
| 24284 * Include conversions that have no associated cookies and no exposures. It’s | |
| 24285 * therefore impossible to know how the user was exposed to your ads during | |
| 24286 * the lookback window prior to a conversion. | |
| 24287 */ | |
| 24288 core.bool includeUnattributedIPConversions; | |
| 24289 /** | |
| 24290 * The maximum number of click interactions to include in the report. | |
| 24291 * Advertisers currently paying for E2C reports get up to 200 (100 clicks, 100 | |
| 24292 * impressions). If another advertiser in your network is paying for E2C, you | |
| 24293 * can have up to 5 total exposures per report. | |
| 24294 */ | |
| 24295 core.int maximumClickInteractions; | |
| 24296 /** | |
| 24297 * The maximum number of click interactions to include in the report. | |
| 24298 * Advertisers currently paying for E2C reports get up to 200 (100 clicks, 100 | |
| 24299 * impressions). If another advertiser in your network is paying for E2C, you | |
| 24300 * can have up to 5 total exposures per report. | |
| 24301 */ | |
| 24302 core.int maximumImpressionInteractions; | |
| 24303 /** | |
| 24304 * The maximum amount of time that can take place between interactions (clicks | |
| 24305 * or impressions) by the same user. Valid values: 1-90. | |
| 24306 */ | |
| 24307 core.int maximumInteractionGap; | |
| 24308 /** Enable pivoting on interaction path. */ | |
| 24309 core.bool pivotOnInteractionPath; | |
| 24310 | |
| 24311 ReportPathToConversionCriteriaReportProperties(); | |
| 24312 | |
| 24313 ReportPathToConversionCriteriaReportProperties.fromJson(core.Map _json) { | |
| 24314 if (_json.containsKey("clicksLookbackWindow")) { | |
| 24315 clicksLookbackWindow = _json["clicksLookbackWindow"]; | |
| 24316 } | |
| 24317 if (_json.containsKey("impressionsLookbackWindow")) { | |
| 24318 impressionsLookbackWindow = _json["impressionsLookbackWindow"]; | |
| 24319 } | |
| 24320 if (_json.containsKey("includeAttributedIPConversions")) { | |
| 24321 includeAttributedIPConversions = _json["includeAttributedIPConversions"]; | |
| 24322 } | |
| 24323 if (_json.containsKey("includeUnattributedCookieConversions")) { | |
| 24324 includeUnattributedCookieConversions = _json["includeUnattributedCookieCon
versions"]; | |
| 24325 } | |
| 24326 if (_json.containsKey("includeUnattributedIPConversions")) { | |
| 24327 includeUnattributedIPConversions = _json["includeUnattributedIPConversions
"]; | |
| 24328 } | |
| 24329 if (_json.containsKey("maximumClickInteractions")) { | |
| 24330 maximumClickInteractions = _json["maximumClickInteractions"]; | |
| 24331 } | |
| 24332 if (_json.containsKey("maximumImpressionInteractions")) { | |
| 24333 maximumImpressionInteractions = _json["maximumImpressionInteractions"]; | |
| 24334 } | |
| 24335 if (_json.containsKey("maximumInteractionGap")) { | |
| 24336 maximumInteractionGap = _json["maximumInteractionGap"]; | |
| 24337 } | |
| 24338 if (_json.containsKey("pivotOnInteractionPath")) { | |
| 24339 pivotOnInteractionPath = _json["pivotOnInteractionPath"]; | |
| 24340 } | |
| 24341 } | |
| 24342 | |
| 24343 core.Map toJson() { | |
| 24344 var _json = new core.Map(); | |
| 24345 if (clicksLookbackWindow != null) { | |
| 24346 _json["clicksLookbackWindow"] = clicksLookbackWindow; | |
| 24347 } | |
| 24348 if (impressionsLookbackWindow != null) { | |
| 24349 _json["impressionsLookbackWindow"] = impressionsLookbackWindow; | |
| 24350 } | |
| 24351 if (includeAttributedIPConversions != null) { | |
| 24352 _json["includeAttributedIPConversions"] = includeAttributedIPConversions; | |
| 24353 } | |
| 24354 if (includeUnattributedCookieConversions != null) { | |
| 24355 _json["includeUnattributedCookieConversions"] = includeUnattributedCookieC
onversions; | |
| 24356 } | |
| 24357 if (includeUnattributedIPConversions != null) { | |
| 24358 _json["includeUnattributedIPConversions"] = includeUnattributedIPConversio
ns; | |
| 24359 } | |
| 24360 if (maximumClickInteractions != null) { | |
| 24361 _json["maximumClickInteractions"] = maximumClickInteractions; | |
| 24362 } | |
| 24363 if (maximumImpressionInteractions != null) { | |
| 24364 _json["maximumImpressionInteractions"] = maximumImpressionInteractions; | |
| 24365 } | |
| 24366 if (maximumInteractionGap != null) { | |
| 24367 _json["maximumInteractionGap"] = maximumInteractionGap; | |
| 24368 } | |
| 24369 if (pivotOnInteractionPath != null) { | |
| 24370 _json["pivotOnInteractionPath"] = pivotOnInteractionPath; | |
| 24371 } | |
| 24372 return _json; | |
| 24373 } | |
| 24374 } | |
| 24375 | |
| 24376 /** The report criteria for a report of type "PATH_TO_CONVERSION". */ | |
| 24377 class ReportPathToConversionCriteria { | |
| 24378 /** The list of 'dfa:activity' values to filter on. */ | |
| 24379 core.List<DimensionValue> activityFilters; | |
| 24380 /** The list of conversion dimensions the report should include. */ | |
| 24381 core.List<SortedDimension> conversionDimensions; | |
| 24382 /** The list of custom floodlight variables the report should include. */ | |
| 24383 core.List<SortedDimension> customFloodlightVariables; | |
| 24384 /** The list of custom rich media events to include. */ | |
| 24385 core.List<DimensionValue> customRichMediaEvents; | |
| 24386 /** The date range this report should be run for. */ | |
| 24387 DateRange dateRange; | |
| 24388 /** | |
| 24389 * The floodlight ID for which to show data in this report. All advertisers | |
| 24390 * associated with that ID will automatically be added. The dimension of the | |
| 24391 * value needs to be 'dfa:floodlightConfigId'. | |
| 24392 */ | |
| 24393 DimensionValue floodlightConfigId; | |
| 24394 /** The list of names of metrics the report should include. */ | |
| 24395 core.List<core.String> metricNames; | |
| 24396 /** The list of per interaction dimensions the report should include. */ | |
| 24397 core.List<SortedDimension> perInteractionDimensions; | |
| 24398 /** The properties of the report. */ | |
| 24399 ReportPathToConversionCriteriaReportProperties reportProperties; | |
| 24400 | |
| 24401 ReportPathToConversionCriteria(); | |
| 24402 | |
| 24403 ReportPathToConversionCriteria.fromJson(core.Map _json) { | |
| 24404 if (_json.containsKey("activityFilters")) { | |
| 24405 activityFilters = _json["activityFilters"].map((value) => new DimensionVal
ue.fromJson(value)).toList(); | |
| 24406 } | |
| 24407 if (_json.containsKey("conversionDimensions")) { | |
| 24408 conversionDimensions = _json["conversionDimensions"].map((value) => new So
rtedDimension.fromJson(value)).toList(); | |
| 24409 } | |
| 24410 if (_json.containsKey("customFloodlightVariables")) { | |
| 24411 customFloodlightVariables = _json["customFloodlightVariables"].map((value)
=> new SortedDimension.fromJson(value)).toList(); | |
| 24412 } | |
| 24413 if (_json.containsKey("customRichMediaEvents")) { | |
| 24414 customRichMediaEvents = _json["customRichMediaEvents"].map((value) => new
DimensionValue.fromJson(value)).toList(); | |
| 24415 } | |
| 24416 if (_json.containsKey("dateRange")) { | |
| 24417 dateRange = new DateRange.fromJson(_json["dateRange"]); | |
| 24418 } | |
| 24419 if (_json.containsKey("floodlightConfigId")) { | |
| 24420 floodlightConfigId = new DimensionValue.fromJson(_json["floodlightConfigId
"]); | |
| 24421 } | |
| 24422 if (_json.containsKey("metricNames")) { | |
| 24423 metricNames = _json["metricNames"]; | |
| 24424 } | |
| 24425 if (_json.containsKey("perInteractionDimensions")) { | |
| 24426 perInteractionDimensions = _json["perInteractionDimensions"].map((value) =
> new SortedDimension.fromJson(value)).toList(); | |
| 24427 } | |
| 24428 if (_json.containsKey("reportProperties")) { | |
| 24429 reportProperties = new ReportPathToConversionCriteriaReportProperties.from
Json(_json["reportProperties"]); | |
| 24430 } | |
| 24431 } | |
| 24432 | |
| 24433 core.Map toJson() { | |
| 24434 var _json = new core.Map(); | |
| 24435 if (activityFilters != null) { | |
| 24436 _json["activityFilters"] = activityFilters.map((value) => (value).toJson()
).toList(); | |
| 24437 } | |
| 24438 if (conversionDimensions != null) { | |
| 24439 _json["conversionDimensions"] = conversionDimensions.map((value) => (value
).toJson()).toList(); | |
| 24440 } | |
| 24441 if (customFloodlightVariables != null) { | |
| 24442 _json["customFloodlightVariables"] = customFloodlightVariables.map((value)
=> (value).toJson()).toList(); | |
| 24443 } | |
| 24444 if (customRichMediaEvents != null) { | |
| 24445 _json["customRichMediaEvents"] = customRichMediaEvents.map((value) => (val
ue).toJson()).toList(); | |
| 24446 } | |
| 24447 if (dateRange != null) { | |
| 24448 _json["dateRange"] = (dateRange).toJson(); | |
| 24449 } | |
| 24450 if (floodlightConfigId != null) { | |
| 24451 _json["floodlightConfigId"] = (floodlightConfigId).toJson(); | |
| 24452 } | |
| 24453 if (metricNames != null) { | |
| 24454 _json["metricNames"] = metricNames; | |
| 24455 } | |
| 24456 if (perInteractionDimensions != null) { | |
| 24457 _json["perInteractionDimensions"] = perInteractionDimensions.map((value) =
> (value).toJson()).toList(); | |
| 24458 } | |
| 24459 if (reportProperties != null) { | |
| 24460 _json["reportProperties"] = (reportProperties).toJson(); | |
| 24461 } | |
| 24462 return _json; | |
| 24463 } | |
| 24464 } | |
| 24465 | |
| 24466 /** The report criteria for a report of type "REACH". */ | |
| 24467 class ReportReachCriteria { | |
| 24468 /** Activity group. */ | |
| 24469 Activities activities; | |
| 24470 /** Custom Rich Media Events group. */ | |
| 24471 CustomRichMediaEvents customRichMediaEvents; | |
| 24472 /** The date range this report should be run for. */ | |
| 24473 DateRange dateRange; | |
| 24474 /** | |
| 24475 * The list of filters on which dimensions are filtered. | |
| 24476 * Filters for different dimensions are ANDed, filters for the same dimension | |
| 24477 * are grouped together and ORed. | |
| 24478 */ | |
| 24479 core.List<DimensionValue> dimensionFilters; | |
| 24480 /** The list of dimensions the report should include. */ | |
| 24481 core.List<SortedDimension> dimensions; | |
| 24482 /** | |
| 24483 * Whether to enable all reach dimension combinations in the report. Defaults | |
| 24484 * to false. If enabled, the date range of the report should be within the | |
| 24485 * last three months. | |
| 24486 */ | |
| 24487 core.bool enableAllDimensionCombinations; | |
| 24488 /** The list of names of metrics the report should include. */ | |
| 24489 core.List<core.String> metricNames; | |
| 24490 /** | |
| 24491 * The list of names of Reach By Frequency metrics the report should include. | |
| 24492 */ | |
| 24493 core.List<core.String> reachByFrequencyMetricNames; | |
| 24494 | |
| 24495 ReportReachCriteria(); | |
| 24496 | |
| 24497 ReportReachCriteria.fromJson(core.Map _json) { | |
| 24498 if (_json.containsKey("activities")) { | |
| 24499 activities = new Activities.fromJson(_json["activities"]); | |
| 24500 } | |
| 24501 if (_json.containsKey("customRichMediaEvents")) { | |
| 24502 customRichMediaEvents = new CustomRichMediaEvents.fromJson(_json["customRi
chMediaEvents"]); | |
| 24503 } | |
| 24504 if (_json.containsKey("dateRange")) { | |
| 24505 dateRange = new DateRange.fromJson(_json["dateRange"]); | |
| 24506 } | |
| 24507 if (_json.containsKey("dimensionFilters")) { | |
| 24508 dimensionFilters = _json["dimensionFilters"].map((value) => new DimensionV
alue.fromJson(value)).toList(); | |
| 24509 } | |
| 24510 if (_json.containsKey("dimensions")) { | |
| 24511 dimensions = _json["dimensions"].map((value) => new SortedDimension.fromJs
on(value)).toList(); | |
| 24512 } | |
| 24513 if (_json.containsKey("enableAllDimensionCombinations")) { | |
| 24514 enableAllDimensionCombinations = _json["enableAllDimensionCombinations"]; | |
| 24515 } | |
| 24516 if (_json.containsKey("metricNames")) { | |
| 24517 metricNames = _json["metricNames"]; | |
| 24518 } | |
| 24519 if (_json.containsKey("reachByFrequencyMetricNames")) { | |
| 24520 reachByFrequencyMetricNames = _json["reachByFrequencyMetricNames"]; | |
| 24521 } | |
| 24522 } | |
| 24523 | |
| 24524 core.Map toJson() { | |
| 24525 var _json = new core.Map(); | |
| 24526 if (activities != null) { | |
| 24527 _json["activities"] = (activities).toJson(); | |
| 24528 } | |
| 24529 if (customRichMediaEvents != null) { | |
| 24530 _json["customRichMediaEvents"] = (customRichMediaEvents).toJson(); | |
| 24531 } | |
| 24532 if (dateRange != null) { | |
| 24533 _json["dateRange"] = (dateRange).toJson(); | |
| 24534 } | |
| 24535 if (dimensionFilters != null) { | |
| 24536 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson
()).toList(); | |
| 24537 } | |
| 24538 if (dimensions != null) { | |
| 24539 _json["dimensions"] = dimensions.map((value) => (value).toJson()).toList()
; | |
| 24540 } | |
| 24541 if (enableAllDimensionCombinations != null) { | |
| 24542 _json["enableAllDimensionCombinations"] = enableAllDimensionCombinations; | |
| 24543 } | |
| 24544 if (metricNames != null) { | |
| 24545 _json["metricNames"] = metricNames; | |
| 24546 } | |
| 24547 if (reachByFrequencyMetricNames != null) { | |
| 24548 _json["reachByFrequencyMetricNames"] = reachByFrequencyMetricNames; | |
| 24549 } | |
| 24550 return _json; | |
| 24551 } | |
| 24552 } | |
| 24553 | |
| 24554 /** | |
| 24555 * The report's schedule. Can only be set if the report's 'dateRange' is a | |
| 24556 * relative date range and the relative date range is not "TODAY". | |
| 24557 */ | |
| 24558 class ReportSchedule { | |
| 24559 /** | |
| 24560 * Whether the schedule is active or not. Must be set to either true or false. | |
| 24561 */ | |
| 24562 core.bool active; | |
| 24563 /** | |
| 24564 * Defines every how many days, weeks or months the report should be run. | |
| 24565 * Needs to be set when "repeats" is either "DAILY", "WEEKLY" or "MONTHLY". | |
| 24566 */ | |
| 24567 core.int every; | |
| 24568 /** The expiration date when the scheduled report stops running. */ | |
| 24569 core.DateTime expirationDate; | |
| 24570 /** | |
| 24571 * The interval for which the report is repeated. Note: | |
| 24572 * - "DAILY" also requires field "every" to be set. | |
| 24573 * - "WEEKLY" also requires fields "every" and "repeatsOnWeekDays" to be set. | |
| 24574 * - "MONTHLY" also requires fields "every" and "runsOnDayOfMonth" to be set. | |
| 24575 */ | |
| 24576 core.String repeats; | |
| 24577 /** List of week days "WEEKLY" on which scheduled reports should run. */ | |
| 24578 core.List<core.String> repeatsOnWeekDays; | |
| 24579 /** | |
| 24580 * Enum to define for "MONTHLY" scheduled reports whether reports should be | |
| 24581 * repeated on the same day of the month as "startDate" or the same day of the | |
| 24582 * week of the month. | |
| 24583 * Example: If 'startDate' is Monday, April 2nd 2012 (2012-04-02), | |
| 24584 * "DAY_OF_MONTH" would run subsequent reports on the 2nd of every Month, and | |
| 24585 * "WEEK_OF_MONTH" would run subsequent reports on the first Monday of the | |
| 24586 * month. | |
| 24587 * Possible string values are: | |
| 24588 * - "DAY_OF_MONTH" | |
| 24589 * - "WEEK_OF_MONTH" | |
| 24590 */ | |
| 24591 core.String runsOnDayOfMonth; | |
| 24592 /** Start date of date range for which scheduled reports should be run. */ | |
| 24593 core.DateTime startDate; | |
| 24594 | |
| 24595 ReportSchedule(); | |
| 24596 | |
| 24597 ReportSchedule.fromJson(core.Map _json) { | |
| 24598 if (_json.containsKey("active")) { | |
| 24599 active = _json["active"]; | |
| 24600 } | |
| 24601 if (_json.containsKey("every")) { | |
| 24602 every = _json["every"]; | |
| 24603 } | |
| 24604 if (_json.containsKey("expirationDate")) { | |
| 24605 expirationDate = core.DateTime.parse(_json["expirationDate"]); | |
| 24606 } | |
| 24607 if (_json.containsKey("repeats")) { | |
| 24608 repeats = _json["repeats"]; | |
| 24609 } | |
| 24610 if (_json.containsKey("repeatsOnWeekDays")) { | |
| 24611 repeatsOnWeekDays = _json["repeatsOnWeekDays"]; | |
| 24612 } | |
| 24613 if (_json.containsKey("runsOnDayOfMonth")) { | |
| 24614 runsOnDayOfMonth = _json["runsOnDayOfMonth"]; | |
| 24615 } | |
| 24616 if (_json.containsKey("startDate")) { | |
| 24617 startDate = core.DateTime.parse(_json["startDate"]); | |
| 24618 } | |
| 24619 } | |
| 24620 | |
| 24621 core.Map toJson() { | |
| 24622 var _json = new core.Map(); | |
| 24623 if (active != null) { | |
| 24624 _json["active"] = active; | |
| 24625 } | |
| 24626 if (every != null) { | |
| 24627 _json["every"] = every; | |
| 24628 } | |
| 24629 if (expirationDate != null) { | |
| 24630 _json["expirationDate"] = "${(expirationDate).year.toString().padLeft(4, '
0')}-${(expirationDate).month.toString().padLeft(2, '0')}-${(expirationDate).day
.toString().padLeft(2, '0')}"; | |
| 24631 } | |
| 24632 if (repeats != null) { | |
| 24633 _json["repeats"] = repeats; | |
| 24634 } | |
| 24635 if (repeatsOnWeekDays != null) { | |
| 24636 _json["repeatsOnWeekDays"] = repeatsOnWeekDays; | |
| 24637 } | |
| 24638 if (runsOnDayOfMonth != null) { | |
| 24639 _json["runsOnDayOfMonth"] = runsOnDayOfMonth; | |
| 24640 } | |
| 24641 if (startDate != null) { | |
| 24642 _json["startDate"] = "${(startDate).year.toString().padLeft(4, '0')}-${(st
artDate).month.toString().padLeft(2, '0')}-${(startDate).day.toString().padLeft(
2, '0')}"; | |
| 24643 } | |
| 24644 return _json; | |
| 24645 } | |
| 24646 } | |
| 24647 | |
| 24648 /** Represents a Report resource. */ | |
| 24649 class Report { | |
| 24650 /** The account ID to which this report belongs. */ | |
| 24651 core.String accountId; | |
| 24652 /** The report criteria for a report of type "STANDARD". */ | |
| 24653 ReportCriteria criteria; | |
| 24654 /** The report criteria for a report of type "CROSS_DIMENSION_REACH". */ | |
| 24655 ReportCrossDimensionReachCriteria crossDimensionReachCriteria; | |
| 24656 /** The report's email delivery settings. */ | |
| 24657 ReportDelivery delivery; | |
| 24658 /** The eTag of this response for caching purposes. */ | |
| 24659 core.String etag; | |
| 24660 /** The filename used when generating report files for this report. */ | |
| 24661 core.String fileName; | |
| 24662 /** The report criteria for a report of type "FLOODLIGHT". */ | |
| 24663 ReportFloodlightCriteria floodlightCriteria; | |
| 24664 /** | |
| 24665 * The output format of the report. If not specified, default format is "CSV". | |
| 24666 * Note that the actual format in the completed report file might differ if | |
| 24667 * for instance the report's size exceeds the format's capabilities. "CSV" | |
| 24668 * will then be the fallback format. | |
| 24669 * Possible string values are: | |
| 24670 * - "CSV" | |
| 24671 * - "EXCEL" | |
| 24672 */ | |
| 24673 core.String format; | |
| 24674 /** The unique ID identifying this report resource. */ | |
| 24675 core.String id; | |
| 24676 /** The kind of resource this is, in this case dfareporting#report. */ | |
| 24677 core.String kind; | |
| 24678 /** | |
| 24679 * The timestamp (in milliseconds since epoch) of when this report was last | |
| 24680 * modified. | |
| 24681 */ | |
| 24682 core.String lastModifiedTime; | |
| 24683 /** The name of the report. */ | |
| 24684 core.String name; | |
| 24685 /** The user profile id of the owner of this report. */ | |
| 24686 core.String ownerProfileId; | |
| 24687 /** The report criteria for a report of type "PATH_TO_CONVERSION". */ | |
| 24688 ReportPathToConversionCriteria pathToConversionCriteria; | |
| 24689 /** The report criteria for a report of type "REACH". */ | |
| 24690 ReportReachCriteria reachCriteria; | |
| 24691 /** | |
| 24692 * The report's schedule. Can only be set if the report's 'dateRange' is a | |
| 24693 * relative date range and the relative date range is not "TODAY". | |
| 24694 */ | |
| 24695 ReportSchedule schedule; | |
| 24696 /** The subaccount ID to which this report belongs if applicable. */ | |
| 24697 core.String subAccountId; | |
| 24698 /** | |
| 24699 * The type of the report. | |
| 24700 * Possible string values are: | |
| 24701 * - "CROSS_DIMENSION_REACH" | |
| 24702 * - "FLOODLIGHT" | |
| 24703 * - "PATH_TO_CONVERSION" | |
| 24704 * - "REACH" | |
| 24705 * - "STANDARD" | |
| 24706 */ | |
| 24707 core.String type; | |
| 24708 | |
| 24709 Report(); | |
| 24710 | |
| 24711 Report.fromJson(core.Map _json) { | |
| 24712 if (_json.containsKey("accountId")) { | |
| 24713 accountId = _json["accountId"]; | |
| 24714 } | |
| 24715 if (_json.containsKey("criteria")) { | |
| 24716 criteria = new ReportCriteria.fromJson(_json["criteria"]); | |
| 24717 } | |
| 24718 if (_json.containsKey("crossDimensionReachCriteria")) { | |
| 24719 crossDimensionReachCriteria = new ReportCrossDimensionReachCriteria.fromJs
on(_json["crossDimensionReachCriteria"]); | |
| 24720 } | |
| 24721 if (_json.containsKey("delivery")) { | |
| 24722 delivery = new ReportDelivery.fromJson(_json["delivery"]); | |
| 24723 } | |
| 24724 if (_json.containsKey("etag")) { | |
| 24725 etag = _json["etag"]; | |
| 24726 } | |
| 24727 if (_json.containsKey("fileName")) { | |
| 24728 fileName = _json["fileName"]; | |
| 24729 } | |
| 24730 if (_json.containsKey("floodlightCriteria")) { | |
| 24731 floodlightCriteria = new ReportFloodlightCriteria.fromJson(_json["floodlig
htCriteria"]); | |
| 24732 } | |
| 24733 if (_json.containsKey("format")) { | |
| 24734 format = _json["format"]; | |
| 24735 } | |
| 24736 if (_json.containsKey("id")) { | |
| 24737 id = _json["id"]; | |
| 24738 } | |
| 24739 if (_json.containsKey("kind")) { | |
| 24740 kind = _json["kind"]; | |
| 24741 } | |
| 24742 if (_json.containsKey("lastModifiedTime")) { | |
| 24743 lastModifiedTime = _json["lastModifiedTime"]; | |
| 24744 } | |
| 24745 if (_json.containsKey("name")) { | |
| 24746 name = _json["name"]; | |
| 24747 } | |
| 24748 if (_json.containsKey("ownerProfileId")) { | |
| 24749 ownerProfileId = _json["ownerProfileId"]; | |
| 24750 } | |
| 24751 if (_json.containsKey("pathToConversionCriteria")) { | |
| 24752 pathToConversionCriteria = new ReportPathToConversionCriteria.fromJson(_js
on["pathToConversionCriteria"]); | |
| 24753 } | |
| 24754 if (_json.containsKey("reachCriteria")) { | |
| 24755 reachCriteria = new ReportReachCriteria.fromJson(_json["reachCriteria"]); | |
| 24756 } | |
| 24757 if (_json.containsKey("schedule")) { | |
| 24758 schedule = new ReportSchedule.fromJson(_json["schedule"]); | |
| 24759 } | |
| 24760 if (_json.containsKey("subAccountId")) { | |
| 24761 subAccountId = _json["subAccountId"]; | |
| 24762 } | |
| 24763 if (_json.containsKey("type")) { | |
| 24764 type = _json["type"]; | |
| 24765 } | |
| 24766 } | |
| 24767 | |
| 24768 core.Map toJson() { | |
| 24769 var _json = new core.Map(); | |
| 24770 if (accountId != null) { | |
| 24771 _json["accountId"] = accountId; | |
| 24772 } | |
| 24773 if (criteria != null) { | |
| 24774 _json["criteria"] = (criteria).toJson(); | |
| 24775 } | |
| 24776 if (crossDimensionReachCriteria != null) { | |
| 24777 _json["crossDimensionReachCriteria"] = (crossDimensionReachCriteria).toJso
n(); | |
| 24778 } | |
| 24779 if (delivery != null) { | |
| 24780 _json["delivery"] = (delivery).toJson(); | |
| 24781 } | |
| 24782 if (etag != null) { | |
| 24783 _json["etag"] = etag; | |
| 24784 } | |
| 24785 if (fileName != null) { | |
| 24786 _json["fileName"] = fileName; | |
| 24787 } | |
| 24788 if (floodlightCriteria != null) { | |
| 24789 _json["floodlightCriteria"] = (floodlightCriteria).toJson(); | |
| 24790 } | |
| 24791 if (format != null) { | |
| 24792 _json["format"] = format; | |
| 24793 } | |
| 24794 if (id != null) { | |
| 24795 _json["id"] = id; | |
| 24796 } | |
| 24797 if (kind != null) { | |
| 24798 _json["kind"] = kind; | |
| 24799 } | |
| 24800 if (lastModifiedTime != null) { | |
| 24801 _json["lastModifiedTime"] = lastModifiedTime; | |
| 24802 } | |
| 24803 if (name != null) { | |
| 24804 _json["name"] = name; | |
| 24805 } | |
| 24806 if (ownerProfileId != null) { | |
| 24807 _json["ownerProfileId"] = ownerProfileId; | |
| 24808 } | |
| 24809 if (pathToConversionCriteria != null) { | |
| 24810 _json["pathToConversionCriteria"] = (pathToConversionCriteria).toJson(); | |
| 24811 } | |
| 24812 if (reachCriteria != null) { | |
| 24813 _json["reachCriteria"] = (reachCriteria).toJson(); | |
| 24814 } | |
| 24815 if (schedule != null) { | |
| 24816 _json["schedule"] = (schedule).toJson(); | |
| 24817 } | |
| 24818 if (subAccountId != null) { | |
| 24819 _json["subAccountId"] = subAccountId; | |
| 24820 } | |
| 24821 if (type != null) { | |
| 24822 _json["type"] = type; | |
| 24823 } | |
| 24824 return _json; | |
| 24825 } | |
| 24826 } | |
| 24827 | |
| 24828 /** | |
| 24829 * Represents fields that are compatible to be selected for a report of type | |
| 24830 * "STANDARD". | |
| 24831 */ | |
| 24832 class ReportCompatibleFields { | |
| 24833 /** | |
| 24834 * Dimensions which are compatible to be selected in the "dimensionFilters" | |
| 24835 * section of the report. | |
| 24836 */ | |
| 24837 core.List<Dimension> dimensionFilters; | |
| 24838 /** | |
| 24839 * Dimensions which are compatible to be selected in the "dimensions" section | |
| 24840 * of the report. | |
| 24841 */ | |
| 24842 core.List<Dimension> dimensions; | |
| 24843 /** | |
| 24844 * The kind of resource this is, in this case | |
| 24845 * dfareporting#reportCompatibleFields. | |
| 24846 */ | |
| 24847 core.String kind; | |
| 24848 /** | |
| 24849 * Metrics which are compatible to be selected in the "metricNames" section of | |
| 24850 * the report. | |
| 24851 */ | |
| 24852 core.List<Metric> metrics; | |
| 24853 /** | |
| 24854 * Metrics which are compatible to be selected as activity metrics to pivot on | |
| 24855 * in the "activities" section of the report. | |
| 24856 */ | |
| 24857 core.List<Metric> pivotedActivityMetrics; | |
| 24858 | |
| 24859 ReportCompatibleFields(); | |
| 24860 | |
| 24861 ReportCompatibleFields.fromJson(core.Map _json) { | |
| 24862 if (_json.containsKey("dimensionFilters")) { | |
| 24863 dimensionFilters = _json["dimensionFilters"].map((value) => new Dimension.
fromJson(value)).toList(); | |
| 24864 } | |
| 24865 if (_json.containsKey("dimensions")) { | |
| 24866 dimensions = _json["dimensions"].map((value) => new Dimension.fromJson(val
ue)).toList(); | |
| 24867 } | |
| 24868 if (_json.containsKey("kind")) { | |
| 24869 kind = _json["kind"]; | |
| 24870 } | |
| 24871 if (_json.containsKey("metrics")) { | |
| 24872 metrics = _json["metrics"].map((value) => new Metric.fromJson(value)).toLi
st(); | |
| 24873 } | |
| 24874 if (_json.containsKey("pivotedActivityMetrics")) { | |
| 24875 pivotedActivityMetrics = _json["pivotedActivityMetrics"].map((value) => ne
w Metric.fromJson(value)).toList(); | |
| 24876 } | |
| 24877 } | |
| 24878 | |
| 24879 core.Map toJson() { | |
| 24880 var _json = new core.Map(); | |
| 24881 if (dimensionFilters != null) { | |
| 24882 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson
()).toList(); | |
| 24883 } | |
| 24884 if (dimensions != null) { | |
| 24885 _json["dimensions"] = dimensions.map((value) => (value).toJson()).toList()
; | |
| 24886 } | |
| 24887 if (kind != null) { | |
| 24888 _json["kind"] = kind; | |
| 24889 } | |
| 24890 if (metrics != null) { | |
| 24891 _json["metrics"] = metrics.map((value) => (value).toJson()).toList(); | |
| 24892 } | |
| 24893 if (pivotedActivityMetrics != null) { | |
| 24894 _json["pivotedActivityMetrics"] = pivotedActivityMetrics.map((value) => (v
alue).toJson()).toList(); | |
| 24895 } | |
| 24896 return _json; | |
| 24897 } | |
| 24898 } | |
| 24899 | |
| 24900 /** Represents the list of reports. */ | |
| 24901 class ReportList { | |
| 24902 /** The eTag of this response for caching purposes. */ | |
| 24903 core.String etag; | |
| 24904 /** The reports returned in this response. */ | |
| 24905 core.List<Report> items; | |
| 24906 /** The kind of list this is, in this case dfareporting#reportList. */ | |
| 24907 core.String kind; | |
| 24908 /** | |
| 24909 * Continuation token used to page through reports. To retrieve the next page | |
| 24910 * of results, set the next request's "pageToken" to the value of this field. | |
| 24911 * The page token is only valid for a limited amount of time and should not be | |
| 24912 * persisted. | |
| 24913 */ | |
| 24914 core.String nextPageToken; | |
| 24915 | |
| 24916 ReportList(); | |
| 24917 | |
| 24918 ReportList.fromJson(core.Map _json) { | |
| 24919 if (_json.containsKey("etag")) { | |
| 24920 etag = _json["etag"]; | |
| 24921 } | |
| 24922 if (_json.containsKey("items")) { | |
| 24923 items = _json["items"].map((value) => new Report.fromJson(value)).toList()
; | |
| 24924 } | |
| 24925 if (_json.containsKey("kind")) { | |
| 24926 kind = _json["kind"]; | |
| 24927 } | |
| 24928 if (_json.containsKey("nextPageToken")) { | |
| 24929 nextPageToken = _json["nextPageToken"]; | |
| 24930 } | |
| 24931 } | |
| 24932 | |
| 24933 core.Map toJson() { | |
| 24934 var _json = new core.Map(); | |
| 24935 if (etag != null) { | |
| 24936 _json["etag"] = etag; | |
| 24937 } | |
| 24938 if (items != null) { | |
| 24939 _json["items"] = items.map((value) => (value).toJson()).toList(); | |
| 24940 } | |
| 24941 if (kind != null) { | |
| 24942 _json["kind"] = kind; | |
| 24943 } | |
| 24944 if (nextPageToken != null) { | |
| 24945 _json["nextPageToken"] = nextPageToken; | |
| 24946 } | |
| 24947 return _json; | |
| 24948 } | |
| 24949 } | |
| 24950 | |
| 24951 /** Reporting Configuration */ | |
| 24952 class ReportsConfiguration { | |
| 24953 /** | |
| 24954 * Whether the exposure to conversion report is enabled. This report shows | |
| 24955 * detailed pathway information on up to 10 of the most recent ad exposures | |
| 24956 * seen by a user before converting. | |
| 24957 */ | |
| 24958 core.bool exposureToConversionEnabled; | |
| 24959 /** Default lookback windows for new advertisers in this account. */ | |
| 24960 LookbackConfiguration lookbackConfiguration; | |
| 24961 /** | |
| 24962 * Report generation time zone ID of this account. This is a required field | |
| 24963 * that can only be changed by a superuser. | |
| 24964 * Acceptable values are: | |
| 24965 * | |
| 24966 * - "1" for "America/New_York" | |
| 24967 * - "2" for "Europe/London" | |
| 24968 * - "3" for "Europe/Paris" | |
| 24969 * - "4" for "Africa/Johannesburg" | |
| 24970 * - "5" for "Asia/Jerusalem" | |
| 24971 * - "6" for "Asia/Shanghai" | |
| 24972 * - "7" for "Asia/Hong_Kong" | |
| 24973 * - "8" for "Asia/Tokyo" | |
| 24974 * - "9" for "Australia/Sydney" | |
| 24975 * - "10" for "Asia/Dubai" | |
| 24976 * - "11" for "America/Los_Angeles" | |
| 24977 * - "12" for "Pacific/Auckland" | |
| 24978 * - "13" for "America/Sao_Paulo" | |
| 24979 */ | |
| 24980 core.String reportGenerationTimeZoneId; | |
| 24981 | |
| 24982 ReportsConfiguration(); | |
| 24983 | |
| 24984 ReportsConfiguration.fromJson(core.Map _json) { | |
| 24985 if (_json.containsKey("exposureToConversionEnabled")) { | |
| 24986 exposureToConversionEnabled = _json["exposureToConversionEnabled"]; | |
| 24987 } | |
| 24988 if (_json.containsKey("lookbackConfiguration")) { | |
| 24989 lookbackConfiguration = new LookbackConfiguration.fromJson(_json["lookback
Configuration"]); | |
| 24990 } | |
| 24991 if (_json.containsKey("reportGenerationTimeZoneId")) { | |
| 24992 reportGenerationTimeZoneId = _json["reportGenerationTimeZoneId"]; | |
| 24993 } | |
| 24994 } | |
| 24995 | |
| 24996 core.Map toJson() { | |
| 24997 var _json = new core.Map(); | |
| 24998 if (exposureToConversionEnabled != null) { | |
| 24999 _json["exposureToConversionEnabled"] = exposureToConversionEnabled; | |
| 25000 } | |
| 25001 if (lookbackConfiguration != null) { | |
| 25002 _json["lookbackConfiguration"] = (lookbackConfiguration).toJson(); | |
| 25003 } | |
| 25004 if (reportGenerationTimeZoneId != null) { | |
| 25005 _json["reportGenerationTimeZoneId"] = reportGenerationTimeZoneId; | |
| 25006 } | |
| 25007 return _json; | |
| 25008 } | |
| 25009 } | |
| 25010 | |
| 25011 /** Rich Media Exit Override. */ | |
| 25012 class RichMediaExitOverride { | |
| 25013 /** | |
| 25014 * Click-through URL to override the default exit URL. Applicable if the | |
| 25015 * useCustomExitUrl field is set to true. | |
| 25016 */ | |
| 25017 core.String customExitUrl; | |
| 25018 /** ID for the override to refer to a specific exit in the creative. */ | |
| 25019 core.String exitId; | |
| 25020 /** Whether to use the custom exit URL. */ | |
| 25021 core.bool useCustomExitUrl; | |
| 25022 | |
| 25023 RichMediaExitOverride(); | |
| 25024 | |
| 25025 RichMediaExitOverride.fromJson(core.Map _json) { | |
| 25026 if (_json.containsKey("customExitUrl")) { | |
| 25027 customExitUrl = _json["customExitUrl"]; | |
| 25028 } | |
| 25029 if (_json.containsKey("exitId")) { | |
| 25030 exitId = _json["exitId"]; | |
| 25031 } | |
| 25032 if (_json.containsKey("useCustomExitUrl")) { | |
| 25033 useCustomExitUrl = _json["useCustomExitUrl"]; | |
| 25034 } | |
| 25035 } | |
| 25036 | |
| 25037 core.Map toJson() { | |
| 25038 var _json = new core.Map(); | |
| 25039 if (customExitUrl != null) { | |
| 25040 _json["customExitUrl"] = customExitUrl; | |
| 25041 } | |
| 25042 if (exitId != null) { | |
| 25043 _json["exitId"] = exitId; | |
| 25044 } | |
| 25045 if (useCustomExitUrl != null) { | |
| 25046 _json["useCustomExitUrl"] = useCustomExitUrl; | |
| 25047 } | |
| 25048 return _json; | |
| 25049 } | |
| 25050 } | |
| 25051 | |
| 25052 /** Contains properties of a site. */ | |
| 25053 class Site { | |
| 25054 /** | |
| 25055 * Account ID of this site. This is a read-only field that can be left blank. | |
| 25056 */ | |
| 25057 core.String accountId; | |
| 25058 /** Whether this site is approved. */ | |
| 25059 core.bool approved; | |
| 25060 /** | |
| 25061 * Directory site associated with this site. This is a required field that is | |
| 25062 * read-only after insertion. | |
| 25063 */ | |
| 25064 core.String directorySiteId; | |
| 25065 /** | |
| 25066 * Dimension value for the ID of the directory site. This is a read-only, | |
| 25067 * auto-generated field. | |
| 25068 */ | |
| 25069 DimensionValue directorySiteIdDimensionValue; | |
| 25070 /** ID of this site. This is a read-only, auto-generated field. */ | |
| 25071 core.String id; | |
| 25072 /** | |
| 25073 * Dimension value for the ID of this site. This is a read-only, | |
| 25074 * auto-generated field. | |
| 25075 */ | |
| 25076 DimensionValue idDimensionValue; | |
| 25077 /** Key name of this site. This is a read-only, auto-generated field. */ | |
| 25078 core.String keyName; | |
| 25079 /** | |
| 25080 * Identifies what kind of resource this is. Value: the fixed string | |
| 25081 * "dfareporting#site". | |
| 25082 */ | |
| 25083 core.String kind; | |
| 25084 /** | |
| 25085 * Name of this site.This is a required field. Must be less than 128 | |
| 25086 * characters long. If this site is under a subaccount, the name must be | |
| 25087 * unique among sites of the same subaccount. Otherwise, this site is a | |
| 25088 * top-level site, and the name must be unique among top-level sites of the | |
| 25089 * same account. | |
| 25090 */ | |
| 25091 core.String name; | |
| 25092 /** Site contacts. */ | |
| 25093 core.List<SiteContact> siteContacts; | |
| 25094 /** Site-wide settings. */ | |
| 25095 SiteSettings siteSettings; | |
| 25096 /** | |
| 25097 * Subaccount ID of this site. This is a read-only field that can be left | |
| 25098 * blank. | |
| 25099 */ | |
| 25100 core.String subaccountId; | |
| 25101 | |
| 25102 Site(); | |
| 25103 | |
| 25104 Site.fromJson(core.Map _json) { | |
| 25105 if (_json.containsKey("accountId")) { | |
| 25106 accountId = _json["accountId"]; | |
| 25107 } | |
| 25108 if (_json.containsKey("approved")) { | |
| 25109 approved = _json["approved"]; | |
| 25110 } | |
| 25111 if (_json.containsKey("directorySiteId")) { | |
| 25112 directorySiteId = _json["directorySiteId"]; | |
| 25113 } | |
| 25114 if (_json.containsKey("directorySiteIdDimensionValue")) { | |
| 25115 directorySiteIdDimensionValue = new DimensionValue.fromJson(_json["directo
rySiteIdDimensionValue"]); | |
| 25116 } | |
| 25117 if (_json.containsKey("id")) { | |
| 25118 id = _json["id"]; | |
| 25119 } | |
| 25120 if (_json.containsKey("idDimensionValue")) { | |
| 25121 idDimensionValue = new DimensionValue.fromJson(_json["idDimensionValue"]); | |
| 25122 } | |
| 25123 if (_json.containsKey("keyName")) { | |
| 25124 keyName = _json["keyName"]; | |
| 25125 } | |
| 25126 if (_json.containsKey("kind")) { | |
| 25127 kind = _json["kind"]; | |
| 25128 } | |
| 25129 if (_json.containsKey("name")) { | |
| 25130 name = _json["name"]; | |
| 25131 } | |
| 25132 if (_json.containsKey("siteContacts")) { | |
| 25133 siteContacts = _json["siteContacts"].map((value) => new SiteContact.fromJs
on(value)).toList(); | |
| 25134 } | |
| 25135 if (_json.containsKey("siteSettings")) { | |
| 25136 siteSettings = new SiteSettings.fromJson(_json["siteSettings"]); | |
| 25137 } | |
| 25138 if (_json.containsKey("subaccountId")) { | |
| 25139 subaccountId = _json["subaccountId"]; | |
| 25140 } | |
| 25141 } | |
| 25142 | |
| 25143 core.Map toJson() { | |
| 25144 var _json = new core.Map(); | |
| 25145 if (accountId != null) { | |
| 25146 _json["accountId"] = accountId; | |
| 25147 } | |
| 25148 if (approved != null) { | |
| 25149 _json["approved"] = approved; | |
| 25150 } | |
| 25151 if (directorySiteId != null) { | |
| 25152 _json["directorySiteId"] = directorySiteId; | |
| 25153 } | |
| 25154 if (directorySiteIdDimensionValue != null) { | |
| 25155 _json["directorySiteIdDimensionValue"] = (directorySiteIdDimensionValue).t
oJson(); | |
| 25156 } | |
| 25157 if (id != null) { | |
| 25158 _json["id"] = id; | |
| 25159 } | |
| 25160 if (idDimensionValue != null) { | |
| 25161 _json["idDimensionValue"] = (idDimensionValue).toJson(); | |
| 25162 } | |
| 25163 if (keyName != null) { | |
| 25164 _json["keyName"] = keyName; | |
| 25165 } | |
| 25166 if (kind != null) { | |
| 25167 _json["kind"] = kind; | |
| 25168 } | |
| 25169 if (name != null) { | |
| 25170 _json["name"] = name; | |
| 25171 } | |
| 25172 if (siteContacts != null) { | |
| 25173 _json["siteContacts"] = siteContacts.map((value) => (value).toJson()).toLi
st(); | |
| 25174 } | |
| 25175 if (siteSettings != null) { | |
| 25176 _json["siteSettings"] = (siteSettings).toJson(); | |
| 25177 } | |
| 25178 if (subaccountId != null) { | |
| 25179 _json["subaccountId"] = subaccountId; | |
| 25180 } | |
| 25181 return _json; | |
| 25182 } | |
| 25183 } | |
| 25184 | |
| 25185 /** Site Contact */ | |
| 25186 class SiteContact { | |
| 25187 /** Address of this site contact. */ | |
| 25188 core.String address; | |
| 25189 /** | |
| 25190 * Site contact type. | |
| 25191 * Possible string values are: | |
| 25192 * - "SALES_PERSON" | |
| 25193 * - "TRAFFICKER" | |
| 25194 */ | |
| 25195 core.String contactType; | |
| 25196 /** Email address of this site contact. This is a required field. */ | |
| 25197 core.String email; | |
| 25198 /** First name of this site contact. */ | |
| 25199 core.String firstName; | |
| 25200 /** ID of this site contact. This is a read-only, auto-generated field. */ | |
| 25201 core.String id; | |
| 25202 /** Last name of this site contact. */ | |
| 25203 core.String lastName; | |
| 25204 /** Primary phone number of this site contact. */ | |
| 25205 core.String phone; | |
| 25206 /** Title or designation of this site contact. */ | |
| 25207 core.String title; | |
| 25208 | |
| 25209 SiteContact(); | |
| 25210 | |
| 25211 SiteContact.fromJson(core.Map _json) { | |
| 25212 if (_json.containsKey("address")) { | |
| 25213 address = _json["address"]; | |
| 25214 } | |
| 25215 if (_json.containsKey("contactType")) { | |
| 25216 contactType = _json["contactType"]; | |
| 25217 } | |
| 25218 if (_json.containsKey("email")) { | |
| 25219 email = _json["email"]; | |
| 25220 } | |
| 25221 if (_json.containsKey("firstName")) { | |
| 25222 firstName = _json["firstName"]; | |
| 25223 } | |
| 25224 if (_json.containsKey("id")) { | |
| 25225 id = _json["id"]; | |
| 25226 } | |
| 25227 if (_json.containsKey("lastName")) { | |
| 25228 lastName = _json["lastName"]; | |
| 25229 } | |
| 25230 if (_json.containsKey("phone")) { | |
| 25231 phone = _json["phone"]; | |
| 25232 } | |
| 25233 if (_json.containsKey("title")) { | |
| 25234 title = _json["title"]; | |
| 25235 } | |
| 25236 } | |
| 25237 | |
| 25238 core.Map toJson() { | |
| 25239 var _json = new core.Map(); | |
| 25240 if (address != null) { | |
| 25241 _json["address"] = address; | |
| 25242 } | |
| 25243 if (contactType != null) { | |
| 25244 _json["contactType"] = contactType; | |
| 25245 } | |
| 25246 if (email != null) { | |
| 25247 _json["email"] = email; | |
| 25248 } | |
| 25249 if (firstName != null) { | |
| 25250 _json["firstName"] = firstName; | |
| 25251 } | |
| 25252 if (id != null) { | |
| 25253 _json["id"] = id; | |
| 25254 } | |
| 25255 if (lastName != null) { | |
| 25256 _json["lastName"] = lastName; | |
| 25257 } | |
| 25258 if (phone != null) { | |
| 25259 _json["phone"] = phone; | |
| 25260 } | |
| 25261 if (title != null) { | |
| 25262 _json["title"] = title; | |
| 25263 } | |
| 25264 return _json; | |
| 25265 } | |
| 25266 } | |
| 25267 | |
| 25268 /** Site Settings */ | |
| 25269 class SiteSettings { | |
| 25270 /** Whether active view creatives are disabled for this site. */ | |
| 25271 core.bool activeViewOptOut; | |
| 25272 /** Site-wide creative settings. */ | |
| 25273 CreativeSettings creativeSettings; | |
| 25274 /** Whether brand safe ads are disabled for this site. */ | |
| 25275 core.bool disableBrandSafeAds; | |
| 25276 /** Whether new cookies are disabled for this site. */ | |
| 25277 core.bool disableNewCookie; | |
| 25278 /** Lookback window settings for this site. */ | |
| 25279 LookbackConfiguration lookbackConfiguration; | |
| 25280 /** Configuration settings for dynamic and image floodlight tags. */ | |
| 25281 TagSetting tagSetting; | |
| 25282 | |
| 25283 SiteSettings(); | |
| 25284 | |
| 25285 SiteSettings.fromJson(core.Map _json) { | |
| 25286 if (_json.containsKey("activeViewOptOut")) { | |
| 25287 activeViewOptOut = _json["activeViewOptOut"]; | |
| 25288 } | |
| 25289 if (_json.containsKey("creativeSettings")) { | |
| 25290 creativeSettings = new CreativeSettings.fromJson(_json["creativeSettings"]
); | |
| 25291 } | |
| 25292 if (_json.containsKey("disableBrandSafeAds")) { | |
| 25293 disableBrandSafeAds = _json["disableBrandSafeAds"]; | |
| 25294 } | |
| 25295 if (_json.containsKey("disableNewCookie")) { | |
| 25296 disableNewCookie = _json["disableNewCookie"]; | |
| 25297 } | |
| 25298 if (_json.containsKey("lookbackConfiguration")) { | |
| 25299 lookbackConfiguration = new LookbackConfiguration.fromJson(_json["lookback
Configuration"]); | |
| 25300 } | |
| 25301 if (_json.containsKey("tagSetting")) { | |
| 25302 tagSetting = new TagSetting.fromJson(_json["tagSetting"]); | |
| 25303 } | |
| 25304 } | |
| 25305 | |
| 25306 core.Map toJson() { | |
| 25307 var _json = new core.Map(); | |
| 25308 if (activeViewOptOut != null) { | |
| 25309 _json["activeViewOptOut"] = activeViewOptOut; | |
| 25310 } | |
| 25311 if (creativeSettings != null) { | |
| 25312 _json["creativeSettings"] = (creativeSettings).toJson(); | |
| 25313 } | |
| 25314 if (disableBrandSafeAds != null) { | |
| 25315 _json["disableBrandSafeAds"] = disableBrandSafeAds; | |
| 25316 } | |
| 25317 if (disableNewCookie != null) { | |
| 25318 _json["disableNewCookie"] = disableNewCookie; | |
| 25319 } | |
| 25320 if (lookbackConfiguration != null) { | |
| 25321 _json["lookbackConfiguration"] = (lookbackConfiguration).toJson(); | |
| 25322 } | |
| 25323 if (tagSetting != null) { | |
| 25324 _json["tagSetting"] = (tagSetting).toJson(); | |
| 25325 } | |
| 25326 return _json; | |
| 25327 } | |
| 25328 } | |
| 25329 | |
| 25330 /** Site List Response */ | |
| 25331 class SitesListResponse { | |
| 25332 /** | |
| 25333 * Identifies what kind of resource this is. Value: the fixed string | |
| 25334 * "dfareporting#sitesListResponse". | |
| 25335 */ | |
| 25336 core.String kind; | |
| 25337 /** Pagination token to be used for the next list operation. */ | |
| 25338 core.String nextPageToken; | |
| 25339 /** Site collection. */ | |
| 25340 core.List<Site> sites; | |
| 25341 | |
| 25342 SitesListResponse(); | |
| 25343 | |
| 25344 SitesListResponse.fromJson(core.Map _json) { | |
| 25345 if (_json.containsKey("kind")) { | |
| 25346 kind = _json["kind"]; | |
| 25347 } | |
| 25348 if (_json.containsKey("nextPageToken")) { | |
| 25349 nextPageToken = _json["nextPageToken"]; | |
| 25350 } | |
| 25351 if (_json.containsKey("sites")) { | |
| 25352 sites = _json["sites"].map((value) => new Site.fromJson(value)).toList(); | |
| 25353 } | |
| 25354 } | |
| 25355 | |
| 25356 core.Map toJson() { | |
| 25357 var _json = new core.Map(); | |
| 25358 if (kind != null) { | |
| 25359 _json["kind"] = kind; | |
| 25360 } | |
| 25361 if (nextPageToken != null) { | |
| 25362 _json["nextPageToken"] = nextPageToken; | |
| 25363 } | |
| 25364 if (sites != null) { | |
| 25365 _json["sites"] = sites.map((value) => (value).toJson()).toList(); | |
| 25366 } | |
| 25367 return _json; | |
| 25368 } | |
| 25369 } | |
| 25370 | |
| 25371 /** | |
| 25372 * Represents the dimensions of ads, placements, creatives, or creative assets. | |
| 25373 */ | |
| 25374 class Size { | |
| 25375 /** Height of this size. */ | |
| 25376 core.int height; | |
| 25377 /** IAB standard size. This is a read-only, auto-generated field. */ | |
| 25378 core.bool iab; | |
| 25379 /** ID of this size. This is a read-only, auto-generated field. */ | |
| 25380 core.String id; | |
| 25381 /** | |
| 25382 * Identifies what kind of resource this is. Value: the fixed string | |
| 25383 * "dfareporting#size". | |
| 25384 */ | |
| 25385 core.String kind; | |
| 25386 /** Width of this size. */ | |
| 25387 core.int width; | |
| 25388 | |
| 25389 Size(); | |
| 25390 | |
| 25391 Size.fromJson(core.Map _json) { | |
| 25392 if (_json.containsKey("height")) { | |
| 25393 height = _json["height"]; | |
| 25394 } | |
| 25395 if (_json.containsKey("iab")) { | |
| 25396 iab = _json["iab"]; | |
| 25397 } | |
| 25398 if (_json.containsKey("id")) { | |
| 25399 id = _json["id"]; | |
| 25400 } | |
| 25401 if (_json.containsKey("kind")) { | |
| 25402 kind = _json["kind"]; | |
| 25403 } | |
| 25404 if (_json.containsKey("width")) { | |
| 25405 width = _json["width"]; | |
| 25406 } | |
| 25407 } | |
| 25408 | |
| 25409 core.Map toJson() { | |
| 25410 var _json = new core.Map(); | |
| 25411 if (height != null) { | |
| 25412 _json["height"] = height; | |
| 25413 } | |
| 25414 if (iab != null) { | |
| 25415 _json["iab"] = iab; | |
| 25416 } | |
| 25417 if (id != null) { | |
| 25418 _json["id"] = id; | |
| 25419 } | |
| 25420 if (kind != null) { | |
| 25421 _json["kind"] = kind; | |
| 25422 } | |
| 25423 if (width != null) { | |
| 25424 _json["width"] = width; | |
| 25425 } | |
| 25426 return _json; | |
| 25427 } | |
| 25428 } | |
| 25429 | |
| 25430 /** Size List Response */ | |
| 25431 class SizesListResponse { | |
| 25432 /** | |
| 25433 * Identifies what kind of resource this is. Value: the fixed string | |
| 25434 * "dfareporting#sizesListResponse". | |
| 25435 */ | |
| 25436 core.String kind; | |
| 25437 /** Size collection. */ | |
| 25438 core.List<Size> sizes; | |
| 25439 | |
| 25440 SizesListResponse(); | |
| 25441 | |
| 25442 SizesListResponse.fromJson(core.Map _json) { | |
| 25443 if (_json.containsKey("kind")) { | |
| 25444 kind = _json["kind"]; | |
| 25445 } | |
| 25446 if (_json.containsKey("sizes")) { | |
| 25447 sizes = _json["sizes"].map((value) => new Size.fromJson(value)).toList(); | |
| 25448 } | |
| 25449 } | |
| 25450 | |
| 25451 core.Map toJson() { | |
| 25452 var _json = new core.Map(); | |
| 25453 if (kind != null) { | |
| 25454 _json["kind"] = kind; | |
| 25455 } | |
| 25456 if (sizes != null) { | |
| 25457 _json["sizes"] = sizes.map((value) => (value).toJson()).toList(); | |
| 25458 } | |
| 25459 return _json; | |
| 25460 } | |
| 25461 } | |
| 25462 | |
| 25463 /** Represents a sorted dimension. */ | |
| 25464 class SortedDimension { | |
| 25465 /** | |
| 25466 * The kind of resource this is, in this case dfareporting#sortedDimension. | |
| 25467 */ | |
| 25468 core.String kind; | |
| 25469 /** The name of the dimension. */ | |
| 25470 core.String name; | |
| 25471 /** | |
| 25472 * An optional sort order for the dimension column. | |
| 25473 * Possible string values are: | |
| 25474 * - "ASCENDING" | |
| 25475 * - "DESCENDING" | |
| 25476 */ | |
| 25477 core.String sortOrder; | |
| 25478 | |
| 25479 SortedDimension(); | |
| 25480 | |
| 25481 SortedDimension.fromJson(core.Map _json) { | |
| 25482 if (_json.containsKey("kind")) { | |
| 25483 kind = _json["kind"]; | |
| 25484 } | |
| 25485 if (_json.containsKey("name")) { | |
| 25486 name = _json["name"]; | |
| 25487 } | |
| 25488 if (_json.containsKey("sortOrder")) { | |
| 25489 sortOrder = _json["sortOrder"]; | |
| 25490 } | |
| 25491 } | |
| 25492 | |
| 25493 core.Map toJson() { | |
| 25494 var _json = new core.Map(); | |
| 25495 if (kind != null) { | |
| 25496 _json["kind"] = kind; | |
| 25497 } | |
| 25498 if (name != null) { | |
| 25499 _json["name"] = name; | |
| 25500 } | |
| 25501 if (sortOrder != null) { | |
| 25502 _json["sortOrder"] = sortOrder; | |
| 25503 } | |
| 25504 return _json; | |
| 25505 } | |
| 25506 } | |
| 25507 | |
| 25508 /** Contains properties of a DCM subaccount. */ | |
| 25509 class Subaccount { | |
| 25510 /** | |
| 25511 * ID of the account that contains this subaccount. This is a read-only field | |
| 25512 * that can be left blank. | |
| 25513 */ | |
| 25514 core.String accountId; | |
| 25515 /** IDs of the available user role permissions for this subaccount. */ | |
| 25516 core.List<core.String> availablePermissionIds; | |
| 25517 /** ID of this subaccount. This is a read-only, auto-generated field. */ | |
| 25518 core.String id; | |
| 25519 /** | |
| 25520 * Identifies what kind of resource this is. Value: the fixed string | |
| 25521 * "dfareporting#subaccount". | |
| 25522 */ | |
| 25523 core.String kind; | |
| 25524 /** | |
| 25525 * Name of this subaccount. This is a required field. Must be less than 128 | |
| 25526 * characters long and be unique among subaccounts of the same account. | |
| 25527 */ | |
| 25528 core.String name; | |
| 25529 | |
| 25530 Subaccount(); | |
| 25531 | |
| 25532 Subaccount.fromJson(core.Map _json) { | |
| 25533 if (_json.containsKey("accountId")) { | |
| 25534 accountId = _json["accountId"]; | |
| 25535 } | |
| 25536 if (_json.containsKey("availablePermissionIds")) { | |
| 25537 availablePermissionIds = _json["availablePermissionIds"]; | |
| 25538 } | |
| 25539 if (_json.containsKey("id")) { | |
| 25540 id = _json["id"]; | |
| 25541 } | |
| 25542 if (_json.containsKey("kind")) { | |
| 25543 kind = _json["kind"]; | |
| 25544 } | |
| 25545 if (_json.containsKey("name")) { | |
| 25546 name = _json["name"]; | |
| 25547 } | |
| 25548 } | |
| 25549 | |
| 25550 core.Map toJson() { | |
| 25551 var _json = new core.Map(); | |
| 25552 if (accountId != null) { | |
| 25553 _json["accountId"] = accountId; | |
| 25554 } | |
| 25555 if (availablePermissionIds != null) { | |
| 25556 _json["availablePermissionIds"] = availablePermissionIds; | |
| 25557 } | |
| 25558 if (id != null) { | |
| 25559 _json["id"] = id; | |
| 25560 } | |
| 25561 if (kind != null) { | |
| 25562 _json["kind"] = kind; | |
| 25563 } | |
| 25564 if (name != null) { | |
| 25565 _json["name"] = name; | |
| 25566 } | |
| 25567 return _json; | |
| 25568 } | |
| 25569 } | |
| 25570 | |
| 25571 /** Subaccount List Response */ | |
| 25572 class SubaccountsListResponse { | |
| 25573 /** | |
| 25574 * Identifies what kind of resource this is. Value: the fixed string | |
| 25575 * "dfareporting#subaccountsListResponse". | |
| 25576 */ | |
| 25577 core.String kind; | |
| 25578 /** Pagination token to be used for the next list operation. */ | |
| 25579 core.String nextPageToken; | |
| 25580 /** Subaccount collection. */ | |
| 25581 core.List<Subaccount> subaccounts; | |
| 25582 | |
| 25583 SubaccountsListResponse(); | |
| 25584 | |
| 25585 SubaccountsListResponse.fromJson(core.Map _json) { | |
| 25586 if (_json.containsKey("kind")) { | |
| 25587 kind = _json["kind"]; | |
| 25588 } | |
| 25589 if (_json.containsKey("nextPageToken")) { | |
| 25590 nextPageToken = _json["nextPageToken"]; | |
| 25591 } | |
| 25592 if (_json.containsKey("subaccounts")) { | |
| 25593 subaccounts = _json["subaccounts"].map((value) => new Subaccount.fromJson(
value)).toList(); | |
| 25594 } | |
| 25595 } | |
| 25596 | |
| 25597 core.Map toJson() { | |
| 25598 var _json = new core.Map(); | |
| 25599 if (kind != null) { | |
| 25600 _json["kind"] = kind; | |
| 25601 } | |
| 25602 if (nextPageToken != null) { | |
| 25603 _json["nextPageToken"] = nextPageToken; | |
| 25604 } | |
| 25605 if (subaccounts != null) { | |
| 25606 _json["subaccounts"] = subaccounts.map((value) => (value).toJson()).toList
(); | |
| 25607 } | |
| 25608 return _json; | |
| 25609 } | |
| 25610 } | |
| 25611 | |
| 25612 /** Placement Tag Data */ | |
| 25613 class TagData { | |
| 25614 /** Ad associated with this placement tag. */ | |
| 25615 core.String adId; | |
| 25616 /** Tag string to record a click. */ | |
| 25617 core.String clickTag; | |
| 25618 /** Creative associated with this placement tag. */ | |
| 25619 core.String creativeId; | |
| 25620 /** | |
| 25621 * TagData tag format of this tag. | |
| 25622 * Possible string values are: | |
| 25623 * - "PLACEMENT_TAG_CLICK_COMMANDS" | |
| 25624 * - "PLACEMENT_TAG_IFRAME_ILAYER" | |
| 25625 * - "PLACEMENT_TAG_IFRAME_JAVASCRIPT" | |
| 25626 * - "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY" | |
| 25627 * - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH" | |
| 25628 * - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3" | |
| 25629 * - "PLACEMENT_TAG_INTERNAL_REDIRECT" | |
| 25630 * - "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT" | |
| 25631 * - "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY" | |
| 25632 * - "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT" | |
| 25633 * - "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT" | |
| 25634 * - "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY" | |
| 25635 * - "PLACEMENT_TAG_JAVASCRIPT" | |
| 25636 * - "PLACEMENT_TAG_JAVASCRIPT_LEGACY" | |
| 25637 * - "PLACEMENT_TAG_STANDARD" | |
| 25638 * - "PLACEMENT_TAG_TRACKING" | |
| 25639 * - "PLACEMENT_TAG_TRACKING_IFRAME" | |
| 25640 * - "PLACEMENT_TAG_TRACKING_JAVASCRIPT" | |
| 25641 */ | |
| 25642 core.String format; | |
| 25643 /** Tag string for serving an ad. */ | |
| 25644 core.String impressionTag; | |
| 25645 | |
| 25646 TagData(); | |
| 25647 | |
| 25648 TagData.fromJson(core.Map _json) { | |
| 25649 if (_json.containsKey("adId")) { | |
| 25650 adId = _json["adId"]; | |
| 25651 } | |
| 25652 if (_json.containsKey("clickTag")) { | |
| 25653 clickTag = _json["clickTag"]; | |
| 25654 } | |
| 25655 if (_json.containsKey("creativeId")) { | |
| 25656 creativeId = _json["creativeId"]; | |
| 25657 } | |
| 25658 if (_json.containsKey("format")) { | |
| 25659 format = _json["format"]; | |
| 25660 } | |
| 25661 if (_json.containsKey("impressionTag")) { | |
| 25662 impressionTag = _json["impressionTag"]; | |
| 25663 } | |
| 25664 } | |
| 25665 | |
| 25666 core.Map toJson() { | |
| 25667 var _json = new core.Map(); | |
| 25668 if (adId != null) { | |
| 25669 _json["adId"] = adId; | |
| 25670 } | |
| 25671 if (clickTag != null) { | |
| 25672 _json["clickTag"] = clickTag; | |
| 25673 } | |
| 25674 if (creativeId != null) { | |
| 25675 _json["creativeId"] = creativeId; | |
| 25676 } | |
| 25677 if (format != null) { | |
| 25678 _json["format"] = format; | |
| 25679 } | |
| 25680 if (impressionTag != null) { | |
| 25681 _json["impressionTag"] = impressionTag; | |
| 25682 } | |
| 25683 return _json; | |
| 25684 } | |
| 25685 } | |
| 25686 | |
| 25687 /** Tag Settings */ | |
| 25688 class TagSetting { | |
| 25689 /** | |
| 25690 * Additional key-values to be included in tags. Each key-value pair must be | |
| 25691 * of the form key=value, and pairs must be separated by a semicolon (;). Keys | |
| 25692 * and values must not contain commas. For example, id=2;color=red is a valid | |
| 25693 * value for this field. | |
| 25694 */ | |
| 25695 core.String additionalKeyValues; | |
| 25696 /** | |
| 25697 * Whether static landing page URLs should be included in the tags. This | |
| 25698 * setting applies only to placements. | |
| 25699 */ | |
| 25700 core.bool includeClickThroughUrls; | |
| 25701 /** Whether click-tracking string should be included in the tags. */ | |
| 25702 core.bool includeClickTracking; | |
| 25703 /** | |
| 25704 * Option specifying how keywords are embedded in ad tags. This setting can be | |
| 25705 * used to specify whether keyword placeholders are inserted in placement tags | |
| 25706 * for this site. Publishers can then add keywords to those placeholders. | |
| 25707 * Possible string values are: | |
| 25708 * - "GENERATE_SEPARATE_TAG_FOR_EACH_KEYWORD" | |
| 25709 * - "IGNORE" | |
| 25710 * - "PLACEHOLDER_WITH_LIST_OF_KEYWORDS" | |
| 25711 */ | |
| 25712 core.String keywordOption; | |
| 25713 | |
| 25714 TagSetting(); | |
| 25715 | |
| 25716 TagSetting.fromJson(core.Map _json) { | |
| 25717 if (_json.containsKey("additionalKeyValues")) { | |
| 25718 additionalKeyValues = _json["additionalKeyValues"]; | |
| 25719 } | |
| 25720 if (_json.containsKey("includeClickThroughUrls")) { | |
| 25721 includeClickThroughUrls = _json["includeClickThroughUrls"]; | |
| 25722 } | |
| 25723 if (_json.containsKey("includeClickTracking")) { | |
| 25724 includeClickTracking = _json["includeClickTracking"]; | |
| 25725 } | |
| 25726 if (_json.containsKey("keywordOption")) { | |
| 25727 keywordOption = _json["keywordOption"]; | |
| 25728 } | |
| 25729 } | |
| 25730 | |
| 25731 core.Map toJson() { | |
| 25732 var _json = new core.Map(); | |
| 25733 if (additionalKeyValues != null) { | |
| 25734 _json["additionalKeyValues"] = additionalKeyValues; | |
| 25735 } | |
| 25736 if (includeClickThroughUrls != null) { | |
| 25737 _json["includeClickThroughUrls"] = includeClickThroughUrls; | |
| 25738 } | |
| 25739 if (includeClickTracking != null) { | |
| 25740 _json["includeClickTracking"] = includeClickTracking; | |
| 25741 } | |
| 25742 if (keywordOption != null) { | |
| 25743 _json["keywordOption"] = keywordOption; | |
| 25744 } | |
| 25745 return _json; | |
| 25746 } | |
| 25747 } | |
| 25748 | |
| 25749 /** Dynamic and Image Tag Settings. */ | |
| 25750 class TagSettings { | |
| 25751 /** Whether dynamic floodlight tags are enabled. */ | |
| 25752 core.bool dynamicTagEnabled; | |
| 25753 /** Whether image tags are enabled. */ | |
| 25754 core.bool imageTagEnabled; | |
| 25755 | |
| 25756 TagSettings(); | |
| 25757 | |
| 25758 TagSettings.fromJson(core.Map _json) { | |
| 25759 if (_json.containsKey("dynamicTagEnabled")) { | |
| 25760 dynamicTagEnabled = _json["dynamicTagEnabled"]; | |
| 25761 } | |
| 25762 if (_json.containsKey("imageTagEnabled")) { | |
| 25763 imageTagEnabled = _json["imageTagEnabled"]; | |
| 25764 } | |
| 25765 } | |
| 25766 | |
| 25767 core.Map toJson() { | |
| 25768 var _json = new core.Map(); | |
| 25769 if (dynamicTagEnabled != null) { | |
| 25770 _json["dynamicTagEnabled"] = dynamicTagEnabled; | |
| 25771 } | |
| 25772 if (imageTagEnabled != null) { | |
| 25773 _json["imageTagEnabled"] = imageTagEnabled; | |
| 25774 } | |
| 25775 return _json; | |
| 25776 } | |
| 25777 } | |
| 25778 | |
| 25779 /** Target Window. */ | |
| 25780 class TargetWindow { | |
| 25781 /** User-entered value. */ | |
| 25782 core.String customHtml; | |
| 25783 /** | |
| 25784 * Type of browser window for which the backup image of the flash creative can | |
| 25785 * be displayed. | |
| 25786 * Possible string values are: | |
| 25787 * - "CURRENT_WINDOW" | |
| 25788 * - "CUSTOM" | |
| 25789 * - "NEW_WINDOW" | |
| 25790 */ | |
| 25791 core.String targetWindowOption; | |
| 25792 | |
| 25793 TargetWindow(); | |
| 25794 | |
| 25795 TargetWindow.fromJson(core.Map _json) { | |
| 25796 if (_json.containsKey("customHtml")) { | |
| 25797 customHtml = _json["customHtml"]; | |
| 25798 } | |
| 25799 if (_json.containsKey("targetWindowOption")) { | |
| 25800 targetWindowOption = _json["targetWindowOption"]; | |
| 25801 } | |
| 25802 } | |
| 25803 | |
| 25804 core.Map toJson() { | |
| 25805 var _json = new core.Map(); | |
| 25806 if (customHtml != null) { | |
| 25807 _json["customHtml"] = customHtml; | |
| 25808 } | |
| 25809 if (targetWindowOption != null) { | |
| 25810 _json["targetWindowOption"] = targetWindowOption; | |
| 25811 } | |
| 25812 return _json; | |
| 25813 } | |
| 25814 } | |
| 25815 | |
| 25816 /** | |
| 25817 * Contains properties of a targetable remarketing list. Remarketing enables you | |
| 25818 * to create lists of users who have performed specific actions on a site, then | |
| 25819 * target ads to members of those lists. This resource is a read-only view of a | |
| 25820 * remarketing list to be used to faciliate targeting ads to specific lists. | |
| 25821 * Remarketing lists that are owned by your advertisers and those that are | |
| 25822 * shared to your advertisers or account are accessible via this resource. To | |
| 25823 * manage remarketing lists that are owned by your advertisers, use the | |
| 25824 * RemarketingLists resource. | |
| 25825 */ | |
| 25826 class TargetableRemarketingList { | |
| 25827 /** | |
| 25828 * Account ID of this remarketing list. This is a read-only, auto-generated | |
| 25829 * field that is only returned in GET requests. | |
| 25830 */ | |
| 25831 core.String accountId; | |
| 25832 /** Whether this targetable remarketing list is active. */ | |
| 25833 core.bool active; | |
| 25834 /** | |
| 25835 * Dimension value for the advertiser ID that owns this targetable remarketing | |
| 25836 * list. | |
| 25837 */ | |
| 25838 core.String advertiserId; | |
| 25839 /** Dimension value for the ID of the advertiser. */ | |
| 25840 DimensionValue advertiserIdDimensionValue; | |
| 25841 /** Targetable remarketing list description. */ | |
| 25842 core.String description; | |
| 25843 /** Targetable remarketing list ID. */ | |
| 25844 core.String id; | |
| 25845 /** | |
| 25846 * Identifies what kind of resource this is. Value: the fixed string | |
| 25847 * "dfareporting#targetableRemarketingList". | |
| 25848 */ | |
| 25849 core.String kind; | |
| 25850 /** | |
| 25851 * Number of days that a user should remain in the targetable remarketing list | |
| 25852 * without an impression. | |
| 25853 */ | |
| 25854 core.String lifeSpan; | |
| 25855 /** Number of users currently in the list. This is a read-only field. */ | |
| 25856 core.String listSize; | |
| 25857 /** | |
| 25858 * Product from which this targetable remarketing list was originated. | |
| 25859 * Possible string values are: | |
| 25860 * - "REMARKETING_LIST_SOURCE_ADX" | |
| 25861 * - "REMARKETING_LIST_SOURCE_DBM" | |
| 25862 * - "REMARKETING_LIST_SOURCE_DFA" | |
| 25863 * - "REMARKETING_LIST_SOURCE_DFP" | |
| 25864 * - "REMARKETING_LIST_SOURCE_DMP" | |
| 25865 * - "REMARKETING_LIST_SOURCE_GA" | |
| 25866 * - "REMARKETING_LIST_SOURCE_GPLUS" | |
| 25867 * - "REMARKETING_LIST_SOURCE_OTHER" | |
| 25868 * - "REMARKETING_LIST_SOURCE_PLAY_STORE" | |
| 25869 * - "REMARKETING_LIST_SOURCE_XFP" | |
| 25870 * - "REMARKETING_LIST_SOURCE_YOUTUBE" | |
| 25871 */ | |
| 25872 core.String listSource; | |
| 25873 /** | |
| 25874 * Name of the targetable remarketing list. Is no greater than 128 characters | |
| 25875 * long. | |
| 25876 */ | |
| 25877 core.String name; | |
| 25878 /** | |
| 25879 * Subaccount ID of this remarketing list. This is a read-only, auto-generated | |
| 25880 * field that is only returned in GET requests. | |
| 25881 */ | |
| 25882 core.String subaccountId; | |
| 25883 | |
| 25884 TargetableRemarketingList(); | |
| 25885 | |
| 25886 TargetableRemarketingList.fromJson(core.Map _json) { | |
| 25887 if (_json.containsKey("accountId")) { | |
| 25888 accountId = _json["accountId"]; | |
| 25889 } | |
| 25890 if (_json.containsKey("active")) { | |
| 25891 active = _json["active"]; | |
| 25892 } | |
| 25893 if (_json.containsKey("advertiserId")) { | |
| 25894 advertiserId = _json["advertiserId"]; | |
| 25895 } | |
| 25896 if (_json.containsKey("advertiserIdDimensionValue")) { | |
| 25897 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser
IdDimensionValue"]); | |
| 25898 } | |
| 25899 if (_json.containsKey("description")) { | |
| 25900 description = _json["description"]; | |
| 25901 } | |
| 25902 if (_json.containsKey("id")) { | |
| 25903 id = _json["id"]; | |
| 25904 } | |
| 25905 if (_json.containsKey("kind")) { | |
| 25906 kind = _json["kind"]; | |
| 25907 } | |
| 25908 if (_json.containsKey("lifeSpan")) { | |
| 25909 lifeSpan = _json["lifeSpan"]; | |
| 25910 } | |
| 25911 if (_json.containsKey("listSize")) { | |
| 25912 listSize = _json["listSize"]; | |
| 25913 } | |
| 25914 if (_json.containsKey("listSource")) { | |
| 25915 listSource = _json["listSource"]; | |
| 25916 } | |
| 25917 if (_json.containsKey("name")) { | |
| 25918 name = _json["name"]; | |
| 25919 } | |
| 25920 if (_json.containsKey("subaccountId")) { | |
| 25921 subaccountId = _json["subaccountId"]; | |
| 25922 } | |
| 25923 } | |
| 25924 | |
| 25925 core.Map toJson() { | |
| 25926 var _json = new core.Map(); | |
| 25927 if (accountId != null) { | |
| 25928 _json["accountId"] = accountId; | |
| 25929 } | |
| 25930 if (active != null) { | |
| 25931 _json["active"] = active; | |
| 25932 } | |
| 25933 if (advertiserId != null) { | |
| 25934 _json["advertiserId"] = advertiserId; | |
| 25935 } | |
| 25936 if (advertiserIdDimensionValue != null) { | |
| 25937 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson(
); | |
| 25938 } | |
| 25939 if (description != null) { | |
| 25940 _json["description"] = description; | |
| 25941 } | |
| 25942 if (id != null) { | |
| 25943 _json["id"] = id; | |
| 25944 } | |
| 25945 if (kind != null) { | |
| 25946 _json["kind"] = kind; | |
| 25947 } | |
| 25948 if (lifeSpan != null) { | |
| 25949 _json["lifeSpan"] = lifeSpan; | |
| 25950 } | |
| 25951 if (listSize != null) { | |
| 25952 _json["listSize"] = listSize; | |
| 25953 } | |
| 25954 if (listSource != null) { | |
| 25955 _json["listSource"] = listSource; | |
| 25956 } | |
| 25957 if (name != null) { | |
| 25958 _json["name"] = name; | |
| 25959 } | |
| 25960 if (subaccountId != null) { | |
| 25961 _json["subaccountId"] = subaccountId; | |
| 25962 } | |
| 25963 return _json; | |
| 25964 } | |
| 25965 } | |
| 25966 | |
| 25967 /** Targetable remarketing list response */ | |
| 25968 class TargetableRemarketingListsListResponse { | |
| 25969 /** | |
| 25970 * Identifies what kind of resource this is. Value: the fixed string | |
| 25971 * "dfareporting#targetableRemarketingListsListResponse". | |
| 25972 */ | |
| 25973 core.String kind; | |
| 25974 /** Pagination token to be used for the next list operation. */ | |
| 25975 core.String nextPageToken; | |
| 25976 /** Targetable remarketing list collection. */ | |
| 25977 core.List<TargetableRemarketingList> targetableRemarketingLists; | |
| 25978 | |
| 25979 TargetableRemarketingListsListResponse(); | |
| 25980 | |
| 25981 TargetableRemarketingListsListResponse.fromJson(core.Map _json) { | |
| 25982 if (_json.containsKey("kind")) { | |
| 25983 kind = _json["kind"]; | |
| 25984 } | |
| 25985 if (_json.containsKey("nextPageToken")) { | |
| 25986 nextPageToken = _json["nextPageToken"]; | |
| 25987 } | |
| 25988 if (_json.containsKey("targetableRemarketingLists")) { | |
| 25989 targetableRemarketingLists = _json["targetableRemarketingLists"].map((valu
e) => new TargetableRemarketingList.fromJson(value)).toList(); | |
| 25990 } | |
| 25991 } | |
| 25992 | |
| 25993 core.Map toJson() { | |
| 25994 var _json = new core.Map(); | |
| 25995 if (kind != null) { | |
| 25996 _json["kind"] = kind; | |
| 25997 } | |
| 25998 if (nextPageToken != null) { | |
| 25999 _json["nextPageToken"] = nextPageToken; | |
| 26000 } | |
| 26001 if (targetableRemarketingLists != null) { | |
| 26002 _json["targetableRemarketingLists"] = targetableRemarketingLists.map((valu
e) => (value).toJson()).toList(); | |
| 26003 } | |
| 26004 return _json; | |
| 26005 } | |
| 26006 } | |
| 26007 | |
| 26008 /** Technology Targeting. */ | |
| 26009 class TechnologyTargeting { | |
| 26010 /** | |
| 26011 * Browsers that this ad targets. For each browser either set browserVersionId | |
| 26012 * or dartId along with the version numbers. If both are specified, only | |
| 26013 * browserVersionId will be used. The other fields are populated automatically | |
| 26014 * when the ad is inserted or updated. | |
| 26015 */ | |
| 26016 core.List<Browser> browsers; | |
| 26017 /** | |
| 26018 * Connection types that this ad targets. For each connection type only id is | |
| 26019 * required. The other fields are populated automatically when the ad is | |
| 26020 * inserted or updated. | |
| 26021 */ | |
| 26022 core.List<ConnectionType> connectionTypes; | |
| 26023 /** | |
| 26024 * Mobile carriers that this ad targets. For each mobile carrier only id is | |
| 26025 * required, and the other fields are populated automatically when the ad is | |
| 26026 * inserted or updated. If targeting a mobile carrier, do not set targeting | |
| 26027 * for any zip codes. | |
| 26028 */ | |
| 26029 core.List<MobileCarrier> mobileCarriers; | |
| 26030 /** | |
| 26031 * Operating system versions that this ad targets. To target all versions, use | |
| 26032 * operatingSystems. For each operating system version, only id is required. | |
| 26033 * The other fields are populated automatically when the ad is inserted or | |
| 26034 * updated. If targeting an operating system version, do not set targeting for | |
| 26035 * the corresponding operating system in operatingSystems. | |
| 26036 */ | |
| 26037 core.List<OperatingSystemVersion> operatingSystemVersions; | |
| 26038 /** | |
| 26039 * Operating systems that this ad targets. To target specific versions, use | |
| 26040 * operatingSystemVersions. For each operating system only dartId is required. | |
| 26041 * The other fields are populated automatically when the ad is inserted or | |
| 26042 * updated. If targeting an operating system, do not set targeting for | |
| 26043 * operating system versions for the same operating system. | |
| 26044 */ | |
| 26045 core.List<OperatingSystem> operatingSystems; | |
| 26046 /** | |
| 26047 * Platform types that this ad targets. For example, desktop, mobile, or | |
| 26048 * tablet. For each platform type, only id is required, and the other fields | |
| 26049 * are populated automatically when the ad is inserted or updated. | |
| 26050 */ | |
| 26051 core.List<PlatformType> platformTypes; | |
| 26052 | |
| 26053 TechnologyTargeting(); | |
| 26054 | |
| 26055 TechnologyTargeting.fromJson(core.Map _json) { | |
| 26056 if (_json.containsKey("browsers")) { | |
| 26057 browsers = _json["browsers"].map((value) => new Browser.fromJson(value)).t
oList(); | |
| 26058 } | |
| 26059 if (_json.containsKey("connectionTypes")) { | |
| 26060 connectionTypes = _json["connectionTypes"].map((value) => new ConnectionTy
pe.fromJson(value)).toList(); | |
| 26061 } | |
| 26062 if (_json.containsKey("mobileCarriers")) { | |
| 26063 mobileCarriers = _json["mobileCarriers"].map((value) => new MobileCarrier.
fromJson(value)).toList(); | |
| 26064 } | |
| 26065 if (_json.containsKey("operatingSystemVersions")) { | |
| 26066 operatingSystemVersions = _json["operatingSystemVersions"].map((value) =>
new OperatingSystemVersion.fromJson(value)).toList(); | |
| 26067 } | |
| 26068 if (_json.containsKey("operatingSystems")) { | |
| 26069 operatingSystems = _json["operatingSystems"].map((value) => new OperatingS
ystem.fromJson(value)).toList(); | |
| 26070 } | |
| 26071 if (_json.containsKey("platformTypes")) { | |
| 26072 platformTypes = _json["platformTypes"].map((value) => new PlatformType.fro
mJson(value)).toList(); | |
| 26073 } | |
| 26074 } | |
| 26075 | |
| 26076 core.Map toJson() { | |
| 26077 var _json = new core.Map(); | |
| 26078 if (browsers != null) { | |
| 26079 _json["browsers"] = browsers.map((value) => (value).toJson()).toList(); | |
| 26080 } | |
| 26081 if (connectionTypes != null) { | |
| 26082 _json["connectionTypes"] = connectionTypes.map((value) => (value).toJson()
).toList(); | |
| 26083 } | |
| 26084 if (mobileCarriers != null) { | |
| 26085 _json["mobileCarriers"] = mobileCarriers.map((value) => (value).toJson()).
toList(); | |
| 26086 } | |
| 26087 if (operatingSystemVersions != null) { | |
| 26088 _json["operatingSystemVersions"] = operatingSystemVersions.map((value) =>
(value).toJson()).toList(); | |
| 26089 } | |
| 26090 if (operatingSystems != null) { | |
| 26091 _json["operatingSystems"] = operatingSystems.map((value) => (value).toJson
()).toList(); | |
| 26092 } | |
| 26093 if (platformTypes != null) { | |
| 26094 _json["platformTypes"] = platformTypes.map((value) => (value).toJson()).to
List(); | |
| 26095 } | |
| 26096 return _json; | |
| 26097 } | |
| 26098 } | |
| 26099 | |
| 26100 /** Third Party Authentication Token */ | |
| 26101 class ThirdPartyAuthenticationToken { | |
| 26102 /** Name of the third-party authentication token. */ | |
| 26103 core.String name; | |
| 26104 /** | |
| 26105 * Value of the third-party authentication token. This is a read-only, | |
| 26106 * auto-generated field. | |
| 26107 */ | |
| 26108 core.String value; | |
| 26109 | |
| 26110 ThirdPartyAuthenticationToken(); | |
| 26111 | |
| 26112 ThirdPartyAuthenticationToken.fromJson(core.Map _json) { | |
| 26113 if (_json.containsKey("name")) { | |
| 26114 name = _json["name"]; | |
| 26115 } | |
| 26116 if (_json.containsKey("value")) { | |
| 26117 value = _json["value"]; | |
| 26118 } | |
| 26119 } | |
| 26120 | |
| 26121 core.Map toJson() { | |
| 26122 var _json = new core.Map(); | |
| 26123 if (name != null) { | |
| 26124 _json["name"] = name; | |
| 26125 } | |
| 26126 if (value != null) { | |
| 26127 _json["value"] = value; | |
| 26128 } | |
| 26129 return _json; | |
| 26130 } | |
| 26131 } | |
| 26132 | |
| 26133 /** Third-party Tracking URL. */ | |
| 26134 class ThirdPartyTrackingUrl { | |
| 26135 /** | |
| 26136 * Third-party URL type for in-stream video creatives. | |
| 26137 * Possible string values are: | |
| 26138 * - "CLICK_TRACKING" | |
| 26139 * - "IMPRESSION" | |
| 26140 * - "RICH_MEDIA_BACKUP_IMPRESSION" | |
| 26141 * - "RICH_MEDIA_IMPRESSION" | |
| 26142 * - "RICH_MEDIA_RM_IMPRESSION" | |
| 26143 * - "SURVEY" | |
| 26144 * - "VIDEO_COMPLETE" | |
| 26145 * - "VIDEO_CUSTOM" | |
| 26146 * - "VIDEO_FIRST_QUARTILE" | |
| 26147 * - "VIDEO_FULLSCREEN" | |
| 26148 * - "VIDEO_MIDPOINT" | |
| 26149 * - "VIDEO_MUTE" | |
| 26150 * - "VIDEO_PAUSE" | |
| 26151 * - "VIDEO_PROGRESS" | |
| 26152 * - "VIDEO_REWIND" | |
| 26153 * - "VIDEO_SKIP" | |
| 26154 * - "VIDEO_START" | |
| 26155 * - "VIDEO_STOP" | |
| 26156 * - "VIDEO_THIRD_QUARTILE" | |
| 26157 */ | |
| 26158 core.String thirdPartyUrlType; | |
| 26159 /** URL for the specified third-party URL type. */ | |
| 26160 core.String url; | |
| 26161 | |
| 26162 ThirdPartyTrackingUrl(); | |
| 26163 | |
| 26164 ThirdPartyTrackingUrl.fromJson(core.Map _json) { | |
| 26165 if (_json.containsKey("thirdPartyUrlType")) { | |
| 26166 thirdPartyUrlType = _json["thirdPartyUrlType"]; | |
| 26167 } | |
| 26168 if (_json.containsKey("url")) { | |
| 26169 url = _json["url"]; | |
| 26170 } | |
| 26171 } | |
| 26172 | |
| 26173 core.Map toJson() { | |
| 26174 var _json = new core.Map(); | |
| 26175 if (thirdPartyUrlType != null) { | |
| 26176 _json["thirdPartyUrlType"] = thirdPartyUrlType; | |
| 26177 } | |
| 26178 if (url != null) { | |
| 26179 _json["url"] = url; | |
| 26180 } | |
| 26181 return _json; | |
| 26182 } | |
| 26183 } | |
| 26184 | |
| 26185 /** User Defined Variable configuration. */ | |
| 26186 class UserDefinedVariableConfiguration { | |
| 26187 /** | |
| 26188 * Data type for the variable. This is a required field. | |
| 26189 * Possible string values are: | |
| 26190 * - "NUMBER" | |
| 26191 * - "STRING" | |
| 26192 */ | |
| 26193 core.String dataType; | |
| 26194 /** | |
| 26195 * User-friendly name for the variable which will appear in reports. This is a | |
| 26196 * required field, must be less than 64 characters long, and cannot contain | |
| 26197 * the following characters: ""<>". | |
| 26198 */ | |
| 26199 core.String reportName; | |
| 26200 /** | |
| 26201 * Variable name in the tag. This is a required field. | |
| 26202 * Possible string values are: | |
| 26203 * - "U1" | |
| 26204 * - "U10" | |
| 26205 * - "U100" | |
| 26206 * - "U11" | |
| 26207 * - "U12" | |
| 26208 * - "U13" | |
| 26209 * - "U14" | |
| 26210 * - "U15" | |
| 26211 * - "U16" | |
| 26212 * - "U17" | |
| 26213 * - "U18" | |
| 26214 * - "U19" | |
| 26215 * - "U2" | |
| 26216 * - "U20" | |
| 26217 * - "U21" | |
| 26218 * - "U22" | |
| 26219 * - "U23" | |
| 26220 * - "U24" | |
| 26221 * - "U25" | |
| 26222 * - "U26" | |
| 26223 * - "U27" | |
| 26224 * - "U28" | |
| 26225 * - "U29" | |
| 26226 * - "U3" | |
| 26227 * - "U30" | |
| 26228 * - "U31" | |
| 26229 * - "U32" | |
| 26230 * - "U33" | |
| 26231 * - "U34" | |
| 26232 * - "U35" | |
| 26233 * - "U36" | |
| 26234 * - "U37" | |
| 26235 * - "U38" | |
| 26236 * - "U39" | |
| 26237 * - "U4" | |
| 26238 * - "U40" | |
| 26239 * - "U41" | |
| 26240 * - "U42" | |
| 26241 * - "U43" | |
| 26242 * - "U44" | |
| 26243 * - "U45" | |
| 26244 * - "U46" | |
| 26245 * - "U47" | |
| 26246 * - "U48" | |
| 26247 * - "U49" | |
| 26248 * - "U5" | |
| 26249 * - "U50" | |
| 26250 * - "U51" | |
| 26251 * - "U52" | |
| 26252 * - "U53" | |
| 26253 * - "U54" | |
| 26254 * - "U55" | |
| 26255 * - "U56" | |
| 26256 * - "U57" | |
| 26257 * - "U58" | |
| 26258 * - "U59" | |
| 26259 * - "U6" | |
| 26260 * - "U60" | |
| 26261 * - "U61" | |
| 26262 * - "U62" | |
| 26263 * - "U63" | |
| 26264 * - "U64" | |
| 26265 * - "U65" | |
| 26266 * - "U66" | |
| 26267 * - "U67" | |
| 26268 * - "U68" | |
| 26269 * - "U69" | |
| 26270 * - "U7" | |
| 26271 * - "U70" | |
| 26272 * - "U71" | |
| 26273 * - "U72" | |
| 26274 * - "U73" | |
| 26275 * - "U74" | |
| 26276 * - "U75" | |
| 26277 * - "U76" | |
| 26278 * - "U77" | |
| 26279 * - "U78" | |
| 26280 * - "U79" | |
| 26281 * - "U8" | |
| 26282 * - "U80" | |
| 26283 * - "U81" | |
| 26284 * - "U82" | |
| 26285 * - "U83" | |
| 26286 * - "U84" | |
| 26287 * - "U85" | |
| 26288 * - "U86" | |
| 26289 * - "U87" | |
| 26290 * - "U88" | |
| 26291 * - "U89" | |
| 26292 * - "U9" | |
| 26293 * - "U90" | |
| 26294 * - "U91" | |
| 26295 * - "U92" | |
| 26296 * - "U93" | |
| 26297 * - "U94" | |
| 26298 * - "U95" | |
| 26299 * - "U96" | |
| 26300 * - "U97" | |
| 26301 * - "U98" | |
| 26302 * - "U99" | |
| 26303 */ | |
| 26304 core.String variableType; | |
| 26305 | |
| 26306 UserDefinedVariableConfiguration(); | |
| 26307 | |
| 26308 UserDefinedVariableConfiguration.fromJson(core.Map _json) { | |
| 26309 if (_json.containsKey("dataType")) { | |
| 26310 dataType = _json["dataType"]; | |
| 26311 } | |
| 26312 if (_json.containsKey("reportName")) { | |
| 26313 reportName = _json["reportName"]; | |
| 26314 } | |
| 26315 if (_json.containsKey("variableType")) { | |
| 26316 variableType = _json["variableType"]; | |
| 26317 } | |
| 26318 } | |
| 26319 | |
| 26320 core.Map toJson() { | |
| 26321 var _json = new core.Map(); | |
| 26322 if (dataType != null) { | |
| 26323 _json["dataType"] = dataType; | |
| 26324 } | |
| 26325 if (reportName != null) { | |
| 26326 _json["reportName"] = reportName; | |
| 26327 } | |
| 26328 if (variableType != null) { | |
| 26329 _json["variableType"] = variableType; | |
| 26330 } | |
| 26331 return _json; | |
| 26332 } | |
| 26333 } | |
| 26334 | |
| 26335 /** Represents a UserProfile resource. */ | |
| 26336 class UserProfile { | |
| 26337 /** The account ID to which this profile belongs. */ | |
| 26338 core.String accountId; | |
| 26339 /** The account name this profile belongs to. */ | |
| 26340 core.String accountName; | |
| 26341 /** The eTag of this response for caching purposes. */ | |
| 26342 core.String etag; | |
| 26343 /** The kind of resource this is, in this case dfareporting#userProfile. */ | |
| 26344 core.String kind; | |
| 26345 /** The unique ID of the user profile. */ | |
| 26346 core.String profileId; | |
| 26347 /** The sub account ID this profile belongs to if applicable. */ | |
| 26348 core.String subAccountId; | |
| 26349 /** The sub account name this profile belongs to if applicable. */ | |
| 26350 core.String subAccountName; | |
| 26351 /** The user name. */ | |
| 26352 core.String userName; | |
| 26353 | |
| 26354 UserProfile(); | |
| 26355 | |
| 26356 UserProfile.fromJson(core.Map _json) { | |
| 26357 if (_json.containsKey("accountId")) { | |
| 26358 accountId = _json["accountId"]; | |
| 26359 } | |
| 26360 if (_json.containsKey("accountName")) { | |
| 26361 accountName = _json["accountName"]; | |
| 26362 } | |
| 26363 if (_json.containsKey("etag")) { | |
| 26364 etag = _json["etag"]; | |
| 26365 } | |
| 26366 if (_json.containsKey("kind")) { | |
| 26367 kind = _json["kind"]; | |
| 26368 } | |
| 26369 if (_json.containsKey("profileId")) { | |
| 26370 profileId = _json["profileId"]; | |
| 26371 } | |
| 26372 if (_json.containsKey("subAccountId")) { | |
| 26373 subAccountId = _json["subAccountId"]; | |
| 26374 } | |
| 26375 if (_json.containsKey("subAccountName")) { | |
| 26376 subAccountName = _json["subAccountName"]; | |
| 26377 } | |
| 26378 if (_json.containsKey("userName")) { | |
| 26379 userName = _json["userName"]; | |
| 26380 } | |
| 26381 } | |
| 26382 | |
| 26383 core.Map toJson() { | |
| 26384 var _json = new core.Map(); | |
| 26385 if (accountId != null) { | |
| 26386 _json["accountId"] = accountId; | |
| 26387 } | |
| 26388 if (accountName != null) { | |
| 26389 _json["accountName"] = accountName; | |
| 26390 } | |
| 26391 if (etag != null) { | |
| 26392 _json["etag"] = etag; | |
| 26393 } | |
| 26394 if (kind != null) { | |
| 26395 _json["kind"] = kind; | |
| 26396 } | |
| 26397 if (profileId != null) { | |
| 26398 _json["profileId"] = profileId; | |
| 26399 } | |
| 26400 if (subAccountId != null) { | |
| 26401 _json["subAccountId"] = subAccountId; | |
| 26402 } | |
| 26403 if (subAccountName != null) { | |
| 26404 _json["subAccountName"] = subAccountName; | |
| 26405 } | |
| 26406 if (userName != null) { | |
| 26407 _json["userName"] = userName; | |
| 26408 } | |
| 26409 return _json; | |
| 26410 } | |
| 26411 } | |
| 26412 | |
| 26413 /** Represents the list of user profiles. */ | |
| 26414 class UserProfileList { | |
| 26415 /** The eTag of this response for caching purposes. */ | |
| 26416 core.String etag; | |
| 26417 /** The user profiles returned in this response. */ | |
| 26418 core.List<UserProfile> items; | |
| 26419 /** The kind of list this is, in this case dfareporting#userProfileList. */ | |
| 26420 core.String kind; | |
| 26421 | |
| 26422 UserProfileList(); | |
| 26423 | |
| 26424 UserProfileList.fromJson(core.Map _json) { | |
| 26425 if (_json.containsKey("etag")) { | |
| 26426 etag = _json["etag"]; | |
| 26427 } | |
| 26428 if (_json.containsKey("items")) { | |
| 26429 items = _json["items"].map((value) => new UserProfile.fromJson(value)).toL
ist(); | |
| 26430 } | |
| 26431 if (_json.containsKey("kind")) { | |
| 26432 kind = _json["kind"]; | |
| 26433 } | |
| 26434 } | |
| 26435 | |
| 26436 core.Map toJson() { | |
| 26437 var _json = new core.Map(); | |
| 26438 if (etag != null) { | |
| 26439 _json["etag"] = etag; | |
| 26440 } | |
| 26441 if (items != null) { | |
| 26442 _json["items"] = items.map((value) => (value).toJson()).toList(); | |
| 26443 } | |
| 26444 if (kind != null) { | |
| 26445 _json["kind"] = kind; | |
| 26446 } | |
| 26447 return _json; | |
| 26448 } | |
| 26449 } | |
| 26450 | |
| 26451 /** Contains properties of auser role, which is used to manage user access. */ | |
| 26452 class UserRole { | |
| 26453 /** | |
| 26454 * Account ID of this user role. This is a read-only field that can be left | |
| 26455 * blank. | |
| 26456 */ | |
| 26457 core.String accountId; | |
| 26458 /** | |
| 26459 * Whether this is a default user role. Default user roles are created by the | |
| 26460 * system for the account/subaccount and cannot be modified or deleted. Each | |
| 26461 * default user role comes with a basic set of preassigned permissions. | |
| 26462 */ | |
| 26463 core.bool defaultUserRole; | |
| 26464 /** ID of this user role. This is a read-only, auto-generated field. */ | |
| 26465 core.String id; | |
| 26466 /** | |
| 26467 * Identifies what kind of resource this is. Value: the fixed string | |
| 26468 * "dfareporting#userRole". | |
| 26469 */ | |
| 26470 core.String kind; | |
| 26471 /** | |
| 26472 * Name of this user role. This is a required field. Must be less than 256 | |
| 26473 * characters long. If this user role is under a subaccount, the name must be | |
| 26474 * unique among sites of the same subaccount. Otherwise, this user role is a | |
| 26475 * top-level user role, and the name must be unique among top-level user roles | |
| 26476 * of the same account. | |
| 26477 */ | |
| 26478 core.String name; | |
| 26479 /** | |
| 26480 * ID of the user role that this user role is based on or copied from. This is | |
| 26481 * a required field. | |
| 26482 */ | |
| 26483 core.String parentUserRoleId; | |
| 26484 /** List of permissions associated with this user role. */ | |
| 26485 core.List<UserRolePermission> permissions; | |
| 26486 /** | |
| 26487 * Subaccount ID of this user role. This is a read-only field that can be left | |
| 26488 * blank. | |
| 26489 */ | |
| 26490 core.String subaccountId; | |
| 26491 | |
| 26492 UserRole(); | |
| 26493 | |
| 26494 UserRole.fromJson(core.Map _json) { | |
| 26495 if (_json.containsKey("accountId")) { | |
| 26496 accountId = _json["accountId"]; | |
| 26497 } | |
| 26498 if (_json.containsKey("defaultUserRole")) { | |
| 26499 defaultUserRole = _json["defaultUserRole"]; | |
| 26500 } | |
| 26501 if (_json.containsKey("id")) { | |
| 26502 id = _json["id"]; | |
| 26503 } | |
| 26504 if (_json.containsKey("kind")) { | |
| 26505 kind = _json["kind"]; | |
| 26506 } | |
| 26507 if (_json.containsKey("name")) { | |
| 26508 name = _json["name"]; | |
| 26509 } | |
| 26510 if (_json.containsKey("parentUserRoleId")) { | |
| 26511 parentUserRoleId = _json["parentUserRoleId"]; | |
| 26512 } | |
| 26513 if (_json.containsKey("permissions")) { | |
| 26514 permissions = _json["permissions"].map((value) => new UserRolePermission.f
romJson(value)).toList(); | |
| 26515 } | |
| 26516 if (_json.containsKey("subaccountId")) { | |
| 26517 subaccountId = _json["subaccountId"]; | |
| 26518 } | |
| 26519 } | |
| 26520 | |
| 26521 core.Map toJson() { | |
| 26522 var _json = new core.Map(); | |
| 26523 if (accountId != null) { | |
| 26524 _json["accountId"] = accountId; | |
| 26525 } | |
| 26526 if (defaultUserRole != null) { | |
| 26527 _json["defaultUserRole"] = defaultUserRole; | |
| 26528 } | |
| 26529 if (id != null) { | |
| 26530 _json["id"] = id; | |
| 26531 } | |
| 26532 if (kind != null) { | |
| 26533 _json["kind"] = kind; | |
| 26534 } | |
| 26535 if (name != null) { | |
| 26536 _json["name"] = name; | |
| 26537 } | |
| 26538 if (parentUserRoleId != null) { | |
| 26539 _json["parentUserRoleId"] = parentUserRoleId; | |
| 26540 } | |
| 26541 if (permissions != null) { | |
| 26542 _json["permissions"] = permissions.map((value) => (value).toJson()).toList
(); | |
| 26543 } | |
| 26544 if (subaccountId != null) { | |
| 26545 _json["subaccountId"] = subaccountId; | |
| 26546 } | |
| 26547 return _json; | |
| 26548 } | |
| 26549 } | |
| 26550 | |
| 26551 /** Contains properties of a user role permission. */ | |
| 26552 class UserRolePermission { | |
| 26553 /** | |
| 26554 * Levels of availability for a user role permission. | |
| 26555 * Possible string values are: | |
| 26556 * - "ACCOUNT_ALWAYS" | |
| 26557 * - "ACCOUNT_BY_DEFAULT" | |
| 26558 * - "NOT_AVAILABLE_BY_DEFAULT" | |
| 26559 * - "SUBACCOUNT_AND_ACCOUNT_ALWAYS" | |
| 26560 * - "SUBACCOUNT_AND_ACCOUNT_BY_DEFAULT" | |
| 26561 */ | |
| 26562 core.String availability; | |
| 26563 /** ID of this user role permission. */ | |
| 26564 core.String id; | |
| 26565 /** | |
| 26566 * Identifies what kind of resource this is. Value: the fixed string | |
| 26567 * "dfareporting#userRolePermission". | |
| 26568 */ | |
| 26569 core.String kind; | |
| 26570 /** Name of this user role permission. */ | |
| 26571 core.String name; | |
| 26572 /** ID of the permission group that this user role permission belongs to. */ | |
| 26573 core.String permissionGroupId; | |
| 26574 | |
| 26575 UserRolePermission(); | |
| 26576 | |
| 26577 UserRolePermission.fromJson(core.Map _json) { | |
| 26578 if (_json.containsKey("availability")) { | |
| 26579 availability = _json["availability"]; | |
| 26580 } | |
| 26581 if (_json.containsKey("id")) { | |
| 26582 id = _json["id"]; | |
| 26583 } | |
| 26584 if (_json.containsKey("kind")) { | |
| 26585 kind = _json["kind"]; | |
| 26586 } | |
| 26587 if (_json.containsKey("name")) { | |
| 26588 name = _json["name"]; | |
| 26589 } | |
| 26590 if (_json.containsKey("permissionGroupId")) { | |
| 26591 permissionGroupId = _json["permissionGroupId"]; | |
| 26592 } | |
| 26593 } | |
| 26594 | |
| 26595 core.Map toJson() { | |
| 26596 var _json = new core.Map(); | |
| 26597 if (availability != null) { | |
| 26598 _json["availability"] = availability; | |
| 26599 } | |
| 26600 if (id != null) { | |
| 26601 _json["id"] = id; | |
| 26602 } | |
| 26603 if (kind != null) { | |
| 26604 _json["kind"] = kind; | |
| 26605 } | |
| 26606 if (name != null) { | |
| 26607 _json["name"] = name; | |
| 26608 } | |
| 26609 if (permissionGroupId != null) { | |
| 26610 _json["permissionGroupId"] = permissionGroupId; | |
| 26611 } | |
| 26612 return _json; | |
| 26613 } | |
| 26614 } | |
| 26615 | |
| 26616 /** Represents a grouping of related user role permissions. */ | |
| 26617 class UserRolePermissionGroup { | |
| 26618 /** ID of this user role permission. */ | |
| 26619 core.String id; | |
| 26620 /** | |
| 26621 * Identifies what kind of resource this is. Value: the fixed string | |
| 26622 * "dfareporting#userRolePermissionGroup". | |
| 26623 */ | |
| 26624 core.String kind; | |
| 26625 /** Name of this user role permission group. */ | |
| 26626 core.String name; | |
| 26627 | |
| 26628 UserRolePermissionGroup(); | |
| 26629 | |
| 26630 UserRolePermissionGroup.fromJson(core.Map _json) { | |
| 26631 if (_json.containsKey("id")) { | |
| 26632 id = _json["id"]; | |
| 26633 } | |
| 26634 if (_json.containsKey("kind")) { | |
| 26635 kind = _json["kind"]; | |
| 26636 } | |
| 26637 if (_json.containsKey("name")) { | |
| 26638 name = _json["name"]; | |
| 26639 } | |
| 26640 } | |
| 26641 | |
| 26642 core.Map toJson() { | |
| 26643 var _json = new core.Map(); | |
| 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 return _json; | |
| 26654 } | |
| 26655 } | |
| 26656 | |
| 26657 /** User Role Permission Group List Response */ | |
| 26658 class UserRolePermissionGroupsListResponse { | |
| 26659 /** | |
| 26660 * Identifies what kind of resource this is. Value: the fixed string | |
| 26661 * "dfareporting#userRolePermissionGroupsListResponse". | |
| 26662 */ | |
| 26663 core.String kind; | |
| 26664 /** User role permission group collection. */ | |
| 26665 core.List<UserRolePermissionGroup> userRolePermissionGroups; | |
| 26666 | |
| 26667 UserRolePermissionGroupsListResponse(); | |
| 26668 | |
| 26669 UserRolePermissionGroupsListResponse.fromJson(core.Map _json) { | |
| 26670 if (_json.containsKey("kind")) { | |
| 26671 kind = _json["kind"]; | |
| 26672 } | |
| 26673 if (_json.containsKey("userRolePermissionGroups")) { | |
| 26674 userRolePermissionGroups = _json["userRolePermissionGroups"].map((value) =
> new UserRolePermissionGroup.fromJson(value)).toList(); | |
| 26675 } | |
| 26676 } | |
| 26677 | |
| 26678 core.Map toJson() { | |
| 26679 var _json = new core.Map(); | |
| 26680 if (kind != null) { | |
| 26681 _json["kind"] = kind; | |
| 26682 } | |
| 26683 if (userRolePermissionGroups != null) { | |
| 26684 _json["userRolePermissionGroups"] = userRolePermissionGroups.map((value) =
> (value).toJson()).toList(); | |
| 26685 } | |
| 26686 return _json; | |
| 26687 } | |
| 26688 } | |
| 26689 | |
| 26690 /** User Role Permission List Response */ | |
| 26691 class UserRolePermissionsListResponse { | |
| 26692 /** | |
| 26693 * Identifies what kind of resource this is. Value: the fixed string | |
| 26694 * "dfareporting#userRolePermissionsListResponse". | |
| 26695 */ | |
| 26696 core.String kind; | |
| 26697 /** User role permission collection. */ | |
| 26698 core.List<UserRolePermission> userRolePermissions; | |
| 26699 | |
| 26700 UserRolePermissionsListResponse(); | |
| 26701 | |
| 26702 UserRolePermissionsListResponse.fromJson(core.Map _json) { | |
| 26703 if (_json.containsKey("kind")) { | |
| 26704 kind = _json["kind"]; | |
| 26705 } | |
| 26706 if (_json.containsKey("userRolePermissions")) { | |
| 26707 userRolePermissions = _json["userRolePermissions"].map((value) => new User
RolePermission.fromJson(value)).toList(); | |
| 26708 } | |
| 26709 } | |
| 26710 | |
| 26711 core.Map toJson() { | |
| 26712 var _json = new core.Map(); | |
| 26713 if (kind != null) { | |
| 26714 _json["kind"] = kind; | |
| 26715 } | |
| 26716 if (userRolePermissions != null) { | |
| 26717 _json["userRolePermissions"] = userRolePermissions.map((value) => (value).
toJson()).toList(); | |
| 26718 } | |
| 26719 return _json; | |
| 26720 } | |
| 26721 } | |
| 26722 | |
| 26723 /** User Role List Response */ | |
| 26724 class UserRolesListResponse { | |
| 26725 /** | |
| 26726 * Identifies what kind of resource this is. Value: the fixed string | |
| 26727 * "dfareporting#userRolesListResponse". | |
| 26728 */ | |
| 26729 core.String kind; | |
| 26730 /** Pagination token to be used for the next list operation. */ | |
| 26731 core.String nextPageToken; | |
| 26732 /** User role collection. */ | |
| 26733 core.List<UserRole> userRoles; | |
| 26734 | |
| 26735 UserRolesListResponse(); | |
| 26736 | |
| 26737 UserRolesListResponse.fromJson(core.Map _json) { | |
| 26738 if (_json.containsKey("kind")) { | |
| 26739 kind = _json["kind"]; | |
| 26740 } | |
| 26741 if (_json.containsKey("nextPageToken")) { | |
| 26742 nextPageToken = _json["nextPageToken"]; | |
| 26743 } | |
| 26744 if (_json.containsKey("userRoles")) { | |
| 26745 userRoles = _json["userRoles"].map((value) => new UserRole.fromJson(value)
).toList(); | |
| 26746 } | |
| 26747 } | |
| 26748 | |
| 26749 core.Map toJson() { | |
| 26750 var _json = new core.Map(); | |
| 26751 if (kind != null) { | |
| 26752 _json["kind"] = kind; | |
| 26753 } | |
| 26754 if (nextPageToken != null) { | |
| 26755 _json["nextPageToken"] = nextPageToken; | |
| 26756 } | |
| 26757 if (userRoles != null) { | |
| 26758 _json["userRoles"] = userRoles.map((value) => (value).toJson()).toList(); | |
| 26759 } | |
| 26760 return _json; | |
| 26761 } | |
| 26762 } | |
| OLD | NEW |