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