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