generate accessors for lists of enums