Campaign.fromJson constructor

Campaign.fromJson(
  1. Map json_
)

Implementation

Campaign.fromJson(core.Map json_)
    : this(
        accountId: json_.containsKey('accountId')
            ? json_['accountId'] as core.String
            : null,
        adBlockingConfiguration: json_.containsKey('adBlockingConfiguration')
            ? AdBlockingConfiguration.fromJson(
                json_['adBlockingConfiguration']
                    as core.Map<core.String, core.dynamic>)
            : null,
        additionalCreativeOptimizationConfigurations: json_
                .containsKey('additionalCreativeOptimizationConfigurations')
            ? (json_['additionalCreativeOptimizationConfigurations']
                    as core.List)
                .map((value) => CreativeOptimizationConfiguration.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        advertiserGroupId: json_.containsKey('advertiserGroupId')
            ? json_['advertiserGroupId'] as core.String
            : null,
        advertiserId: json_.containsKey('advertiserId')
            ? json_['advertiserId'] as core.String
            : null,
        advertiserIdDimensionValue:
            json_.containsKey('advertiserIdDimensionValue')
                ? DimensionValue.fromJson(json_['advertiserIdDimensionValue']
                    as core.Map<core.String, core.dynamic>)
                : null,
        archived: json_.containsKey('archived')
            ? json_['archived'] as core.bool
            : null,
        audienceSegmentGroups: json_.containsKey('audienceSegmentGroups')
            ? (json_['audienceSegmentGroups'] as core.List)
                .map((value) => AudienceSegmentGroup.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        billingInvoiceCode: json_.containsKey('billingInvoiceCode')
            ? json_['billingInvoiceCode'] as core.String
            : null,
        clickThroughUrlSuffixProperties:
            json_.containsKey('clickThroughUrlSuffixProperties')
                ? ClickThroughUrlSuffixProperties.fromJson(
                    json_['clickThroughUrlSuffixProperties']
                        as core.Map<core.String, core.dynamic>)
                : null,
        comment: json_.containsKey('comment')
            ? json_['comment'] as core.String
            : null,
        createInfo: json_.containsKey('createInfo')
            ? LastModifiedInfo.fromJson(
                json_['createInfo'] as core.Map<core.String, core.dynamic>)
            : null,
        creativeGroupIds: json_.containsKey('creativeGroupIds')
            ? (json_['creativeGroupIds'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        creativeOptimizationConfiguration:
            json_.containsKey('creativeOptimizationConfiguration')
                ? CreativeOptimizationConfiguration.fromJson(
                    json_['creativeOptimizationConfiguration']
                        as core.Map<core.String, core.dynamic>)
                : null,
        defaultClickThroughEventTagProperties:
            json_.containsKey('defaultClickThroughEventTagProperties')
                ? DefaultClickThroughEventTagProperties.fromJson(
                    json_['defaultClickThroughEventTagProperties']
                        as core.Map<core.String, core.dynamic>)
                : null,
        defaultLandingPageId: json_.containsKey('defaultLandingPageId')
            ? json_['defaultLandingPageId'] as core.String
            : null,
        endDate: json_.containsKey('endDate')
            ? core.DateTime.parse(json_['endDate'] as core.String)
            : null,
        eventTagOverrides: json_.containsKey('eventTagOverrides')
            ? (json_['eventTagOverrides'] as core.List)
                .map((value) => EventTagOverride.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        externalId: json_.containsKey('externalId')
            ? json_['externalId'] as core.String
            : 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,
        measurementPartnerLink: json_.containsKey('measurementPartnerLink')
            ? MeasurementPartnerCampaignLink.fromJson(
                json_['measurementPartnerLink']
                    as core.Map<core.String, core.dynamic>)
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        startDate: json_.containsKey('startDate')
            ? core.DateTime.parse(json_['startDate'] as core.String)
            : null,
        subaccountId: json_.containsKey('subaccountId')
            ? json_['subaccountId'] as core.String
            : null,
      );