static int IntToEnum(IntPtr L)
    {
        int arg0 = (int)LuaDLL.lua_tonumber(L, 1);

        Logic.Enums.BaseResType o = (Logic.Enums.BaseResType)arg0;
        ToLua.Push(L, o);
        return(1);
    }
    static int _CreateLogic_Game_Model_GameResData(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 0)
            {
                Logic.Game.Model.GameResData obj = new Logic.Game.Model.GameResData();
                ToLua.PushObject(L, obj);
                return(1);
            }
            else if (count == 1 && TypeChecker.CheckTypes(L, typeof(string)))
            {
                string arg0 = ToLua.CheckString(L, 1);
                Logic.Game.Model.GameResData obj = new Logic.Game.Model.GameResData(arg0);
                ToLua.PushObject(L, obj);
                return(1);
            }
            else if (count == 4 && TypeChecker.CheckTypes(L, typeof(int), typeof(int), typeof(int), typeof(int)))
            {
                int arg0 = (int)LuaDLL.luaL_checknumber(L, 1);
                int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
                int arg2 = (int)LuaDLL.luaL_checknumber(L, 3);
                int arg3 = (int)LuaDLL.luaL_checknumber(L, 4);
                Logic.Game.Model.GameResData obj = new Logic.Game.Model.GameResData(arg0, arg1, arg2, arg3);
                ToLua.PushObject(L, obj);
                return(1);
            }
            else if (count == 4 && TypeChecker.CheckTypes(L, typeof(Logic.Enums.BaseResType), typeof(int), typeof(int), typeof(int)))
            {
                Logic.Enums.BaseResType arg0 = (Logic.Enums.BaseResType)ToLua.CheckObject(L, 1, typeof(Logic.Enums.BaseResType));
                int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
                int arg2 = (int)LuaDLL.luaL_checknumber(L, 3);
                int arg3 = (int)LuaDLL.luaL_checknumber(L, 4);
                Logic.Game.Model.GameResData obj = new Logic.Game.Model.GameResData(arg0, arg1, arg2, arg3);
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: Logic.Game.Model.GameResData.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
    static int set_type(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            Logic.Game.Model.GameResData obj  = (Logic.Game.Model.GameResData)o;
            Logic.Enums.BaseResType      arg0 = (Logic.Enums.BaseResType)ToLua.CheckObject(L, 2, typeof(Logic.Enums.BaseResType));
            obj.type = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index type on a nil value" : e.Message));
        }
    }
    static int get_type(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            Logic.Game.Model.GameResData obj = (Logic.Game.Model.GameResData)o;
            Logic.Enums.BaseResType      ret = obj.type;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index type on a nil value" : e.Message));
        }
    }
 static int set(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 5);
         Logic.Game.Model.GameResData obj  = (Logic.Game.Model.GameResData)ToLua.CheckObject(L, 1, typeof(Logic.Game.Model.GameResData));
         Logic.Enums.BaseResType      arg0 = (Logic.Enums.BaseResType)ToLua.CheckObject(L, 2, typeof(Logic.Enums.BaseResType));
         int arg1 = (int)LuaDLL.luaL_checknumber(L, 3);
         int arg2 = (int)LuaDLL.luaL_checknumber(L, 4);
         int arg3 = (int)LuaDLL.luaL_checknumber(L, 5);
         obj.set(arg0, arg1, arg2, arg3);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }