copyWith method
DeviceDetailsDTO
copyWith({ - DeviceDTO? device,
- PowerSourceDTO? powerSource,
- SwitchStateDTO? switchState,
- CoolingTypeDTO? coolingType,
- 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,
- 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,
- GensetStateDTO? engineState,
- String? engineStateDisplayNameEn,
- PeripheralDTO? loadShed,
- PeripheralDTO? pim,
- DateTime? cellularExpiryDate,
- DateTime? cellularInstallationDate,
- double? cellularDataPercentage,
- 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);
}