copyWith method
Creates a copy of NetworkTarget with the given fields replaced by the new values.
label Human-readable identifier.
host Domain or IP address.
port Destination port.
protocol Communication protocol (TCP, ICMP, etc.).
timeoutMs Connection timeout.
priority Relative priority for sorting.
isEssential Criticality flag.
Returns a new NetworkTarget instance.
Implementation
NetworkTarget copyWith({
String? label,
String? host,
int? port,
TargetProtocol? protocol,
BigInt? timeoutMs,
int? priority,
bool? isEssential,
}) {
return NetworkTarget(
label: label ?? this.label,
host: host ?? this.host,
port: port ?? this.port,
protocol: protocol ?? this.protocol,
timeoutMs: timeoutMs ?? this.timeoutMs,
priority: priority ?? this.priority,
isEssential: isEssential ?? this.isEssential,
);
}