use switch in attribute constructor for multiple cases.