Map<String, dynamic> toMap() { return { 'id': id, 'index': index, 'interfaces': interfaces.map((e) => e.toMap()).toList(), }; }