copyWith method
Creates a copy with optional field overrides.
Implementation
DiskStatus copyWith({
String? path,
int? diskIndex,
DiskHealth? health,
int? totalBytes,
int? availableBytes,
List<String>? errorLogs,
double? readLatencyMs,
double? writeLatencyMs,
DateTime? lastChecked,
}) =>
DiskStatus(
path: path ?? this.path,
diskIndex: diskIndex ?? this.diskIndex,
health: health ?? this.health,
totalBytes: totalBytes ?? this.totalBytes,
availableBytes: availableBytes ?? this.availableBytes,
errorLogs: errorLogs ?? this.errorLogs,
readLatencyMs: readLatencyMs ?? this.readLatencyMs,
writeLatencyMs: writeLatencyMs ?? this.writeLatencyMs,
lastChecked: lastChecked ?? this.lastChecked,
);