@override Map<String, dynamic> toJson() => <String, Object?>{ 'type': type, 'ports': ports?.map((f) => f.toJson()).toList(), };