copyWithWrapped method

DeviceDetailsV2 copyWithWrapped({
  1. Wrapped<DeviceV2?>? device,
  2. Wrapped<PowerSourceV2?>? powerSource,
  3. Wrapped<SwitchStateV2?>? switchState,
  4. Wrapped<CoolingTypeV2?>? coolingType,
  5. Wrapped<ConnectionTypeV2?>? connectionType,
  6. Wrapped<bool?>? hasServiceAgreement,
  7. Wrapped<DateTime?>? serviceAgreementBeginDate,
  8. Wrapped<ServiceAgreementTermV2?>? serviceAgreementTerm,
  9. Wrapped<int?>? serviceAgreementTermMonths,
  10. Wrapped<int?>? serviceAgreementTermDays,
  11. Wrapped<DateTime?>? lastRanTimestamp,
  12. Wrapped<int?>? totalRuntimeMinutes,
  13. Wrapped<int?>? runtimeSinceLastMaintenanceMinutes,
  14. Wrapped<String?>? addedBy,
  15. Wrapped<List<String>?>? associatedUsers,
  16. Wrapped<String?>? latestFirmware,
  17. Wrapped<DateTime?>? controllerClockTimestamp,
  18. Wrapped<String?>? controllerType,
  19. Wrapped<String?>? fuelType,
  20. Wrapped<double?>? batteryVoltageV,
  21. Wrapped<double?>? engineCoolantTempF,
  22. Wrapped<double?>? engineFrequencyHz,
  23. Wrapped<double?>? engineSpeedRpm,
  24. Wrapped<double?>? lubeOilTempF,
  25. Wrapped<double?>? controllerTempF,
  26. Wrapped<double?>? engineCompartmentTempF,
  27. Wrapped<double?>? engineOilPressurePsi,
  28. Wrapped<bool?>? engineOilPressureOk,
  29. Wrapped<double?>? generatorLoadW,
  30. Wrapped<double?>? generatorLoadPercent,
  31. Wrapped<double?>? generatorVoltageAvgV,
  32. Wrapped<double?>? setOutputVoltageV,
  33. Wrapped<double?>? utilityVoltageV,
  34. Wrapped<String?>? engineState,
  35. Wrapped<PeripheralV2?>? loadShed,
  36. Wrapped<PeripheralV2?>? pim,
})

Implementation

DeviceDetailsV2 copyWithWrapped(
    {Wrapped<DeviceV2?>? device,
    Wrapped<enums.PowerSourceV2?>? powerSource,
    Wrapped<enums.SwitchStateV2?>? switchState,
    Wrapped<enums.CoolingTypeV2?>? coolingType,
    Wrapped<enums.ConnectionTypeV2?>? connectionType,
    Wrapped<bool?>? hasServiceAgreement,
    Wrapped<DateTime?>? serviceAgreementBeginDate,
    Wrapped<enums.ServiceAgreementTermV2?>? serviceAgreementTerm,
    Wrapped<int?>? serviceAgreementTermMonths,
    Wrapped<int?>? serviceAgreementTermDays,
    Wrapped<DateTime?>? lastRanTimestamp,
    Wrapped<int?>? totalRuntimeMinutes,
    Wrapped<int?>? runtimeSinceLastMaintenanceMinutes,
    Wrapped<String?>? addedBy,
    Wrapped<List<String>?>? associatedUsers,
    Wrapped<String?>? latestFirmware,
    Wrapped<DateTime?>? controllerClockTimestamp,
    Wrapped<String?>? controllerType,
    Wrapped<String?>? 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<String?>? engineState,
    Wrapped<PeripheralV2?>? loadShed,
    Wrapped<PeripheralV2?>? pim}) {
  return DeviceDetailsV2(
      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),
      hasServiceAgreement: (hasServiceAgreement != null
          ? hasServiceAgreement.value
          : this.hasServiceAgreement),
      serviceAgreementBeginDate: (serviceAgreementBeginDate != null
          ? serviceAgreementBeginDate.value
          : this.serviceAgreementBeginDate),
      serviceAgreementTerm: (serviceAgreementTerm != null
          ? serviceAgreementTerm.value
          : this.serviceAgreementTerm),
      serviceAgreementTermMonths: (serviceAgreementTermMonths != null
          ? serviceAgreementTermMonths.value
          : this.serviceAgreementTermMonths),
      serviceAgreementTermDays: (serviceAgreementTermDays != null
          ? serviceAgreementTermDays.value
          : this.serviceAgreementTermDays),
      lastRanTimestamp: (lastRanTimestamp != null
          ? lastRanTimestamp.value
          : this.lastRanTimestamp),
      totalRuntimeMinutes: (totalRuntimeMinutes != null
          ? totalRuntimeMinutes.value
          : this.totalRuntimeMinutes),
      runtimeSinceLastMaintenanceMinutes:
          (runtimeSinceLastMaintenanceMinutes != null
              ? runtimeSinceLastMaintenanceMinutes.value
              : this.runtimeSinceLastMaintenanceMinutes),
      addedBy: (addedBy != null ? addedBy.value : this.addedBy),
      associatedUsers: (associatedUsers != null
          ? associatedUsers.value
          : this.associatedUsers),
      latestFirmware: (latestFirmware != null
          ? latestFirmware.value
          : this.latestFirmware),
      controllerClockTimestamp: (controllerClockTimestamp != null
          ? controllerClockTimestamp.value
          : this.controllerClockTimestamp),
      controllerType: (controllerType != null
          ? controllerType.value
          : this.controllerType),
      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),
      loadShed: (loadShed != null ? loadShed.value : this.loadShed),
      pim: (pim != null ? pim.value : this.pim));
}