added the oneof, atmostoneof etc. from TypeChef's original code