toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final host = this.host;
  final port = this.port;
  final priority = this.priority;
  final protocol = this.protocol;
  final weight = this.weight;
  return {
    if (host != null) 'Host': host,
    if (port != null) 'Port': port,
    if (priority != null) 'Priority': priority,
    if (protocol != null) 'Protocol': protocol.toValue(),
    if (weight != null) 'Weight': weight,
  };
}