Switch to enums rather than @OneOf.