regenerate from Thryft to use write_struct_begin(name) and write_message_begin(name, type)