Class GenerateEnumDirective<C extends CodegenContext<S,?,?>,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.
See Also:
  • Method Details

    • getEnumType

      public 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

      public EnumTrait getEnumTrait()
      Gets the EnumTrait of the shape.
      Returns:
      Returns the enum trait.
    • expectEnumShape

      public EnumShape expectEnumShape()