toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final healthyThreshold = this.healthyThreshold;
  final intervalMillis = this.intervalMillis;
  final protocol = this.protocol;
  final timeoutMillis = this.timeoutMillis;
  final unhealthyThreshold = this.unhealthyThreshold;
  final path = this.path;
  final port = this.port;
  return {
    'healthyThreshold': healthyThreshold,
    'intervalMillis': intervalMillis,
    'protocol': protocol.toValue(),
    'timeoutMillis': timeoutMillis,
    'unhealthyThreshold': unhealthyThreshold,
    if (path != null) 'path': path,
    if (port != null) 'port': port,
  };
}