Replacing integer rule type with enum