copyWith method
McpClientConfig
copyWith({
- String? name,
- String? version,
- String? description,
- ClientCapabilities? capabilities,
- String? protocolVersion,
- int? maxRetries,
- Duration? retryDelay,
- Duration? requestTimeout,
- bool? enableDebugLogging,
- ProtocolEra? era,
Creates a copy of this config with the given fields replaced
Implementation
McpClientConfig copyWith({
String? name,
String? version,
String? description,
ClientCapabilities? capabilities,
String? protocolVersion,
int? maxRetries,
Duration? retryDelay,
Duration? requestTimeout,
bool? enableDebugLogging,
ProtocolEra? era,
}) {
return McpClientConfig(
name: name ?? this.name,
version: version ?? this.version,
description: description ?? this.description,
capabilities: capabilities ?? this.capabilities,
protocolVersion: protocolVersion ?? this.protocolVersion,
maxRetries: maxRetries ?? this.maxRetries,
retryDelay: retryDelay ?? this.retryDelay,
requestTimeout: requestTimeout ?? this.requestTimeout,
enableDebugLogging: enableDebugLogging ?? this.enableDebugLogging,
era: era ?? this.era,
);
}