PretargetingConfig.fromJson constructor

PretargetingConfig.fromJson(
  1. Map json_
)

Implementation

PretargetingConfig.fromJson(core.Map json_)
    : this(
        allowedUserTargetingModes:
            json_.containsKey('allowedUserTargetingModes')
                ? (json_['allowedUserTargetingModes'] as core.List)
                    .map((value) => value as core.String)
                    .toList()
                : null,
        appTargeting: json_.containsKey('appTargeting')
            ? AppTargeting.fromJson(
                json_['appTargeting'] as core.Map<core.String, core.dynamic>)
            : null,
        billingId: json_.containsKey('billingId')
            ? json_['billingId'] as core.String
            : null,
        displayName: json_.containsKey('displayName')
            ? json_['displayName'] as core.String
            : null,
        excludedContentLabelIds: json_.containsKey('excludedContentLabelIds')
            ? (json_['excludedContentLabelIds'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        geoTargeting: json_.containsKey('geoTargeting')
            ? NumericTargetingDimension.fromJson(
                json_['geoTargeting'] as core.Map<core.String, core.dynamic>)
            : null,
        includedCreativeDimensions:
            json_.containsKey('includedCreativeDimensions')
                ? (json_['includedCreativeDimensions'] as core.List)
                    .map((value) => CreativeDimensions.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                    .toList()
                : null,
        includedEnvironments: json_.containsKey('includedEnvironments')
            ? (json_['includedEnvironments'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        includedFormats: json_.containsKey('includedFormats')
            ? (json_['includedFormats'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        includedLanguages: json_.containsKey('includedLanguages')
            ? (json_['includedLanguages'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        includedMobileOperatingSystemIds:
            json_.containsKey('includedMobileOperatingSystemIds')
                ? (json_['includedMobileOperatingSystemIds'] as core.List)
                    .map((value) => value as core.String)
                    .toList()
                : null,
        includedPlatforms: json_.containsKey('includedPlatforms')
            ? (json_['includedPlatforms'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        includedUserIdTypes: json_.containsKey('includedUserIdTypes')
            ? (json_['includedUserIdTypes'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        interstitialTargeting: json_.containsKey('interstitialTargeting')
            ? json_['interstitialTargeting'] as core.String
            : null,
        invalidGeoIds: json_.containsKey('invalidGeoIds')
            ? (json_['invalidGeoIds'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        maximumQps: json_.containsKey('maximumQps')
            ? json_['maximumQps'] as core.String
            : null,
        minimumViewabilityDecile:
            json_.containsKey('minimumViewabilityDecile')
                ? json_['minimumViewabilityDecile'] as core.int
                : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        publisherTargeting: json_.containsKey('publisherTargeting')
            ? StringTargetingDimension.fromJson(json_['publisherTargeting']
                as core.Map<core.String, core.dynamic>)
            : null,
        state:
            json_.containsKey('state') ? json_['state'] as core.String : null,
        userListTargeting: json_.containsKey('userListTargeting')
            ? NumericTargetingDimension.fromJson(json_['userListTargeting']
                as core.Map<core.String, core.dynamic>)
            : null,
        verticalTargeting: json_.containsKey('verticalTargeting')
            ? NumericTargetingDimension.fromJson(json_['verticalTargeting']
                as core.Map<core.String, core.dynamic>)
            : null,
        webTargeting: json_.containsKey('webTargeting')
            ? StringTargetingDimension.fromJson(
                json_['webTargeting'] as core.Map<core.String, core.dynamic>)
            : null,
      );