@PublicApi public class GraphQLEnumType extends java.lang.Object implements GraphQLType, GraphQLInputType, GraphQLOutputType, GraphQLUnmodifiedType, GraphQLNullableType, GraphQLDirectiveContainer
Modifier and Type | Class and Description |
---|---|
static class |
GraphQLEnumType.Builder |
Constructor and Description |
---|
GraphQLEnumType(java.lang.String name,
java.lang.String description,
java.util.List<GraphQLEnumValueDefinition> values) |
GraphQLEnumType(java.lang.String name,
java.lang.String description,
java.util.List<GraphQLEnumValueDefinition> values,
java.util.List<GraphQLDirective> directives,
EnumTypeDefinition definition) |
Modifier and Type | Method and Description |
---|---|
Coercing |
getCoercing() |
EnumTypeDefinition |
getDefinition() |
java.lang.String |
getDescription() |
java.util.List<GraphQLDirective> |
getDirectives() |
java.lang.String |
getName() |
GraphQLEnumValueDefinition |
getValue(java.lang.String name) |
java.util.List<GraphQLEnumValueDefinition> |
getValues() |
static GraphQLEnumType.Builder |
newEnum() |
static GraphQLEnumType.Builder |
newEnum(GraphQLEnumType existing) |
GraphQLEnumType |
transform(java.util.function.Consumer<GraphQLEnumType.Builder> builderConsumer)
This helps you transform the current GraphQLEnumType into another one by starting a builder with all
the current values and allows you to transform it how you want.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDirective, getDirectivesByName
public GraphQLEnumType(java.lang.String name, java.lang.String description, java.util.List<GraphQLEnumValueDefinition> values)
public GraphQLEnumType(java.lang.String name, java.lang.String description, java.util.List<GraphQLEnumValueDefinition> values, java.util.List<GraphQLDirective> directives, EnumTypeDefinition definition)
public java.util.List<GraphQLEnumValueDefinition> getValues()
public GraphQLEnumValueDefinition getValue(java.lang.String name)
public java.lang.String getName()
getName
in interface GraphQLType
[_A-Za-z][_0-9A-Za-z]*
public java.lang.String getDescription()
public Coercing getCoercing()
public EnumTypeDefinition getDefinition()
public java.util.List<GraphQLDirective> getDirectives()
getDirectives
in interface GraphQLDirectiveContainer
public GraphQLEnumType transform(java.util.function.Consumer<GraphQLEnumType.Builder> builderConsumer)
builderConsumer
- the consumer code that will be given a builder to transformpublic static GraphQLEnumType.Builder newEnum()
public static GraphQLEnumType.Builder newEnum(GraphQLEnumType existing)