org.whispersystems.signalservice.internal.push.IdentityCheckResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of signal-service-java Show documentation
Show all versions of signal-service-java Show documentation
Signal Service communication library for Java, unofficial fork
package org.whispersystems.signalservice.internal.push;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.signal.libsignal.protocol.IdentityKey;
import org.whispersystems.signalservice.api.push.ServiceId;
import org.whispersystems.signalservice.internal.util.JsonUtil;
import java.util.List;
import javax.annotation.Nullable;
public class IdentityCheckResponse {
@JsonProperty("elements")
private List serviceIdKeyPairs;
public IdentityCheckResponse() {}
// Visible for testing
public IdentityCheckResponse(List serviceIdKeyPairs) {
this.serviceIdKeyPairs = serviceIdKeyPairs;
}
public @Nullable List getServiceIdKeyPairs() {
return serviceIdKeyPairs;
}
public static final class ServiceIdentityPair {
@JsonProperty("uuid")
@JsonDeserialize(using = JsonUtil.ServiceIdDeserializer.class)
private ServiceId serviceId;
@JsonProperty
@JsonDeserialize(using = JsonUtil.IdentityKeyDeserializer.class)
private IdentityKey identityKey;
public ServiceIdentityPair() {}
// Visible for testing
public ServiceIdentityPair(ServiceId serviceId, IdentityKey identityKey) {
this.serviceId = serviceId;
this.identityKey = identityKey;
}
public @Nullable ServiceId getServiceId() {
return serviceId;
}
public @Nullable IdentityKey getIdentityKey() {
return identityKey;
}
}
}