Map<String, dynamic> toJson() { return <String, dynamic>{ if (id != null) r'id': id, if (roles != null) r'roles': roles, if (type != null) r'type': type, }; }