toJson method
Implementation
Map<String, dynamic> toJson() {
final interval = this.interval;
final intervalUnit = this.intervalUnit;
return {
if (interval != null) 'Interval': interval,
if (intervalUnit != null) 'IntervalUnit': intervalUnit.toValue(),
};
}