provide `#as_enum` method for representations