GoogleCloudRecommendationengineV1beta1CatalogItem.fromJson constructor

GoogleCloudRecommendationengineV1beta1CatalogItem.fromJson(
  1. Map _json
)

Implementation

GoogleCloudRecommendationengineV1beta1CatalogItem.fromJson(core.Map _json)
    : this(
        categoryHierarchies: _json.containsKey('categoryHierarchies')
            ? (_json['categoryHierarchies'] as core.List)
                .map((value) =>
                    GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy
                        .fromJson(
                            value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        description: _json.containsKey('description')
            ? _json['description'] as core.String
            : 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,
        itemGroupId: _json.containsKey('itemGroupId')
            ? _json['itemGroupId'] as core.String
            : null,
        languageCode: _json.containsKey('languageCode')
            ? _json['languageCode'] as core.String
            : null,
        productMetadata: _json.containsKey('productMetadata')
            ? GoogleCloudRecommendationengineV1beta1ProductCatalogItem
                .fromJson(_json['productMetadata']
                    as core.Map<core.String, core.dynamic>)
            : null,
        tags: _json.containsKey('tags')
            ? (_json['tags'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        title:
            _json.containsKey('title') ? _json['title'] as core.String : null,
      );