HistoryRecord.fromJson constructor

HistoryRecord.fromJson(
  1. Map json_
)

Implementation

HistoryRecord.fromJson(core.Map json_)
    : this(
        collectionPeriods: json_.containsKey('collectionPeriods')
            ? (json_['collectionPeriods'] as core.List)
                .map((value) => CollectionPeriod.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        key: json_.containsKey('key')
            ? HistoryKey.fromJson(
                json_['key'] as core.Map<core.String, core.dynamic>)
            : null,
        metrics: json_.containsKey('metrics')
            ? (json_['metrics'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  MetricTimeseries.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
      );