ProductView.fromJson constructor

ProductView.fromJson(
  1. Map json_
)

Implementation

ProductView.fromJson(core.Map json_)
    : this(
        aggregatedDestinationStatus:
            json_.containsKey('aggregatedDestinationStatus')
                ? json_['aggregatedDestinationStatus'] as core.String
                : null,
        availability: json_.containsKey('availability')
            ? json_['availability'] as core.String
            : null,
        brand:
            json_.containsKey('brand') ? json_['brand'] as core.String : null,
        categoryL1: json_.containsKey('categoryL1')
            ? json_['categoryL1'] as core.String
            : null,
        categoryL2: json_.containsKey('categoryL2')
            ? json_['categoryL2'] as core.String
            : null,
        categoryL3: json_.containsKey('categoryL3')
            ? json_['categoryL3'] as core.String
            : null,
        categoryL4: json_.containsKey('categoryL4')
            ? json_['categoryL4'] as core.String
            : null,
        categoryL5: json_.containsKey('categoryL5')
            ? json_['categoryL5'] as core.String
            : null,
        channel: json_.containsKey('channel')
            ? json_['channel'] as core.String
            : null,
        clickPotential: json_.containsKey('clickPotential')
            ? json_['clickPotential'] as core.String
            : null,
        clickPotentialRank: json_.containsKey('clickPotentialRank')
            ? json_['clickPotentialRank'] as core.String
            : null,
        condition: json_.containsKey('condition')
            ? json_['condition'] as core.String
            : null,
        creationTime: json_.containsKey('creationTime')
            ? json_['creationTime'] as core.String
            : null,
        currencyCode: json_.containsKey('currencyCode')
            ? json_['currencyCode'] as core.String
            : null,
        expirationDate: json_.containsKey('expirationDate')
            ? Date.fromJson(json_['expirationDate']
                as core.Map<core.String, core.dynamic>)
            : null,
        gtin: json_.containsKey('gtin')
            ? (json_['gtin'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        itemGroupId: json_.containsKey('itemGroupId')
            ? json_['itemGroupId'] as core.String
            : null,
        itemIssues: json_.containsKey('itemIssues')
            ? (json_['itemIssues'] as core.List)
                .map((value) => ProductViewItemIssue.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        languageCode: json_.containsKey('languageCode')
            ? json_['languageCode'] as core.String
            : null,
        offerId: json_.containsKey('offerId')
            ? json_['offerId'] as core.String
            : null,
        priceMicros: json_.containsKey('priceMicros')
            ? json_['priceMicros'] as core.String
            : null,
        productTypeL1: json_.containsKey('productTypeL1')
            ? json_['productTypeL1'] as core.String
            : null,
        productTypeL2: json_.containsKey('productTypeL2')
            ? json_['productTypeL2'] as core.String
            : null,
        productTypeL3: json_.containsKey('productTypeL3')
            ? json_['productTypeL3'] as core.String
            : null,
        productTypeL4: json_.containsKey('productTypeL4')
            ? json_['productTypeL4'] as core.String
            : null,
        productTypeL5: json_.containsKey('productTypeL5')
            ? json_['productTypeL5'] as core.String
            : null,
        shippingLabel: json_.containsKey('shippingLabel')
            ? json_['shippingLabel'] as core.String
            : null,
        title:
            json_.containsKey('title') ? json_['title'] as core.String : null,
      );