mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 22:18:05 +01:00
Convert AccountIdentityResponse to a record
This commit is contained in:
committed by
Jon Chambers
parent
b4a143b9de
commit
5a89e66fc0
@@ -5,56 +5,12 @@
|
||||
|
||||
package org.whispersystems.textsecuregcm.entities;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.UUID;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class AccountIdentityResponse {
|
||||
|
||||
private final UUID uuid;
|
||||
private final String number;
|
||||
private final UUID pni;
|
||||
|
||||
@Nullable
|
||||
private final String username;
|
||||
|
||||
private final boolean storageCapable;
|
||||
|
||||
@JsonCreator
|
||||
public AccountIdentityResponse(
|
||||
@JsonProperty("uuid") final UUID uuid,
|
||||
@JsonProperty("number") final String number,
|
||||
@JsonProperty("pni") final UUID pni,
|
||||
@JsonProperty("username") @Nullable final String username,
|
||||
@JsonProperty("storageCapable") final boolean storageCapable) {
|
||||
|
||||
this.uuid = uuid;
|
||||
this.number = number;
|
||||
this.pni = pni;
|
||||
this.username = username;
|
||||
this.storageCapable = storageCapable;
|
||||
}
|
||||
|
||||
public UUID getUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public String getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public UUID getPni() {
|
||||
return pni;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public boolean isStorageCapable() {
|
||||
return storageCapable;
|
||||
}
|
||||
public record AccountIdentityResponse(UUID uuid,
|
||||
String number,
|
||||
UUID pni,
|
||||
@Nullable String username,
|
||||
boolean storageCapable) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user