copyWith method

DiskStatus copyWith({
  1. String? path,
  2. int? diskIndex,
  3. DiskHealth? health,
  4. int? totalBytes,
  5. int? availableBytes,
  6. List<String>? errorLogs,
  7. double? readLatencyMs,
  8. double? writeLatencyMs,
  9. DateTime? lastChecked,
})

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