This is needed to be able to round trip enums. If there is no codegen for an enum that is read from the datastore we now return a types.Enum which can be serialized back to the same sequence.