toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final metric = this.metric;
  final period = this.period;
  final stat = this.stat;
  final unit = this.unit;
  return {
    'Metric': metric,
    'Period': period,
    'Stat': stat,
    if (unit != null) 'Unit': unit.toValue(),
  };
}