copyWith method

GetGeneratorResponseModel copyWith({
  1. int? id,
  2. String? serialnumber,
  3. String? displayname,
  4. String? lat,
  5. String? long,
  6. String? address1,
  7. String? city,
  8. String? state,
  9. String? postalcode,
  10. dynamic ipaddress,
  11. bool? hasAcceptedPrivacyPolicy,
  12. bool? isconnected,
  13. bool? isShutdownAlert,
  14. int? datelastconnected,
  15. String? datetimelastconnected,
  16. String? lastconnectedrelativetime,
  17. String? devicestate,
  18. int? alertCnt,
  19. String? status,
  20. String? modelNumber,
  21. int? lastDeviceStateUpdated,
  22. String? lastDeviceStateUpdatedDateTimeUTC,
  23. String? switchState,
  24. String? lastMaintenance,
  25. String? nextMaintenance,
  26. String? maintenancePeriod,
})

Implementation

GetGeneratorResponseModel copyWith(
    {int? id,
    String? serialnumber,
    String? displayname,
    String? lat,
    String? long,
    String? address1,
    String? city,
    String? state,
    String? postalcode,
    dynamic ipaddress,
    bool? hasAcceptedPrivacyPolicy,
    bool? isconnected,
    bool? isShutdownAlert,
    int? datelastconnected,
    String? datetimelastconnected,
    String? lastconnectedrelativetime,
    String? devicestate,
    int? alertCnt,
    String? status,
    String? modelNumber,
    int? lastDeviceStateUpdated,
    String? lastDeviceStateUpdatedDateTimeUTC,
    String? switchState,
    String? lastMaintenance,
    String? nextMaintenance,
    String? maintenancePeriod}) {
  return GetGeneratorResponseModel(
      id: id ?? this.id,
      serialnumber: serialnumber ?? this.serialnumber,
      displayname: displayname ?? this.displayname,
      lat: lat ?? this.lat,
      long: long ?? this.long,
      address1: address1 ?? this.address1,
      city: city ?? this.city,
      state: state ?? this.state,
      postalcode: postalcode ?? this.postalcode,
      ipaddress: ipaddress ?? this.ipaddress,
      hasAcceptedPrivacyPolicy:
          hasAcceptedPrivacyPolicy ?? this.hasAcceptedPrivacyPolicy,
      isconnected: isconnected ?? this.isconnected,
      isShutdownAlert: isShutdownAlert ?? this.isShutdownAlert,
      datelastconnected: datelastconnected ?? this.datelastconnected,
      datetimelastconnected:
          datetimelastconnected ?? this.datetimelastconnected,
      lastconnectedrelativetime:
          lastconnectedrelativetime ?? this.lastconnectedrelativetime,
      devicestate: devicestate ?? this.devicestate,
      alertCnt: alertCnt ?? this.alertCnt,
      status: status ?? this.status,
      modelNumber: modelNumber ?? this.modelNumber,
      lastDeviceStateUpdated:
          lastDeviceStateUpdated ?? this.lastDeviceStateUpdated,
      lastDeviceStateUpdatedDateTimeUTC: lastDeviceStateUpdatedDateTimeUTC ??
          this.lastDeviceStateUpdatedDateTimeUTC,
      switchState: switchState ?? this.switchState,
      lastMaintenance: lastMaintenance ?? this.lastMaintenance,
      nextMaintenance: nextMaintenance ?? this.nextMaintenance,
      maintenancePeriod: maintenancePeriod ?? this.maintenancePeriod);
}