static int _s_set_token(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                Protocol.C2S_Login __cl_gen_to_be_invoked = (Protocol.C2S_Login)translator.FastGetCSObj(L, 1);
                __cl_gen_to_be_invoked.token = LuaAPI.lua_tostring(L, 2);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(0);
        }
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    Protocol.C2S_Login __cl_gen_ret = new Protocol.C2S_Login();
                    translator.Push(L, __cl_gen_ret);

                    return(1);
                }
            }
            catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to Protocol.C2S_Login constructor!"));
        }
        static int _m_Pack(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                Protocol.C2S_Login __cl_gen_to_be_invoked = (Protocol.C2S_Login)translator.FastGetCSObj(L, 1);


                int __gen_param_count = LuaAPI.lua_gettop(L);

                if (__gen_param_count == 3 && translator.Assignable <MsgPack>(L, 2) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3))
                {
                    MsgPack packer = (MsgPack)translator.GetObject(L, 2, typeof(MsgPack));
                    bool    clear  = LuaAPI.lua_toboolean(L, 3);

                    __cl_gen_to_be_invoked.Pack(packer, clear);



                    return(0);
                }
                if (__gen_param_count == 2 && translator.Assignable <MsgPack>(L, 2))
                {
                    MsgPack packer = (MsgPack)translator.GetObject(L, 2, typeof(MsgPack));

                    __cl_gen_to_be_invoked.Pack(packer);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to Protocol.C2S_Login.Pack!"));
        }
        static int _m_Unpack(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                Protocol.C2S_Login __cl_gen_to_be_invoked = (Protocol.C2S_Login)translator.FastGetCSObj(L, 1);



                {
                    MsgPack packer = (MsgPack)translator.GetObject(L, 2, typeof(MsgPack));

                    __cl_gen_to_be_invoked.Unpack(packer);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }