Annotation Type EnumType


  • @Retention(RUNTIME)
    @Target(TYPE)
    public @interface EnumType
    Annotation used by a Pulumi Cloud Provider Package to mark enum types.

    Requirements for an enum to be (de)serialized are as follows. It must:

    • Be an enum type decorated with EnumType
    • Have a constructor that takes a single parameter of the underlying type. The constructor can be private.
    • Have a explicit conversion method annotated with @EnumType.Converter that converts the enum type to the underlying type.
    • Implementing toString isn't required, but is recommended and is what our codegen does.