Map<String, dynamic> toJson() => { "long_name": longName, "short_name": shortName, "types": types == null ? [] : List<dynamic>.from(types!.map((x) => x)), };