Use NS_ENUM to help type checking and make Swift bridging work