316 lines
12 KiB
C#
316 lines
12 KiB
C#
#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 comadjustsdkAdjustSessionFailureWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(com.adjust.sdk.AdjustSessionFailure);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 2, 5, 5);
|
|
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "BuildJsonResponseFromString", _m_BuildJsonResponseFromString);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetJsonResponse", _m_GetJsonResponse);
|
|
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Adid", _g_get_Adid);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Message", _g_get_Message);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Timestamp", _g_get_Timestamp);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "WillRetry", _g_get_WillRetry);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "JsonResponse", _g_get_JsonResponse);
|
|
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "Adid", _s_set_Adid);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "Message", _s_set_Message);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "Timestamp", _s_set_Timestamp);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "WillRetry", _s_set_WillRetry);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "JsonResponse", _s_set_JsonResponse);
|
|
|
|
|
|
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.AdjustSessionFailure();
|
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
|
}
|
|
if(LuaAPI.lua_gettop(L) == 2 && translator.Assignable<System.Collections.Generic.Dictionary<string, string>>(L, 2))
|
|
{
|
|
System.Collections.Generic.Dictionary<string, string> _sessionFailureDataMap = (System.Collections.Generic.Dictionary<string, string>)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary<string, string>));
|
|
|
|
var gen_ret = new com.adjust.sdk.AdjustSessionFailure(_sessionFailureDataMap);
|
|
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.AdjustSessionFailure(_jsonString);
|
|
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.AdjustSessionFailure constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_BuildJsonResponseFromString(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
com.adjust.sdk.AdjustSessionFailure gen_to_be_invoked = (com.adjust.sdk.AdjustSessionFailure)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _jsonResponseString = LuaAPI.lua_tostring(L, 2);
|
|
|
|
gen_to_be_invoked.BuildJsonResponseFromString( _jsonResponseString );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetJsonResponse(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
com.adjust.sdk.AdjustSessionFailure gen_to_be_invoked = (com.adjust.sdk.AdjustSessionFailure)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.GetJsonResponse( );
|
|
LuaAPI.lua_pushstring(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_Adid(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
com.adjust.sdk.AdjustSessionFailure gen_to_be_invoked = (com.adjust.sdk.AdjustSessionFailure)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_Message(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
com.adjust.sdk.AdjustSessionFailure gen_to_be_invoked = (com.adjust.sdk.AdjustSessionFailure)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.Message);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_Timestamp(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
com.adjust.sdk.AdjustSessionFailure gen_to_be_invoked = (com.adjust.sdk.AdjustSessionFailure)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.Timestamp);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_WillRetry(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
com.adjust.sdk.AdjustSessionFailure gen_to_be_invoked = (com.adjust.sdk.AdjustSessionFailure)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.WillRetry);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_JsonResponse(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
com.adjust.sdk.AdjustSessionFailure gen_to_be_invoked = (com.adjust.sdk.AdjustSessionFailure)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.JsonResponse);
|
|
} 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.AdjustSessionFailure gen_to_be_invoked = (com.adjust.sdk.AdjustSessionFailure)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_Message(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
com.adjust.sdk.AdjustSessionFailure gen_to_be_invoked = (com.adjust.sdk.AdjustSessionFailure)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.Message = 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_Timestamp(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
com.adjust.sdk.AdjustSessionFailure gen_to_be_invoked = (com.adjust.sdk.AdjustSessionFailure)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.Timestamp = 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_WillRetry(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
com.adjust.sdk.AdjustSessionFailure gen_to_be_invoked = (com.adjust.sdk.AdjustSessionFailure)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.WillRetry = LuaAPI.lua_toboolean(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_JsonResponse(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
com.adjust.sdk.AdjustSessionFailure gen_to_be_invoked = (com.adjust.sdk.AdjustSessionFailure)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.JsonResponse = (System.Collections.Generic.Dictionary<string, object>)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary<string, object>));
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|