copyWith method

DeviceDetailsDTO copyWith({
  1. DeviceDTO? device,
  2. PowerSourceDTO? powerSource,
  3. SwitchStateDTO? switchState,
  4. CoolingTypeDTO? coolingType,
  5. ConnectionTypeDTO? connectionType,
  6. String? serverIpAddress,
  7. ServiceAgreementDTO? serviceAgreement,
  8. ExerciseInfoDTO? exercise,
  9. DateTime? lastRanTimestamp,
  10. double? totalRuntimeHours,
  11. double? totalOperationHours,
  12. double? runtimeSinceLastMaintenanceHours,
  13. int? remoteResetCounterSeconds,
  14. String? addedBy,
  15. List<String>? associatedUsers,
  16. DateTime? controllerClockTimestamp,
  17. FuelTypeDTO? fuelType,
  18. double? batteryVoltageV,
  19. double? engineCoolantTempF,
  20. double? engineFrequencyHz,
  21. double? engineSpeedRpm,
  22. double? lubeOilTempF,
  23. double? controllerTempF,
  24. double? engineCompartmentTempF,
  25. double? engineOilPressurePsi,
  26. bool? engineOilPressureOk,
  27. double? generatorLoadW,
  28. double? generatorLoadPercent,
  29. double? generatorVoltageAvgV,
  30. double? setOutputVoltageV,
  31. double? utilityVoltageV,
  32. GensetStateDTO? engineState,
  33. String? engineStateDisplayNameEn,
  34. PeripheralDTO? loadShed,
  35. PeripheralDTO? pim,
  36. DateTime? cellularExpiryDate,
  37. DateTime? cellularInstallationDate,
  38. double? cellularDataPercentage,
  39. CellularDataStatusDTO? cellularDataStatus,
})

Implementation

DeviceDetailsDTO copyWith(
    {DeviceDTO? device,
    enums.PowerSourceDTO? powerSource,
    enums.SwitchStateDTO? switchState,
    enums.CoolingTypeDTO? coolingType,
    enums.ConnectionTypeDTO? connectionType,
    String? serverIpAddress,
    ServiceAgreementDTO? serviceAgreement,
    ExerciseInfoDTO? exercise,
    DateTime? lastRanTimestamp,
    double? totalRuntimeHours,
    double? totalOperationHours,
    double? runtimeSinceLastMaintenanceHours,
    int? remoteResetCounterSeconds,
    String? addedBy,
    List<String>? associatedUsers,
    DateTime? controllerClockTimestamp,
    enums.FuelTypeDTO? fuelType,
    double? batteryVoltageV,
    double? engineCoolantTempF,
    double? engineFrequencyHz,
    double? engineSpeedRpm,
    double? lubeOilTempF,
    double? controllerTempF,
    double? engineCompartmentTempF,
    double? engineOilPressurePsi,
    bool? engineOilPressureOk,
    double? generatorLoadW,
    double? generatorLoadPercent,
    double? generatorVoltageAvgV,
    double? setOutputVoltageV,
    double? utilityVoltageV,
    enums.GensetStateDTO? engineState,
    String? engineStateDisplayNameEn,
    PeripheralDTO? loadShed,
    PeripheralDTO? pim,
    DateTime? cellularExpiryDate,
    DateTime? cellularInstallationDate,
    double? cellularDataPercentage,
    enums.CellularDataStatusDTO? cellularDataStatus}) {
  return DeviceDetailsDTO(
      device: device ?? this.device,
      powerSource: powerSource ?? this.powerSource,
      switchState: switchState ?? this.switchState,
      coolingType: coolingType ?? this.coolingType,
      connectionType: connectionType ?? this.connectionType,
      serverIpAddress: serverIpAddress ?? this.serverIpAddress,
      serviceAgreement: serviceAgreement ?? this.serviceAgreement,
      exercise: exercise ?? this.exercise,
      lastRanTimestamp: lastRanTimestamp ?? this.lastRanTimestamp,
      totalRuntimeHours: totalRuntimeHours ?? this.totalRuntimeHours,
      totalOperationHours: totalOperationHours ?? this.totalOperationHours,
      runtimeSinceLastMaintenanceHours: runtimeSinceLastMaintenanceHours ??
          this.runtimeSinceLastMaintenanceHours,
      remoteResetCounterSeconds:
          remoteResetCounterSeconds ?? this.remoteResetCounterSeconds,
      addedBy: addedBy ?? this.addedBy,
      associatedUsers: associatedUsers ?? this.associatedUsers,
      controllerClockTimestamp:
          controllerClockTimestamp ?? this.controllerClockTimestamp,
      fuelType: fuelType ?? this.fuelType,
      batteryVoltageV: batteryVoltageV ?? this.batteryVoltageV,
      engineCoolantTempF: engineCoolantTempF ?? this.engineCoolantTempF,
      engineFrequencyHz: engineFrequencyHz ?? this.engineFrequencyHz,
      engineSpeedRpm: engineSpeedRpm ?? this.engineSpeedRpm,
      lubeOilTempF: lubeOilTempF ?? this.lubeOilTempF,
      controllerTempF: controllerTempF ?? this.controllerTempF,
      engineCompartmentTempF:
          engineCompartmentTempF ?? this.engineCompartmentTempF,
      engineOilPressurePsi: engineOilPressurePsi ?? this.engineOilPressurePsi,
      engineOilPressureOk: engineOilPressureOk ?? this.engineOilPressureOk,
      generatorLoadW: generatorLoadW ?? this.generatorLoadW,
      generatorLoadPercent: generatorLoadPercent ?? this.generatorLoadPercent,
      generatorVoltageAvgV: generatorVoltageAvgV ?? this.generatorVoltageAvgV,
      setOutputVoltageV: setOutputVoltageV ?? this.setOutputVoltageV,
      utilityVoltageV: utilityVoltageV ?? this.utilityVoltageV,
      engineState: engineState ?? this.engineState,
      engineStateDisplayNameEn:
          engineStateDisplayNameEn ?? this.engineStateDisplayNameEn,
      loadShed: loadShed ?? this.loadShed,
      pim: pim ?? this.pim,
      cellularExpiryDate: cellularExpiryDate ?? this.cellularExpiryDate,
      cellularInstallationDate:
          cellularInstallationDate ?? this.cellularInstallationDate,
      cellularDataPercentage:
          cellularDataPercentage ?? this.cellularDataPercentage,
      cellularDataStatus: cellularDataStatus ?? this.cellularDataStatus);
}