copyWith method
Returns a copy of the target configuration.
host: IP or Domain.protocol: ICMP, TCP, HTTP, or HTTPS.isEssential: If true, failure of this target triggers the circuit breaker.
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,
);
}