generating PathPiece instances for Enums