mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 13:16:53 +00:00
Convert RegistrationLockFailure to a record
This commit is contained in:
1 parent
050035dd52
commit
b4a143b9de
2 files changed
+6
-30
No files matched your search
+1
-25
@@ -5,32 +5,8 @@
|
||||
|
||||
package org.whispersystems.textsecuregcm.entities;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import org.whispersystems.textsecuregcm.auth.ExternalServiceCredentials;
|
||||
|
||||
public class RegistrationLockFailure {
|
||||
public record RegistrationLockFailure(long timeRemaining, ExternalServiceCredentials backupCredentials) {
|
||||
|
||||
@JsonProperty
|
||||
private long timeRemaining;
|
||||
|
||||
@JsonProperty
|
||||
private ExternalServiceCredentials backupCredentials;
|
||||
|
||||
public RegistrationLockFailure() {}
|
||||
|
||||
public RegistrationLockFailure(long timeRemaining, ExternalServiceCredentials backupCredentials) {
|
||||
this.timeRemaining = timeRemaining;
|
||||
this.backupCredentials = backupCredentials;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public long getTimeRemaining() {
|
||||
return timeRemaining;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public ExternalServiceCredentials getBackupCredentials() {
|
||||
return backupCredentials;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user