Map<String, dynamic> toJson() { final port = this.port; final protocol = this.protocol; return { 'port': port, 'protocol': protocol.toValue(), }; }