@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:51.517Z") public class EnumType extends software.amazon.jsii.JsiiObject implements IIntermediateType
Example:
GraphqlApi api; EnumType episode = EnumType.Builder.create("Episode") .definition(List.of("NEWHOPE", "EMPIRE", "JEDI")) .build(); api.addType(episode);
Modifier and Type | Class and Description |
---|---|
static class |
EnumType.Builder
(experimental) A fluent builder for
EnumType . |
IIntermediateType.Jsii$Default, IIntermediateType.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
EnumType(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
EnumType(software.amazon.jsii.JsiiObjectRef objRef) |
|
EnumType(java.lang.String name,
EnumTypeOptions options) |
Modifier and Type | Method and Description |
---|---|
void |
addField(AddFieldOptions options)
(experimental) Add a field to this Enum Type.
|
GraphqlType |
attribute()
(experimental) Create an GraphQL Type representing this Enum Type.
|
GraphqlType |
attribute(BaseTypeOptions options)
(experimental) Create an GraphQL Type representing this Enum Type.
|
java.util.Map<java.lang.String,IField> |
getDefinition()
(experimental) the attributes of this type.
|
protected java.util.List<AuthorizationType> |
getModes()
(experimental) the authorization modes for this intermediate type.
|
java.lang.String |
getName()
(experimental) the name of this type.
|
protected void |
setModes(java.util.List<AuthorizationType> value)
(experimental) the authorization modes for this intermediate type.
|
java.lang.String |
toString()
(experimental) Generate the string of this enum type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDirectives, getInterfaceTypes, getIntermediateType, getResolvers, setResolvers
protected EnumType(software.amazon.jsii.JsiiObjectRef objRef)
protected EnumType(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public EnumType(java.lang.String name, EnumTypeOptions options)
name
- This parameter is required.options
- This parameter is required.public void addField(AddFieldOptions options)
To add a field to this Enum Type, you must only configure addField with the fieldName options.
addField
in interface IIntermediateType
options
- the options to add a field. This parameter is required.public GraphqlType attribute(BaseTypeOptions options)
attribute
in interface IIntermediateType
options
- public GraphqlType attribute()
attribute
in interface IIntermediateType
public java.lang.String toString()
toString
in interface IIntermediateType
public java.util.Map<java.lang.String,IField> getDefinition()
getDefinition
in interface IIntermediateType
public java.lang.String getName()
getName
in interface IIntermediateType
protected java.util.List<AuthorizationType> getModes()
protected void setModes(java.util.List<AuthorizationType> value)