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