Map<String, dynamic> toJson() { final end = this.end; final start = this.start; return { if (end != null) 'end': unixTimestampToJson(end), if (start != null) 'start': unixTimestampToJson(start), }; }