toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final bindIP = this.bindIP;
  final containerPort = this.containerPort;
  final hostPort = this.hostPort;
  final protocol = this.protocol;
  return {
    if (bindIP != null) 'bindIP': bindIP,
    if (containerPort != null) 'containerPort': containerPort,
    if (hostPort != null) 'hostPort': hostPort,
    if (protocol != null) 'protocol': protocol.toValue(),
  };
}