[MINOR] Use enum for spawn setting.