copyWith method

McpServerConfig copyWith({
  1. String? name,
  2. String? version,
  3. ServerCapabilities? capabilities,
  4. bool? enableDebugLogging,
  5. int? maxConnections,
  6. Duration? requestTimeout,
  7. bool? enableMetrics,
})

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,
  );
}