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