Map<String, Object?> toJson() { var fields = this.fields; final json = <String, Object?>{}; json[r'fields'] = fields.map((i) => i.toJson()).toList(); return json; }