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,
        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,
        creativeFormat: json_.containsKey('creativeFormat')
            ? json_['creativeFormat'] as core.String
            : null,
        creativeId: json_.containsKey('creativeId')
            ? json_['creativeId'] as core.String
            : null,
        creativeServingDecision: json_.containsKey('creativeServingDecision')
            ? CreativeServingDecision.fromJson(
                json_['creativeServingDecision']
                    as core.Map<core.String, core.dynamic>)
            : null,
        dealIds: json_.containsKey('dealIds')
            ? (json_['dealIds'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        declaredAttributes: json_.containsKey('declaredAttributes')
            ? (json_['declaredAttributes'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        declaredClickThroughUrls:
            json_.containsKey('declaredClickThroughUrls')
                ? (json_['declaredClickThroughUrls'] as core.List)
                    .map((value) => value as core.String)
                    .toList()
                : null,
        declaredRestrictedCategories:
            json_.containsKey('declaredRestrictedCategories')
                ? (json_['declaredRestrictedCategories'] as core.List)
                    .map((value) => value as core.String)
                    .toList()
                : null,
        declaredVendorIds: json_.containsKey('declaredVendorIds')
            ? (json_['declaredVendorIds'] as core.List)
                .map((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((value) => value as core.String)
                .toList()
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        native: json_.containsKey('native')
            ? NativeContent.fromJson(
                json_['native'] as core.Map<core.String, core.dynamic>)
            : null,
        renderUrl: json_.containsKey('renderUrl')
            ? json_['renderUrl'] as core.String
            : null,
        restrictedCategories: json_.containsKey('restrictedCategories')
            ? (json_['restrictedCategories'] as core.List)
                .map((value) => value as core.String)
                .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,
      );