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,
        adChoicesDestinationUrl: _json.containsKey('adChoicesDestinationUrl')
            ? _json['adChoicesDestinationUrl'] as core.String
            : null,
        adTechnologyProviders: _json.containsKey('adTechnologyProviders')
            ? AdTechnologyProviders.fromJson(_json['adTechnologyProviders']
                as core.Map<core.String, core.dynamic>)
            : null,
        advertiserName: _json.containsKey('advertiserName')
            ? _json['advertiserName'] as core.String
            : null,
        agencyId: _json.containsKey('agencyId')
            ? _json['agencyId'] as core.String
            : null,
        apiUpdateTime: _json.containsKey('apiUpdateTime')
            ? _json['apiUpdateTime'] as core.String
            : null,
        attributes: _json.containsKey('attributes')
            ? (_json['attributes'] as core.List)
                .map<core.String>((value) => value as core.String)
                .toList()
            : null,
        clickThroughUrls: _json.containsKey('clickThroughUrls')
            ? (_json['clickThroughUrls'] as core.List)
                .map<core.String>((value) => value as core.String)
                .toList()
            : null,
        corrections: _json.containsKey('corrections')
            ? (_json['corrections'] as core.List)
                .map<Correction>((value) => Correction.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        creativeId: _json.containsKey('creativeId')
            ? _json['creativeId'] as core.String
            : null,
        dealsStatus: _json.containsKey('dealsStatus')
            ? _json['dealsStatus'] as core.String
            : null,
        declaredClickThroughUrls:
            _json.containsKey('declaredClickThroughUrls')
                ? (_json['declaredClickThroughUrls'] as core.List)
                    .map<core.String>((value) => value as core.String)
                    .toList()
                : null,
        detectedAdvertiserIds: _json.containsKey('detectedAdvertiserIds')
            ? (_json['detectedAdvertiserIds'] as core.List)
                .map<core.String>((value) => value as core.String)
                .toList()
            : null,
        detectedDomains: _json.containsKey('detectedDomains')
            ? (_json['detectedDomains'] as core.List)
                .map<core.String>((value) => value as core.String)
                .toList()
            : null,
        detectedLanguages: _json.containsKey('detectedLanguages')
            ? (_json['detectedLanguages'] as core.List)
                .map<core.String>((value) => value as core.String)
                .toList()
            : null,
        detectedProductCategories:
            _json.containsKey('detectedProductCategories')
                ? (_json['detectedProductCategories'] as core.List)
                    .map<core.int>((value) => value as core.int)
                    .toList()
                : null,
        detectedSensitiveCategories:
            _json.containsKey('detectedSensitiveCategories')
                ? (_json['detectedSensitiveCategories'] as core.List)
                    .map<core.int>((value) => value as core.int)
                    .toList()
                : null,
        html: _json.containsKey('html')
            ? HtmlContent.fromJson(
                _json['html'] as core.Map<core.String, core.dynamic>)
            : null,
        impressionTrackingUrls: _json.containsKey('impressionTrackingUrls')
            ? (_json['impressionTrackingUrls'] as core.List)
                .map<core.String>((value) => value as core.String)
                .toList()
            : null,
        native: _json.containsKey('native')
            ? NativeContent.fromJson(
                _json['native'] as core.Map<core.String, core.dynamic>)
            : null,
        openAuctionStatus: _json.containsKey('openAuctionStatus')
            ? _json['openAuctionStatus'] as core.String
            : null,
        restrictedCategories: _json.containsKey('restrictedCategories')
            ? (_json['restrictedCategories'] as core.List)
                .map<core.String>((value) => value as core.String)
                .toList()
            : null,
        servingRestrictions: _json.containsKey('servingRestrictions')
            ? (_json['servingRestrictions'] as core.List)
                .map<ServingRestriction>((value) =>
                    ServingRestriction.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        vendorIds: _json.containsKey('vendorIds')
            ? (_json['vendorIds'] as core.List)
                .map<core.int>((value) => value as core.int)
                .toList()
            : null,
        version: _json.containsKey('version')
            ? _json['version'] as core.int
            : null,
        video: _json.containsKey('video')
            ? VideoContent.fromJson(
                _json['video'] as core.Map<core.String, core.dynamic>)
            : null,
      );