Map<String, dynamic> toJson() { final address = this.address; final port = this.port; return { if (address != null) 'Address': address, if (port != null) 'Port': port, }; }