copyWith method
Implementation
PortSpec copyWith({PortNum? num, String? type, List<EndpointSpec>? endpoints, String? liveness}) {
return PortSpec(
num: num ?? this.num,
type: type ?? this.type,
endpoints: endpoints ?? List<EndpointSpec>.from(this.endpoints),
liveness: liveness ?? this.liveness,
);
}