Map<String, dynamic> toJson() { final json = <String, dynamic>{}; if (links != null) { json[r'links'] = links; } return json; }