Map<String, dynamic> toJson() { return { 'idName': prototype.idName, 'links': links.map((link) => link.toJson()).toList(), }; }