copyWith method
Creates a copy of this config with the given fields replaced
Implementation
McpServerConfig copyWith({
String? name,
String? version,
ServerCapabilities? capabilities,
bool? enableDebugLogging,
int? maxConnections,
Duration? requestTimeout,
bool? enableMetrics,
}) {
return McpServerConfig(
name: name ?? this.name,
version: version ?? this.version,
capabilities: capabilities ?? this.capabilities,
enableDebugLogging: enableDebugLogging ?? this.enableDebugLogging,
maxConnections: maxConnections ?? this.maxConnections,
requestTimeout: requestTimeout ?? this.requestTimeout,
enableMetrics: enableMetrics ?? this.enableMetrics,
);
}