Creative.fromJson constructor

Creative.fromJson(
  1. Map json_
)

Implementation

Creative.fromJson(core.Map json_)
    : this(
        accountId: json_.containsKey('accountId')
            ? json_['accountId'] as core.String
            : null,
        active:
            json_.containsKey('active') ? json_['active'] as core.bool : null,
        adParameters: json_.containsKey('adParameters')
            ? json_['adParameters'] as core.String
            : null,
        adTagKeys: json_.containsKey('adTagKeys')
            ? (json_['adTagKeys'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        additionalSizes: json_.containsKey('additionalSizes')
            ? (json_['additionalSizes'] as core.List)
                .map((value) => Size.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        advertiserId: json_.containsKey('advertiserId')
            ? json_['advertiserId'] as core.String
            : null,
        allowScriptAccess: json_.containsKey('allowScriptAccess')
            ? json_['allowScriptAccess'] as core.bool
            : null,
        archived: json_.containsKey('archived')
            ? json_['archived'] as core.bool
            : null,
        artworkType: json_.containsKey('artworkType')
            ? json_['artworkType'] as core.String
            : null,
        authoringSource: json_.containsKey('authoringSource')
            ? json_['authoringSource'] as core.String
            : null,
        authoringTool: json_.containsKey('authoringTool')
            ? json_['authoringTool'] as core.String
            : null,
        autoAdvanceImages: json_.containsKey('autoAdvanceImages')
            ? json_['autoAdvanceImages'] as core.bool
            : null,
        backgroundColor: json_.containsKey('backgroundColor')
            ? json_['backgroundColor'] as core.String
            : null,
        backupImageClickThroughUrl:
            json_.containsKey('backupImageClickThroughUrl')
                ? CreativeClickThroughUrl.fromJson(
                    json_['backupImageClickThroughUrl']
                        as core.Map<core.String, core.dynamic>)
                : null,
        backupImageFeatures: json_.containsKey('backupImageFeatures')
            ? (json_['backupImageFeatures'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        backupImageReportingLabel:
            json_.containsKey('backupImageReportingLabel')
                ? json_['backupImageReportingLabel'] as core.String
                : null,
        backupImageTargetWindow: json_.containsKey('backupImageTargetWindow')
            ? TargetWindow.fromJson(json_['backupImageTargetWindow']
                as core.Map<core.String, core.dynamic>)
            : null,
        clickTags: json_.containsKey('clickTags')
            ? (json_['clickTags'] as core.List)
                .map((value) => ClickTag.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        commercialId: json_.containsKey('commercialId')
            ? json_['commercialId'] as core.String
            : null,
        companionCreatives: json_.containsKey('companionCreatives')
            ? (json_['companionCreatives'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        compatibility: json_.containsKey('compatibility')
            ? (json_['compatibility'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        convertFlashToHtml5: json_.containsKey('convertFlashToHtml5')
            ? json_['convertFlashToHtml5'] as core.bool
            : null,
        counterCustomEvents: json_.containsKey('counterCustomEvents')
            ? (json_['counterCustomEvents'] as core.List)
                .map((value) => CreativeCustomEvent.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        creativeAssetSelection: json_.containsKey('creativeAssetSelection')
            ? CreativeAssetSelection.fromJson(json_['creativeAssetSelection']
                as core.Map<core.String, core.dynamic>)
            : null,
        creativeAssets: json_.containsKey('creativeAssets')
            ? (json_['creativeAssets'] as core.List)
                .map((value) => CreativeAsset.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        creativeFieldAssignments:
            json_.containsKey('creativeFieldAssignments')
                ? (json_['creativeFieldAssignments'] as core.List)
                    .map((value) => CreativeFieldAssignment.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                    .toList()
                : null,
        customKeyValues: json_.containsKey('customKeyValues')
            ? (json_['customKeyValues'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        dynamicAssetSelection: json_.containsKey('dynamicAssetSelection')
            ? json_['dynamicAssetSelection'] as core.bool
            : null,
        exitCustomEvents: json_.containsKey('exitCustomEvents')
            ? (json_['exitCustomEvents'] as core.List)
                .map((value) => CreativeCustomEvent.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        fsCommand: json_.containsKey('fsCommand')
            ? FsCommand.fromJson(
                json_['fsCommand'] as core.Map<core.String, core.dynamic>)
            : null,
        htmlCode: json_.containsKey('htmlCode')
            ? json_['htmlCode'] as core.String
            : null,
        htmlCodeLocked: json_.containsKey('htmlCodeLocked')
            ? json_['htmlCodeLocked'] as core.bool
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        idDimensionValue: json_.containsKey('idDimensionValue')
            ? DimensionValue.fromJson(json_['idDimensionValue']
                as core.Map<core.String, core.dynamic>)
            : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        lastModifiedInfo: json_.containsKey('lastModifiedInfo')
            ? LastModifiedInfo.fromJson(json_['lastModifiedInfo']
                as core.Map<core.String, core.dynamic>)
            : null,
        latestTraffickedCreativeId:
            json_.containsKey('latestTraffickedCreativeId')
                ? json_['latestTraffickedCreativeId'] as core.String
                : null,
        mediaDescription: json_.containsKey('mediaDescription')
            ? json_['mediaDescription'] as core.String
            : null,
        mediaDuration: json_.containsKey('mediaDuration')
            ? (json_['mediaDuration'] as core.num).toDouble()
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        obaIcon: json_.containsKey('obaIcon')
            ? ObaIcon.fromJson(
                json_['obaIcon'] as core.Map<core.String, core.dynamic>)
            : null,
        overrideCss: json_.containsKey('overrideCss')
            ? json_['overrideCss'] as core.String
            : null,
        progressOffset: json_.containsKey('progressOffset')
            ? VideoOffset.fromJson(json_['progressOffset']
                as core.Map<core.String, core.dynamic>)
            : null,
        redirectUrl: json_.containsKey('redirectUrl')
            ? json_['redirectUrl'] as core.String
            : null,
        renderingId: json_.containsKey('renderingId')
            ? json_['renderingId'] as core.String
            : null,
        renderingIdDimensionValue:
            json_.containsKey('renderingIdDimensionValue')
                ? DimensionValue.fromJson(json_['renderingIdDimensionValue']
                    as core.Map<core.String, core.dynamic>)
                : null,
        requiredFlashPluginVersion:
            json_.containsKey('requiredFlashPluginVersion')
                ? json_['requiredFlashPluginVersion'] as core.String
                : null,
        requiredFlashVersion: json_.containsKey('requiredFlashVersion')
            ? json_['requiredFlashVersion'] as core.int
            : null,
        size: json_.containsKey('size')
            ? Size.fromJson(
                json_['size'] as core.Map<core.String, core.dynamic>)
            : null,
        skipOffset: json_.containsKey('skipOffset')
            ? VideoOffset.fromJson(
                json_['skipOffset'] as core.Map<core.String, core.dynamic>)
            : null,
        skippable: json_.containsKey('skippable')
            ? json_['skippable'] as core.bool
            : null,
        sslCompliant: json_.containsKey('sslCompliant')
            ? json_['sslCompliant'] as core.bool
            : null,
        sslOverride: json_.containsKey('sslOverride')
            ? json_['sslOverride'] as core.bool
            : null,
        studioAdvertiserId: json_.containsKey('studioAdvertiserId')
            ? json_['studioAdvertiserId'] as core.String
            : null,
        studioCreativeId: json_.containsKey('studioCreativeId')
            ? json_['studioCreativeId'] as core.String
            : null,
        studioTraffickedCreativeId:
            json_.containsKey('studioTraffickedCreativeId')
                ? json_['studioTraffickedCreativeId'] as core.String
                : null,
        subaccountId: json_.containsKey('subaccountId')
            ? json_['subaccountId'] as core.String
            : null,
        thirdPartyBackupImageImpressionsUrl:
            json_.containsKey('thirdPartyBackupImageImpressionsUrl')
                ? json_['thirdPartyBackupImageImpressionsUrl'] as core.String
                : null,
        thirdPartyRichMediaImpressionsUrl:
            json_.containsKey('thirdPartyRichMediaImpressionsUrl')
                ? json_['thirdPartyRichMediaImpressionsUrl'] as core.String
                : null,
        thirdPartyUrls: json_.containsKey('thirdPartyUrls')
            ? (json_['thirdPartyUrls'] as core.List)
                .map((value) => ThirdPartyTrackingUrl.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        timerCustomEvents: json_.containsKey('timerCustomEvents')
            ? (json_['timerCustomEvents'] as core.List)
                .map((value) => CreativeCustomEvent.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        totalFileSize: json_.containsKey('totalFileSize')
            ? json_['totalFileSize'] as core.String
            : null,
        type: json_.containsKey('type') ? json_['type'] as core.String : null,
        universalAdId: json_.containsKey('universalAdId')
            ? UniversalAdId.fromJson(
                json_['universalAdId'] as core.Map<core.String, core.dynamic>)
            : null,
        version: json_.containsKey('version')
            ? json_['version'] as core.int
            : null,
      );