#if USE_UNI_LUA using LuaAPI = UniLua.Lua; using RealStatePtr = UniLua.ILuaState; using LuaCSFunction = UniLua.CSharpFunctionDelegate; #else using LuaAPI = XLua.LuaDLL.Lua; using RealStatePtr = System.IntPtr; using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; #endif using XLua; using System.Collections.Generic; namespace XLua.CSObjectWrap { using Utils = XLua.Utils; public class comadjustsdkAdjustAttributionWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(com.adjust.sdk.AdjustAttribution); Utils.BeginObjectRegister(type, L, translator, 0, 0, 12, 12); Utils.RegisterFunc(L, Utils.GETTER_IDX, "adid", _g_get_adid); Utils.RegisterFunc(L, Utils.GETTER_IDX, "network", _g_get_network); Utils.RegisterFunc(L, Utils.GETTER_IDX, "adgroup", _g_get_adgroup); Utils.RegisterFunc(L, Utils.GETTER_IDX, "campaign", _g_get_campaign); Utils.RegisterFunc(L, Utils.GETTER_IDX, "creative", _g_get_creative); Utils.RegisterFunc(L, Utils.GETTER_IDX, "clickLabel", _g_get_clickLabel); Utils.RegisterFunc(L, Utils.GETTER_IDX, "trackerName", _g_get_trackerName); Utils.RegisterFunc(L, Utils.GETTER_IDX, "trackerToken", _g_get_trackerToken); Utils.RegisterFunc(L, Utils.GETTER_IDX, "costType", _g_get_costType); Utils.RegisterFunc(L, Utils.GETTER_IDX, "costAmount", _g_get_costAmount); Utils.RegisterFunc(L, Utils.GETTER_IDX, "costCurrency", _g_get_costCurrency); Utils.RegisterFunc(L, Utils.GETTER_IDX, "fbInstallReferrer", _g_get_fbInstallReferrer); Utils.RegisterFunc(L, Utils.SETTER_IDX, "adid", _s_set_adid); Utils.RegisterFunc(L, Utils.SETTER_IDX, "network", _s_set_network); Utils.RegisterFunc(L, Utils.SETTER_IDX, "adgroup", _s_set_adgroup); Utils.RegisterFunc(L, Utils.SETTER_IDX, "campaign", _s_set_campaign); Utils.RegisterFunc(L, Utils.SETTER_IDX, "creative", _s_set_creative); Utils.RegisterFunc(L, Utils.SETTER_IDX, "clickLabel", _s_set_clickLabel); Utils.RegisterFunc(L, Utils.SETTER_IDX, "trackerName", _s_set_trackerName); Utils.RegisterFunc(L, Utils.SETTER_IDX, "trackerToken", _s_set_trackerToken); Utils.RegisterFunc(L, Utils.SETTER_IDX, "costType", _s_set_costType); Utils.RegisterFunc(L, Utils.SETTER_IDX, "costAmount", _s_set_costAmount); Utils.RegisterFunc(L, Utils.SETTER_IDX, "costCurrency", _s_set_costCurrency); Utils.RegisterFunc(L, Utils.SETTER_IDX, "fbInstallReferrer", _s_set_fbInstallReferrer); Utils.EndObjectRegister(type, L, translator, null, null, null, null, null); Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0); Utils.EndClassRegister(type, L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if(LuaAPI.lua_gettop(L) == 1) { var gen_ret = new com.adjust.sdk.AdjustAttribution(); translator.Push(L, gen_ret); return 1; } if(LuaAPI.lua_gettop(L) == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) { string _jsonString = LuaAPI.lua_tostring(L, 2); var gen_ret = new com.adjust.sdk.AdjustAttribution(_jsonString); translator.Push(L, gen_ret); return 1; } if(LuaAPI.lua_gettop(L) == 2 && translator.Assignable>(L, 2)) { System.Collections.Generic.Dictionary _dicAttributionData = (System.Collections.Generic.Dictionary)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary)); var gen_ret = new com.adjust.sdk.AdjustAttribution(_dicAttributionData); translator.Push(L, 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 com.adjust.sdk.AdjustAttribution constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_adid(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.adid); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_network(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.network); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_adgroup(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.adgroup); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_campaign(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.campaign); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_creative(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.creative); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_clickLabel(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.clickLabel); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_trackerName(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.trackerName); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_trackerToken(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.trackerToken); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_costType(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.costType); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_costAmount(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); translator.PushAny(L, gen_to_be_invoked.costAmount); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_costCurrency(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.costCurrency); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_fbInstallReferrer(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.fbInstallReferrer); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_adid(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); gen_to_be_invoked.adid = LuaAPI.lua_tostring(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_network(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); gen_to_be_invoked.network = LuaAPI.lua_tostring(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_adgroup(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); gen_to_be_invoked.adgroup = LuaAPI.lua_tostring(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_campaign(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); gen_to_be_invoked.campaign = LuaAPI.lua_tostring(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_creative(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); gen_to_be_invoked.creative = LuaAPI.lua_tostring(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_clickLabel(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); gen_to_be_invoked.clickLabel = LuaAPI.lua_tostring(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_trackerName(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); gen_to_be_invoked.trackerName = LuaAPI.lua_tostring(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_trackerToken(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); gen_to_be_invoked.trackerToken = LuaAPI.lua_tostring(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_costType(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); gen_to_be_invoked.costType = LuaAPI.lua_tostring(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_costAmount(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); System.Nullable gen_value;translator.Get(L, 2, out gen_value); gen_to_be_invoked.costAmount = gen_value; } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_costCurrency(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); gen_to_be_invoked.costCurrency = LuaAPI.lua_tostring(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_fbInstallReferrer(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); com.adjust.sdk.AdjustAttribution gen_to_be_invoked = (com.adjust.sdk.AdjustAttribution)translator.FastGetCSObj(L, 1); gen_to_be_invoked.fbInstallReferrer = LuaAPI.lua_tostring(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } } }