@override Object toJson() { return { 'parent': parent, if (session != null) 'session': session!.toJson(), }; }