toJson method

Map<String, dynamic> toJson()

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(),
  };
}