core.Map<core.String, core.dynamic> toJson() => { if (hostname != null) 'hostname': hostname!, if (port != null) 'port': port!, };