Let's use an integer as a parameter and downcast internally for user-friendly API.