copyWith method

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

Creates a copy of this config with the given fields replaced

Implementation

McpServerConfig copyWith({
  String? name,
  String? version,
  String? description,
  ServerCapabilities? capabilities,
  bool? enableDebugLogging,
  int? maxConnections,
  Duration? requestTimeout,
  bool? enableMetrics,
}) {
  return McpServerConfig(
    name: name ?? this.name,
    version: version ?? this.version,
    description: description ?? this.description,
    capabilities: capabilities ?? this.capabilities,
    enableDebugLogging: enableDebugLogging ?? this.enableDebugLogging,
    maxConnections: maxConnections ?? this.maxConnections,
    requestTimeout: requestTimeout ?? this.requestTimeout,
    enableMetrics: enableMetrics ?? this.enableMetrics,
  );
}