THRIFT-1876 Use enum names instead of casted integers in assignments

Patch: Jens Geyer