GoogleCloudRecommendationengineV1beta1ProductDetail.fromJson constructor

GoogleCloudRecommendationengineV1beta1ProductDetail.fromJson(
  1. Map _json
)

Implementation

GoogleCloudRecommendationengineV1beta1ProductDetail.fromJson(core.Map _json)
    : this(
        availableQuantity: _json.containsKey('availableQuantity')
            ? _json['availableQuantity'] as core.int
            : null,
        currencyCode: _json.containsKey('currencyCode')
            ? _json['currencyCode'] as core.String
            : null,
        displayPrice: _json.containsKey('displayPrice')
            ? (_json['displayPrice'] as core.num).toDouble()
            : null,
        id: _json.containsKey('id') ? _json['id'] as core.String : null,
        itemAttributes: _json.containsKey('itemAttributes')
            ? GoogleCloudRecommendationengineV1beta1FeatureMap.fromJson(
                _json['itemAttributes']
                    as core.Map<core.String, core.dynamic>)
            : null,
        originalPrice: _json.containsKey('originalPrice')
            ? (_json['originalPrice'] as core.num).toDouble()
            : null,
        quantity: _json.containsKey('quantity')
            ? _json['quantity'] as core.int
            : null,
        stockState: _json.containsKey('stockState')
            ? _json['stockState'] as core.String
            : null,
      );