io.smallrye.graphql.schema.model.EnumValue Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of smallrye-graphql-schema-model Show documentation
Show all versions of smallrye-graphql-schema-model Show documentation
A model that represents the schema
package io.smallrye.graphql.schema.model;
import java.util.List;
/**
* Represents one of an enum's values. Is part of {@link EnumType}.
*
* @author Felix König ([email protected])
*/
public final class EnumValue {
private String description;
private String value;
private List directiveInstances;
public EnumValue() {
}
public EnumValue(String description, String value, List directiveInstances) {
this.description = description;
this.value = value;
this.directiveInstances = directiveInstances;
}
public String getDescription() {
return description;
}
public String getValue() {
return value;
}
public void setDescription(String description) {
this.description = description;
}
public void setValue(String value) {
this.value = value;
}
@Override
public String toString() {
return "EnumValue{" +
"description=" + description +
", value=" + value +
", directiveInstances=" + directiveInstances +
'}';
}
public boolean hasDirectiveInstances() {
return directiveInstances != null && !directiveInstances.isEmpty();
}
public List getDirectiveInstances() {
return directiveInstances;
}
public void setDirectiveInstances(List directiveInstances) {
this.directiveInstances = directiveInstances;
}
public void addDirectiveInstance(DirectiveInstance directiveInstance) {
this.directiveInstances.add(directiveInstance);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy