generate thirft code