Convert `DeviceInfo` and `DeviceInfoList` to a record

This commit is contained in:
Jon Chambers 2023-08-01 17:20:17 -04:00 committed by Chris Eager
parent a96ee57c7e
commit 8b13826949
2 changed files with 2 additions and 31 deletions

View File

@ -5,25 +5,5 @@
package org.whispersystems.textsecuregcm.entities;
import com.fasterxml.jackson.annotation.JsonProperty;
public class DeviceInfo {
@JsonProperty
private long id;
@JsonProperty
private String name;
@JsonProperty
private long lastSeen;
@JsonProperty
private long created;
public DeviceInfo(long id, String name, long lastSeen, long created) {
this.id = id;
this.name = name;
this.lastSeen = lastSeen;
this.created = created;
}
public record DeviceInfo(long id, String name, long lastSeen, long created) {
}

View File

@ -5,16 +5,7 @@
package org.whispersystems.textsecuregcm.entities;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
public class DeviceInfoList {
@JsonProperty
private List<DeviceInfo> devices;
public DeviceInfoList(List<DeviceInfo> devices) {
this.devices = devices;
}
public record DeviceInfoList(List<DeviceInfo> devices) {
}