Map<String, Object?> toJson() { var type = this.type; var name = this.name; final json = <String, Object?>{}; json[r'type'] = type.value; json[r'name'] = name; return json; }