copyWith method

McpClientConfig copyWith({
  1. String? name,
  2. String? version,
  3. ClientCapabilities? capabilities,
  4. int? maxRetries,
  5. Duration? retryDelay,
  6. Duration? requestTimeout,
  7. bool? enableDebugLogging,
})

Creates a copy of this config with the given fields replaced

Implementation

McpClientConfig copyWith({
  String? name,
  String? version,
  ClientCapabilities? capabilities,
  int? maxRetries,
  Duration? retryDelay,
  Duration? requestTimeout,
  bool? enableDebugLogging,
}) {
  return McpClientConfig(
    name: name ?? this.name,
    version: version ?? this.version,
    capabilities: capabilities ?? this.capabilities,
    maxRetries: maxRetries ?? this.maxRetries,
    retryDelay: retryDelay ?? this.retryDelay,
    requestTimeout: requestTimeout ?? this.requestTimeout,
    enableDebugLogging: enableDebugLogging ?? this.enableDebugLogging,
  );
}