GoogleCloudRetailV2SearchResponseSearchResult.fromJson constructor

GoogleCloudRetailV2SearchResponseSearchResult.fromJson(
  1. Map json_
)

Implementation

GoogleCloudRetailV2SearchResponseSearchResult.fromJson(core.Map json_)
    : this(
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        matchingVariantCount: json_.containsKey('matchingVariantCount')
            ? json_['matchingVariantCount'] as core.int
            : null,
        matchingVariantFields: json_.containsKey('matchingVariantFields')
            ? (json_['matchingVariantFields']
                    as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        personalLabels: json_.containsKey('personalLabels')
            ? (json_['personalLabels'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        product: json_.containsKey('product')
            ? GoogleCloudRetailV2Product.fromJson(
                json_['product'] as core.Map<core.String, core.dynamic>)
            : null,
        variantRollupValues: json_.containsKey('variantRollupValues')
            ? json_['variantRollupValues']
                as core.Map<core.String, core.dynamic>
            : null,
      );