
edu.stanford.protege.webprotege.mail.GetEmailAddressResult Maven / Gradle / Ivy
package edu.stanford.protege.webprotege.mail;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeName;
import edu.stanford.protege.webprotege.common.UserId;
import edu.stanford.protege.webprotege.dispatch.Result;
import edu.stanford.protege.webprotege.user.EmailAddress;
import javax.annotation.Nullable;
import java.util.Optional;
/**
* Author: Matthew Horridge
* Stanford University
* Bio-Medical Informatics Research Group
* Date: 06/11/2013
*
* The result from a {@link GetEmailAddressAction}.
*
*/
@JsonTypeName("webprotege.users.GetEmailAddress")
public record GetEmailAddressResult(@JsonProperty("userId") UserId userId,
@JsonProperty("emailAddress") @Nullable EmailAddress emailAddress) implements Result {
/**
* Gets the {@link EmailAddress}.
* @return The {@link EmailAddress}. An absent value indicates that the email for the specified user id
* does not exist. Not {@code null}.
*/
public Optional getEmailAddress() {
return Optional.ofNullable(emailAddress);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy