core.Map<core.String, core.dynamic> toJson() => { if (metricId != null) 'metricId': metricId!, if (value != null) 'value': value!, };