copyWithWrapped method

DeviceV2 copyWithWrapped({
  1. Wrapped<int?>? id,
  2. Wrapped<String?>? serialNumber,
  3. Wrapped<String?>? displayName,
  4. Wrapped<bool?>? hasAcceptedPrivacyPolicy,
  5. Wrapped<DeviceAddressV2?>? address,
  6. Wrapped<bool?>? isConnected,
  7. Wrapped<DateTime?>? lastConnectedTimestamp,
  8. Wrapped<DeviceStatusV2?>? status,
  9. Wrapped<DateTime?>? statusUpdateTimestamp,
  10. Wrapped<List<DeviceDealerOrgV2>?>? dealerOrgs,
  11. Wrapped<int?>? alertCount,
  12. Wrapped<String?>? model,
  13. Wrapped<DateTime?>? lastMaintenanceTimestamp,
  14. Wrapped<DateTime?>? nextMaintenanceTimestamp,
  15. Wrapped<int?>? maintenancePeriodDays,
  16. Wrapped<bool?>? hasServiceAgreement,
  17. Wrapped<double?>? totalRuntimeHours,
})

Implementation

DeviceV2 copyWithWrapped(
    {Wrapped<int?>? id,
    Wrapped<String?>? serialNumber,
    Wrapped<String?>? displayName,
    Wrapped<bool?>? hasAcceptedPrivacyPolicy,
    Wrapped<DeviceAddressV2?>? address,
    Wrapped<bool?>? isConnected,
    Wrapped<DateTime?>? lastConnectedTimestamp,
    Wrapped<enums.DeviceStatusV2?>? status,
    Wrapped<DateTime?>? statusUpdateTimestamp,
    Wrapped<List<DeviceDealerOrgV2>?>? dealerOrgs,
    Wrapped<int?>? alertCount,
    Wrapped<String?>? model,
    Wrapped<DateTime?>? lastMaintenanceTimestamp,
    Wrapped<DateTime?>? nextMaintenanceTimestamp,
    Wrapped<int?>? maintenancePeriodDays,
    Wrapped<bool?>? hasServiceAgreement,
    Wrapped<double?>? totalRuntimeHours}) {
  return DeviceV2(
      id: (id != null ? id.value : this.id),
      serialNumber:
          (serialNumber != null ? serialNumber.value : this.serialNumber),
      displayName:
          (displayName != null ? displayName.value : this.displayName),
      hasAcceptedPrivacyPolicy: (hasAcceptedPrivacyPolicy != null
          ? hasAcceptedPrivacyPolicy.value
          : this.hasAcceptedPrivacyPolicy),
      address: (address != null ? address.value : this.address),
      isConnected:
          (isConnected != null ? isConnected.value : this.isConnected),
      lastConnectedTimestamp: (lastConnectedTimestamp != null
          ? lastConnectedTimestamp.value
          : this.lastConnectedTimestamp),
      status: (status != null ? status.value : this.status),
      statusUpdateTimestamp: (statusUpdateTimestamp != null
          ? statusUpdateTimestamp.value
          : this.statusUpdateTimestamp),
      dealerOrgs: (dealerOrgs != null ? dealerOrgs.value : this.dealerOrgs),
      alertCount: (alertCount != null ? alertCount.value : this.alertCount),
      model: (model != null ? model.value : this.model),
      lastMaintenanceTimestamp: (lastMaintenanceTimestamp != null
          ? lastMaintenanceTimestamp.value
          : this.lastMaintenanceTimestamp),
      nextMaintenanceTimestamp: (nextMaintenanceTimestamp != null
          ? nextMaintenanceTimestamp.value
          : this.nextMaintenanceTimestamp),
      maintenancePeriodDays: (maintenancePeriodDays != null
          ? maintenancePeriodDays.value
          : this.maintenancePeriodDays),
      hasServiceAgreement: (hasServiceAgreement != null
          ? hasServiceAgreement.value
          : this.hasServiceAgreement),
      totalRuntimeHours: (totalRuntimeHours != null
          ? totalRuntimeHours.value
          : this.totalRuntimeHours));
}