Product.fromJson constructor

Product.fromJson(
  1. Map json_
)

Implementation

Product.fromJson(core.Map json_)
    : this(
        additionalImageLinks: json_.containsKey('additionalImageLinks')
            ? (json_['additionalImageLinks'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        additionalSizeType: json_.containsKey('additionalSizeType')
            ? json_['additionalSizeType'] as core.String
            : null,
        adsGrouping: json_.containsKey('adsGrouping')
            ? json_['adsGrouping'] as core.String
            : null,
        adsLabels: json_.containsKey('adsLabels')
            ? (json_['adsLabels'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        adsRedirect: json_.containsKey('adsRedirect')
            ? json_['adsRedirect'] as core.String
            : null,
        adult:
            json_.containsKey('adult') ? json_['adult'] as core.bool : null,
        ageGroup: json_.containsKey('ageGroup')
            ? json_['ageGroup'] as core.String
            : null,
        autoPricingMinPrice: json_.containsKey('autoPricingMinPrice')
            ? Price.fromJson(json_['autoPricingMinPrice']
                as core.Map<core.String, core.dynamic>)
            : null,
        availability: json_.containsKey('availability')
            ? json_['availability'] as core.String
            : null,
        availabilityDate: json_.containsKey('availabilityDate')
            ? json_['availabilityDate'] as core.String
            : null,
        brand:
            json_.containsKey('brand') ? json_['brand'] as core.String : null,
        canonicalLink: json_.containsKey('canonicalLink')
            ? json_['canonicalLink'] as core.String
            : null,
        certifications: json_.containsKey('certifications')
            ? (json_['certifications'] as core.List)
                .map((value) => ProductCertification.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        channel: json_.containsKey('channel')
            ? json_['channel'] as core.String
            : null,
        cloudExportAdditionalProperties:
            json_.containsKey('cloudExportAdditionalProperties')
                ? (json_['cloudExportAdditionalProperties'] as core.List)
                    .map((value) => CloudExportAdditionalProperties.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                    .toList()
                : null,
        color:
            json_.containsKey('color') ? json_['color'] as core.String : null,
        condition: json_.containsKey('condition')
            ? json_['condition'] as core.String
            : null,
        contentLanguage: json_.containsKey('contentLanguage')
            ? json_['contentLanguage'] as core.String
            : null,
        costOfGoodsSold: json_.containsKey('costOfGoodsSold')
            ? Price.fromJson(json_['costOfGoodsSold']
                as core.Map<core.String, core.dynamic>)
            : null,
        customAttributes: json_.containsKey('customAttributes')
            ? (json_['customAttributes'] as core.List)
                .map((value) => CustomAttribute.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        customLabel0: json_.containsKey('customLabel0')
            ? json_['customLabel0'] as core.String
            : null,
        customLabel1: json_.containsKey('customLabel1')
            ? json_['customLabel1'] as core.String
            : null,
        customLabel2: json_.containsKey('customLabel2')
            ? json_['customLabel2'] as core.String
            : null,
        customLabel3: json_.containsKey('customLabel3')
            ? json_['customLabel3'] as core.String
            : null,
        customLabel4: json_.containsKey('customLabel4')
            ? json_['customLabel4'] as core.String
            : null,
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        disclosureDate: json_.containsKey('disclosureDate')
            ? json_['disclosureDate'] as core.String
            : null,
        displayAdsId: json_.containsKey('displayAdsId')
            ? json_['displayAdsId'] as core.String
            : null,
        displayAdsLink: json_.containsKey('displayAdsLink')
            ? json_['displayAdsLink'] as core.String
            : null,
        displayAdsSimilarIds: json_.containsKey('displayAdsSimilarIds')
            ? (json_['displayAdsSimilarIds'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        displayAdsTitle: json_.containsKey('displayAdsTitle')
            ? json_['displayAdsTitle'] as core.String
            : null,
        displayAdsValue: json_.containsKey('displayAdsValue')
            ? (json_['displayAdsValue'] as core.num).toDouble()
            : null,
        energyEfficiencyClass: json_.containsKey('energyEfficiencyClass')
            ? json_['energyEfficiencyClass'] as core.String
            : null,
        excludedDestinations: json_.containsKey('excludedDestinations')
            ? (json_['excludedDestinations'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        expirationDate: json_.containsKey('expirationDate')
            ? json_['expirationDate'] as core.String
            : null,
        externalSellerId: json_.containsKey('externalSellerId')
            ? json_['externalSellerId'] as core.String
            : null,
        feedLabel: json_.containsKey('feedLabel')
            ? json_['feedLabel'] as core.String
            : null,
        freeShippingThreshold: json_.containsKey('freeShippingThreshold')
            ? (json_['freeShippingThreshold'] as core.List)
                .map((value) => FreeShippingThreshold.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        gender: json_.containsKey('gender')
            ? json_['gender'] as core.String
            : null,
        googleProductCategory: json_.containsKey('googleProductCategory')
            ? json_['googleProductCategory'] as core.String
            : null,
        gtin: json_.containsKey('gtin') ? json_['gtin'] as core.String : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        identifierExists: json_.containsKey('identifierExists')
            ? json_['identifierExists'] as core.bool
            : null,
        imageLink: json_.containsKey('imageLink')
            ? json_['imageLink'] as core.String
            : null,
        includedDestinations: json_.containsKey('includedDestinations')
            ? (json_['includedDestinations'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        installment: json_.containsKey('installment')
            ? Installment.fromJson(
                json_['installment'] as core.Map<core.String, core.dynamic>)
            : null,
        isBundle: json_.containsKey('isBundle')
            ? json_['isBundle'] as core.bool
            : null,
        itemGroupId: json_.containsKey('itemGroupId')
            ? json_['itemGroupId'] as core.String
            : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        lifestyleImageLinks: json_.containsKey('lifestyleImageLinks')
            ? (json_['lifestyleImageLinks'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        link: json_.containsKey('link') ? json_['link'] as core.String : null,
        linkTemplate: json_.containsKey('linkTemplate')
            ? json_['linkTemplate'] as core.String
            : null,
        loyaltyProgram: json_.containsKey('loyaltyProgram')
            ? LoyaltyProgram.fromJson(json_['loyaltyProgram']
                as core.Map<core.String, core.dynamic>)
            : null,
        loyaltyPrograms: json_.containsKey('loyaltyPrograms')
            ? (json_['loyaltyPrograms'] as core.List)
                .map((value) => LoyaltyProgram.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        material: json_.containsKey('material')
            ? json_['material'] as core.String
            : null,
        maxEnergyEfficiencyClass:
            json_.containsKey('maxEnergyEfficiencyClass')
                ? json_['maxEnergyEfficiencyClass'] as core.String
                : null,
        maxHandlingTime: json_.containsKey('maxHandlingTime')
            ? json_['maxHandlingTime'] as core.String
            : null,
        minEnergyEfficiencyClass:
            json_.containsKey('minEnergyEfficiencyClass')
                ? json_['minEnergyEfficiencyClass'] as core.String
                : null,
        minHandlingTime: json_.containsKey('minHandlingTime')
            ? json_['minHandlingTime'] as core.String
            : null,
        mobileLink: json_.containsKey('mobileLink')
            ? json_['mobileLink'] as core.String
            : null,
        mobileLinkTemplate: json_.containsKey('mobileLinkTemplate')
            ? json_['mobileLinkTemplate'] as core.String
            : null,
        mpn: json_.containsKey('mpn') ? json_['mpn'] as core.String : null,
        multipack: json_.containsKey('multipack')
            ? json_['multipack'] as core.String
            : null,
        offerId: json_.containsKey('offerId')
            ? json_['offerId'] as core.String
            : null,
        pattern: json_.containsKey('pattern')
            ? json_['pattern'] as core.String
            : null,
        pause:
            json_.containsKey('pause') ? json_['pause'] as core.String : null,
        pickupMethod: json_.containsKey('pickupMethod')
            ? json_['pickupMethod'] as core.String
            : null,
        pickupSla: json_.containsKey('pickupSla')
            ? json_['pickupSla'] as core.String
            : null,
        price: json_.containsKey('price')
            ? Price.fromJson(
                json_['price'] as core.Map<core.String, core.dynamic>)
            : null,
        productDetails: json_.containsKey('productDetails')
            ? (json_['productDetails'] as core.List)
                .map((value) => ProductProductDetail.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        productHeight: json_.containsKey('productHeight')
            ? ProductDimension.fromJson(
                json_['productHeight'] as core.Map<core.String, core.dynamic>)
            : null,
        productHighlights: json_.containsKey('productHighlights')
            ? (json_['productHighlights'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        productLength: json_.containsKey('productLength')
            ? ProductDimension.fromJson(
                json_['productLength'] as core.Map<core.String, core.dynamic>)
            : null,
        productTypes: json_.containsKey('productTypes')
            ? (json_['productTypes'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        productWeight: json_.containsKey('productWeight')
            ? ProductWeight.fromJson(
                json_['productWeight'] as core.Map<core.String, core.dynamic>)
            : null,
        productWidth: json_.containsKey('productWidth')
            ? ProductDimension.fromJson(
                json_['productWidth'] as core.Map<core.String, core.dynamic>)
            : null,
        promotionIds: json_.containsKey('promotionIds')
            ? (json_['promotionIds'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        salePrice: json_.containsKey('salePrice')
            ? Price.fromJson(
                json_['salePrice'] as core.Map<core.String, core.dynamic>)
            : null,
        salePriceEffectiveDate: json_.containsKey('salePriceEffectiveDate')
            ? json_['salePriceEffectiveDate'] as core.String
            : null,
        sellOnGoogleQuantity: json_.containsKey('sellOnGoogleQuantity')
            ? json_['sellOnGoogleQuantity'] as core.String
            : null,
        shipping: json_.containsKey('shipping')
            ? (json_['shipping'] as core.List)
                .map((value) => ProductShipping.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        shippingHeight: json_.containsKey('shippingHeight')
            ? ProductShippingDimension.fromJson(json_['shippingHeight']
                as core.Map<core.String, core.dynamic>)
            : null,
        shippingLabel: json_.containsKey('shippingLabel')
            ? json_['shippingLabel'] as core.String
            : null,
        shippingLength: json_.containsKey('shippingLength')
            ? ProductShippingDimension.fromJson(json_['shippingLength']
                as core.Map<core.String, core.dynamic>)
            : null,
        shippingWeight: json_.containsKey('shippingWeight')
            ? ProductShippingWeight.fromJson(json_['shippingWeight']
                as core.Map<core.String, core.dynamic>)
            : null,
        shippingWidth: json_.containsKey('shippingWidth')
            ? ProductShippingDimension.fromJson(
                json_['shippingWidth'] as core.Map<core.String, core.dynamic>)
            : null,
        shoppingAdsExcludedCountries:
            json_.containsKey('shoppingAdsExcludedCountries')
                ? (json_['shoppingAdsExcludedCountries'] as core.List)
                    .map((value) => value as core.String)
                    .toList()
                : null,
        sizeSystem: json_.containsKey('sizeSystem')
            ? json_['sizeSystem'] as core.String
            : null,
        sizeType: json_.containsKey('sizeType')
            ? json_['sizeType'] as core.String
            : null,
        sizes: json_.containsKey('sizes')
            ? (json_['sizes'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        source: json_.containsKey('source')
            ? json_['source'] as core.String
            : null,
        structuredDescription: json_.containsKey('structuredDescription')
            ? ProductStructuredDescription.fromJson(
                json_['structuredDescription']
                    as core.Map<core.String, core.dynamic>)
            : null,
        structuredTitle: json_.containsKey('structuredTitle')
            ? ProductStructuredTitle.fromJson(json_['structuredTitle']
                as core.Map<core.String, core.dynamic>)
            : null,
        subscriptionCost: json_.containsKey('subscriptionCost')
            ? ProductSubscriptionCost.fromJson(json_['subscriptionCost']
                as core.Map<core.String, core.dynamic>)
            : null,
        targetCountry: json_.containsKey('targetCountry')
            ? json_['targetCountry'] as core.String
            : null,
        taxCategory: json_.containsKey('taxCategory')
            ? json_['taxCategory'] as core.String
            : null,
        taxes: json_.containsKey('taxes')
            ? (json_['taxes'] as core.List)
                .map((value) => ProductTax.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        title:
            json_.containsKey('title') ? json_['title'] as core.String : null,
        transitTimeLabel: json_.containsKey('transitTimeLabel')
            ? json_['transitTimeLabel'] as core.String
            : null,
        unitPricingBaseMeasure: json_.containsKey('unitPricingBaseMeasure')
            ? ProductUnitPricingBaseMeasure.fromJson(
                json_['unitPricingBaseMeasure']
                    as core.Map<core.String, core.dynamic>)
            : null,
        unitPricingMeasure: json_.containsKey('unitPricingMeasure')
            ? ProductUnitPricingMeasure.fromJson(json_['unitPricingMeasure']
                as core.Map<core.String, core.dynamic>)
            : null,
        virtualModelLink: json_.containsKey('virtualModelLink')
            ? json_['virtualModelLink'] as core.String
            : null,
      );