Map<String, dynamic> toJson() { final id = this.id; final type = this.type; return { 'id': id, 'type': type.toValue(), }; }