Map<String, dynamic> toJson() { final map = <String, dynamic>{}; map['type'] = type; map['mid'] = mid; map['port'] = port; return map; }