Metric.fromJson constructor
Metric.fromJson(
- Map json_
Implementation
Metric.fromJson(core.Map json_)
: this(
aggregation: json_.containsKey('aggregation')
? json_['aggregation'] as core.String
: null,
category: json_.containsKey('category')
? LocalizedString.fromJson(
json_['category'] as core.Map<core.String, core.dynamic>)
: null,
derived: json_.containsKey('derived')
? DerivedMetric.fromJson(
json_['derived'] as core.Map<core.String, core.dynamic>)
: null,
displayLabel: json_.containsKey('displayLabel')
? LocalizedString.fromJson(
json_['displayLabel'] as core.Map<core.String, core.dynamic>)
: null,
hasNonzeroData: json_.containsKey('hasNonzeroData')
? json_['hasNonzeroData'] as core.bool
: null,
hotValue: json_.containsKey('hotValue')
? (json_['hotValue'] as core.num).toDouble()
: null,
indexedHotKeys: json_.containsKey('indexedHotKeys')
? (json_['indexedHotKeys'] as core.Map<core.String, core.dynamic>)
.map(
(key, value) => core.MapEntry(
key,
IndexedHotKey.fromJson(
value as core.Map<core.String, core.dynamic>),
),
)
: null,
indexedKeyRangeInfos: json_.containsKey('indexedKeyRangeInfos')
? (json_['indexedKeyRangeInfos']
as core.Map<core.String, core.dynamic>)
.map(
(key, value) => core.MapEntry(
key,
IndexedKeyRangeInfos.fromJson(
value as core.Map<core.String, core.dynamic>),
),
)
: null,
info: json_.containsKey('info')
? LocalizedString.fromJson(
json_['info'] as core.Map<core.String, core.dynamic>)
: null,
matrix: json_.containsKey('matrix')
? MetricMatrix.fromJson(
json_['matrix'] as core.Map<core.String, core.dynamic>)
: null,
unit: json_.containsKey('unit')
? LocalizedString.fromJson(
json_['unit'] as core.Map<core.String, core.dynamic>)
: null,
visible: json_.containsKey('visible')
? json_['visible'] as core.bool
: null,
);