toJson method

Map<String, dynamic> toJson()

Implementation

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