GoogleCloudRecommendationengineV1beta1ProductEventDetail.fromJson constructor

GoogleCloudRecommendationengineV1beta1ProductEventDetail.fromJson(
  1. Map _json
)

Implementation

GoogleCloudRecommendationengineV1beta1ProductEventDetail.fromJson(
    core.Map _json)
    : this(
        cartId: _json.containsKey('cartId')
            ? _json['cartId'] as core.String
            : null,
        listId: _json.containsKey('listId')
            ? _json['listId'] as core.String
            : null,
        pageCategories: _json.containsKey('pageCategories')
            ? (_json['pageCategories'] as core.List)
                .map((value) =>
                    GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy
                        .fromJson(
                            value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        productDetails: _json.containsKey('productDetails')
            ? (_json['productDetails'] as core.List)
                .map((value) =>
                    GoogleCloudRecommendationengineV1beta1ProductDetail
                        .fromJson(
                            value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        purchaseTransaction: _json.containsKey('purchaseTransaction')
            ? GoogleCloudRecommendationengineV1beta1PurchaseTransaction
                .fromJson(_json['purchaseTransaction']
                    as core.Map<core.String, core.dynamic>)
            : null,
        searchQuery: _json.containsKey('searchQuery')
            ? _json['searchQuery'] as core.String
            : null,
      );