Class GenerateEnumDirective<C extends CodegenContext<S,?,?>,S>
- java.lang.Object
- 
- software.amazon.smithy.codegen.core.directed.Directive<S>
- 
- software.amazon.smithy.codegen.core.directed.ContextualDirective<C,S>
- 
- software.amazon.smithy.codegen.core.directed.ShapeDirective<Shape,C,S>
- 
- software.amazon.smithy.codegen.core.directed.GenerateEnumDirective<C,S>
 
 
 
 
- 
- Type Parameters:
- C- CodegenContext type.
- S- Codegen settings type.
 
 public final class GenerateEnumDirective<C extends CodegenContext<S,?,?>,S> extends ShapeDirective<Shape,C,S> Directive used to generate an enum shape or enum string shape.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classGenerateEnumDirective.EnumTypeRepresents the type of enum to generate.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description EnumShapeexpectEnumShape()EnumTraitgetEnumTrait()Gets theEnumTraitof the shape.GenerateEnumDirective.EnumTypegetEnumType()Gets the type of enum being generated, whether it's a string shape marked with the enum trait or, in Smithy IDL 2.0, an actual enum shape.- 
Methods inherited from class software.amazon.smithy.codegen.core.directed.ShapeDirectiveshape, symbol
 - 
Methods inherited from class software.amazon.smithy.codegen.core.directed.ContextualDirectivecontext, fileManifest, symbolProvider
 - 
Methods inherited from class software.amazon.smithy.codegen.core.directed.DirectiveconnectedShapes, model, operations, service, settings
 
- 
 
- 
- 
- 
Method Detail- 
getEnumTypepublic GenerateEnumDirective.EnumType getEnumType() Gets the type of enum being generated, whether it's a string shape marked with the enum trait or, in Smithy IDL 2.0, an actual enum shape.Note that Smithy IDL 2.0 generators can perform a pre-processing transform to convert eligible string shape enums to proper enums, removing the need to check this property. - Returns:
- Gets the type of enum being generated.
- See Also:
- getEnumTrait()
 
 - 
getEnumTraitpublic EnumTrait getEnumTrait() Gets theEnumTraitof the shape.- Returns:
- Returns the enum trait.
 
 - 
expectEnumShapepublic EnumShape expectEnumShape() 
 
- 
 
-