copyWith method

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

Implementation

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