copyWithWrapped method

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

Implementation

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