Map<String, dynamic> toJson() => { "events": events == null ? null : List<dynamic>.from(events.map((x) => x)), };