io.quarkiverse.openfga.client.model.FGANotFoundException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-openfga-client-model Show documentation
Show all versions of quarkus-openfga-client-model Show documentation
OpenFGA Client API model classes
The newest version!
package io.quarkiverse.openfga.client.model;
import static com.fasterxml.jackson.annotation.JsonCreator.Mode.PROPERTIES;
import static java.lang.String.format;
import javax.annotation.Nullable;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
public class FGANotFoundException extends FGAException {
public enum Code {
@JsonProperty("no_not_found_error")
NO_NOT_FOUND_ERROR,
@JsonProperty("undefined_endpoint")
UNDEFINED_ENDPOINT,
@JsonProperty("store_id_not_found")
STORE_ID_NOT_FOUND,
@JsonProperty("unimplemented")
UNIMPLEMENTED,
}
private final Code code;
@JsonCreator(mode = PROPERTIES)
public FGANotFoundException(@JsonProperty("code") Code code, @JsonProperty("message") @Nullable String message) {
super(format("%s (%s)", message, code.name().toLowerCase()));
this.code = code;
}
public Code getCode() {
return code;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy