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