GoogleCloudRecommendationengineV1beta1ProductCatalogItem.fromJson constructor

GoogleCloudRecommendationengineV1beta1ProductCatalogItem.fromJson(
  1. Map json_
)

Implementation

GoogleCloudRecommendationengineV1beta1ProductCatalogItem.fromJson(
    core.Map json_)
    : this(
        availableQuantity: json_.containsKey('availableQuantity')
            ? json_['availableQuantity'] as core.String
            : null,
        canonicalProductUri: json_.containsKey('canonicalProductUri')
            ? json_['canonicalProductUri'] as core.String
            : null,
        costs: json_.containsKey('costs')
            ? (json_['costs'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  (value as core.num).toDouble(),
                ),
              )
            : null,
        currencyCode: json_.containsKey('currencyCode')
            ? json_['currencyCode'] as core.String
            : null,
        exactPrice: json_.containsKey('exactPrice')
            ? GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice
                .fromJson(json_['exactPrice']
                    as core.Map<core.String, core.dynamic>)
            : null,
        images: json_.containsKey('images')
            ? (json_['images'] as core.List)
                .map((value) =>
                    GoogleCloudRecommendationengineV1beta1Image.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        priceRange: json_.containsKey('priceRange')
            ? GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange
                .fromJson(json_['priceRange']
                    as core.Map<core.String, core.dynamic>)
            : null,
        stockState: json_.containsKey('stockState')
            ? json_['stockState'] as core.String
            : null,
      );