AggregationResult.fromJson constructor

AggregationResult.fromJson(
  1. Map json_
)

Implementation

AggregationResult.fromJson(core.Map json_)
    : this(
        count: json_.containsKey('count')
            ? AggregationResultCount.fromJson(
                json_['count'] as core.Map<core.String, core.dynamic>)
            : null,
        field:
            json_.containsKey('field') ? json_['field'] as core.String : null,
        frequency: json_.containsKey('frequency')
            ? AggregationResultFrequency.fromJson(
                json_['frequency'] as core.Map<core.String, core.dynamic>)
            : null,
        histogram: json_.containsKey('histogram')
            ? AggregationResultHistogram.fromJson(
                json_['histogram'] as core.Map<core.String, core.dynamic>)
            : null,
        sum: json_.containsKey('sum')
            ? AggregationResultSum.fromJson(
                json_['sum'] as core.Map<core.String, core.dynamic>)
            : null,
      );