Unity.Services.Analytics.api 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  1. // This file is generated. Do not modify by hand.
  2. // XML documentation file not found. To check if public methods have XML comments,
  3. // make sure the XML doc file is present and located next to the scraped dll
  4. namespace Unity.Services.Analytics
  5. {
  6. public class AcquisitionSourceParameters
  7. {
  8. public string CampaignId;
  9. public string CampaignName;
  10. public string CampaignType;
  11. public string Channel;
  12. public System.Nullable<float> Cost;
  13. public string CostCurrency;
  14. public string CreativeId;
  15. public string Network;
  16. public string Provider;
  17. public AcquisitionSourceParameters() {}
  18. }
  19. public enum AdCompletionStatus
  20. {
  21. public const Unity.Services.Analytics.AdCompletionStatus Completed = 0;
  22. public const Unity.Services.Analytics.AdCompletionStatus Incomplete = 2;
  23. public const Unity.Services.Analytics.AdCompletionStatus Partial = 1;
  24. public int value__;
  25. }
  26. public struct AdImpressionParameters
  27. {
  28. public Unity.Services.Analytics.AdCompletionStatus AdCompletionStatus;
  29. public System.Nullable<double> AdEcpmUsd;
  30. public System.Nullable<bool> AdHasClicked;
  31. public string AdImpressionID;
  32. public System.Nullable<long> AdLengthMs;
  33. public string AdMediaType;
  34. public Unity.Services.Analytics.AdProvider AdProvider;
  35. public string AdSource;
  36. public string AdStatusCallback;
  37. public string AdStoreDstID;
  38. public System.Nullable<long> AdTimeCloseButtonShownMs;
  39. public System.Nullable<long> AdTimeWatchedMs;
  40. public string PlacementID;
  41. public string PlacementName;
  42. public System.Nullable<Unity.Services.Analytics.AdPlacementType> PlacementType;
  43. public string SdkVersion;
  44. }
  45. public enum AdPlacementType
  46. {
  47. public const Unity.Services.Analytics.AdPlacementType BANNER = 0;
  48. public const Unity.Services.Analytics.AdPlacementType INTERSTITIAL = 2;
  49. public const Unity.Services.Analytics.AdPlacementType OTHER = 3;
  50. public const Unity.Services.Analytics.AdPlacementType REWARDED = 1;
  51. public int value__;
  52. }
  53. public enum AdProvider
  54. {
  55. public const Unity.Services.Analytics.AdProvider AdColony = 0;
  56. public const Unity.Services.Analytics.AdProvider AdMob = 1;
  57. public const Unity.Services.Analytics.AdProvider Amazon = 2;
  58. public const Unity.Services.Analytics.AdProvider AppLovin = 3;
  59. public const Unity.Services.Analytics.AdProvider ChartBoost = 4;
  60. public const Unity.Services.Analytics.AdProvider Facebook = 5;
  61. public const Unity.Services.Analytics.AdProvider Fyber = 6;
  62. public const Unity.Services.Analytics.AdProvider Hyprmx = 7;
  63. public const Unity.Services.Analytics.AdProvider Inmobi = 8;
  64. public const Unity.Services.Analytics.AdProvider IrnSource = 14;
  65. public const Unity.Services.Analytics.AdProvider Maio = 9;
  66. public const Unity.Services.Analytics.AdProvider Other = 15;
  67. public const Unity.Services.Analytics.AdProvider Pangle = 10;
  68. public const Unity.Services.Analytics.AdProvider Tapjoy = 11;
  69. public const Unity.Services.Analytics.AdProvider UnityAds = 12;
  70. public int value__;
  71. public const Unity.Services.Analytics.AdProvider Vungle = 13;
  72. }
  73. public class AnalyticsLifetime : UnityEngine.MonoBehaviour
  74. {
  75. public AnalyticsLifetime() {}
  76. }
  77. public static class AnalyticsService
  78. {
  79. public static Unity.Services.Analytics.IAnalyticsService Instance { get; }
  80. }
  81. public class ConsentCheckException : Unity.Services.Core.RequestFailedException
  82. {
  83. [UnityEngine.Scripting.Preserve] public Unity.Services.Analytics.ConsentCheckExceptionReason Reason { get; }
  84. public ConsentCheckException(Unity.Services.Analytics.ConsentCheckExceptionReason reason, int errorCode, string message, System.Exception innerException) {}
  85. }
  86. [UnityEngine.Scripting.Preserve] public enum ConsentCheckExceptionReason
  87. {
  88. public const Unity.Services.Analytics.ConsentCheckExceptionReason ConsentFlowNotKnown = 4;
  89. public const Unity.Services.Analytics.ConsentCheckExceptionReason DeserializationIssue = 1;
  90. public const Unity.Services.Analytics.ConsentCheckExceptionReason InvalidConsentFlow = 3;
  91. public const Unity.Services.Analytics.ConsentCheckExceptionReason NoInternetConnection = 2;
  92. public const Unity.Services.Analytics.ConsentCheckExceptionReason Unknown = 0;
  93. public int value__;
  94. }
  95. public static class ContainerObject
  96. {
  97. public static void DestroyContainer();
  98. }
  99. [System.Obsolete(@"The interface provided by this static class has moved to AnalyticsService.Instance, and should be accessed from there instead. This API will be removed in an upcoming release.")] public static class Events
  100. {
  101. [System.Obsolete(@"The interface provided by this field has moved to AnalyticsService.Instance.PrivacyUrl, and should be accessed from there instead. This API will be removed in an upcoming release.")] public static readonly string PrivacyUrl;
  102. [System.Obsolete(@"The interface provided by this method has moved to AnalyticsService.Instance.AdImpression, and should be accessed from there instead. This API will be removed in an upcoming release.")] public static void AdImpression(Unity.Services.Analytics.Events.AdImpressionArgs args);
  103. [System.Diagnostics.DebuggerStepThrough] [System.Obsolete(@"The interface provided by this method has moved to AnalyticsService.Instance.CheckForRequiredConsents, and should be accessed from there instead. This API will be removed in an upcoming release.")] [System.Runtime.CompilerServices.AsyncStateMachine(typeof(Unity.Services.Analytics.Events.<CheckForRequiredConsents>d__4))] public static System.Threading.Tasks.Task<System.Collections.Generic.List<string>> CheckForRequiredConsents();
  104. [System.Obsolete(@"The interface provided by this method has moved to AnalyticsService.Instance.CustomData, and should be accessed from there instead. This API will be removed in an upcoming release.")] public static void CustomData(string eventName, System.Collections.Generic.IDictionary<string, object> eventParams);
  105. [System.Obsolete(@"The interface provided by this method has moved to AnalyticsService.Instance.Flush, and should be accessed from there instead. This API will be removed in an upcoming release.")] public static void Flush();
  106. [System.Obsolete(@"The interface provided by this method has moved to AnalyticsService.Instance.OptOut, and should be accessed from there instead. This API will be removed in an upcoming release.")] public static void OptOut();
  107. [System.Obsolete(@"The interface provided by this method has moved to AnalyticsService.Instance.ProvideOptInConsent, and should be accessed from there instead. This API will be removed in an upcoming release.")] public static void ProvideOptInConsent(string identifier, bool consent);
  108. [System.Obsolete(@"The interface provided by this method has moved to AnalyticsService.Instance.Transaction, and should be accessed from there instead. This API will be removed in an upcoming release.")] public static void Transaction(Unity.Services.Analytics.Events.TransactionParameters transactionParameters);
  109. [System.Obsolete(@"This enum has been moved outside the Events class. Please use that instead. This enum will be removed in an upcoming release.")] public enum AdCompletionStatus
  110. {
  111. public const Unity.Services.Analytics.Events.AdCompletionStatus Completed = 0;
  112. public const Unity.Services.Analytics.Events.AdCompletionStatus Incomplete = 2;
  113. public const Unity.Services.Analytics.Events.AdCompletionStatus Partial = 1;
  114. public int value__;
  115. }
  116. [System.Obsolete(@"This class has been aligned with other interfaces. Please use AdImpressionParameters with the AnalyticsService.Instance API instead. This class will be removed in an upcoming release")] public class AdImpressionArgs
  117. {
  118. public Unity.Services.Analytics.Events.AdCompletionStatus AdCompletionStatus { get; set; }
  119. public System.Nullable<double> AdEcpmUsd { get; set; }
  120. public System.Nullable<bool> AdHasClicked { get; set; }
  121. public string AdImpressionID { get; set; }
  122. public System.Nullable<long> AdLengthMs { get; set; }
  123. public string AdMediaType { get; set; }
  124. public Unity.Services.Analytics.Events.AdProvider AdProvider { get; set; }
  125. public string AdSource { get; set; }
  126. public string AdStatusCallback { get; set; }
  127. public string AdStoreDstID { get; set; }
  128. public System.Nullable<long> AdTimeCloseButtonShownMs { get; set; }
  129. public System.Nullable<long> AdTimeWatchedMs { get; set; }
  130. public string PlacementID { get; set; }
  131. public string PlacementName { get; set; }
  132. public string PlacementType { get; set; }
  133. public string SdkVersion { get; set; }
  134. public AdImpressionArgs(Unity.Services.Analytics.Events.AdCompletionStatus adCompletionStatus, Unity.Services.Analytics.Events.AdProvider adProvider, string placementID, string placementName) {}
  135. }
  136. [System.Obsolete(@"This enum has been moved outside the Events class. Please use that instead. This enum will be removed in an upcoming release.")] public enum AdProvider
  137. {
  138. public const Unity.Services.Analytics.Events.AdProvider AdColony = 0;
  139. public const Unity.Services.Analytics.Events.AdProvider AdMob = 1;
  140. public const Unity.Services.Analytics.Events.AdProvider Amazon = 2;
  141. public const Unity.Services.Analytics.Events.AdProvider AppLovin = 3;
  142. public const Unity.Services.Analytics.Events.AdProvider ChartBoost = 4;
  143. public const Unity.Services.Analytics.Events.AdProvider Facebook = 5;
  144. public const Unity.Services.Analytics.Events.AdProvider Fyber = 6;
  145. public const Unity.Services.Analytics.Events.AdProvider Hyprmx = 7;
  146. public const Unity.Services.Analytics.Events.AdProvider Inmobi = 8;
  147. public const Unity.Services.Analytics.Events.AdProvider IrnSource = 14;
  148. public const Unity.Services.Analytics.Events.AdProvider Maio = 9;
  149. public const Unity.Services.Analytics.Events.AdProvider Other = 15;
  150. public const Unity.Services.Analytics.Events.AdProvider Pangle = 10;
  151. public const Unity.Services.Analytics.Events.AdProvider Tapjoy = 11;
  152. public const Unity.Services.Analytics.Events.AdProvider UnityAds = 12;
  153. public int value__;
  154. public const Unity.Services.Analytics.Events.AdProvider Vungle = 13;
  155. }
  156. [System.Obsolete(@"This struct has been moved outside the Events class, and it's parameters now conform to C# guidelines. Please use the standalone struct instead. This struct will be removed in an upcoming release.")] public struct Item
  157. {
  158. public long itemAmount;
  159. public string itemName;
  160. public string itemType;
  161. }
  162. [System.Obsolete(@"This struct has been moved outside the Events class, and it's parameters now conform to C# guidelines. Please use the standalone struct instead. This struct will be removed in an upcoming release.")] public struct Product
  163. {
  164. public System.Collections.Generic.List<Unity.Services.Analytics.Events.Item> items;
  165. public System.Nullable<Unity.Services.Analytics.Events.RealCurrency> realCurrency;
  166. public System.Collections.Generic.List<Unity.Services.Analytics.Events.VirtualCurrency> virtualCurrencies;
  167. }
  168. [System.Obsolete(@"This struct has been moved outside the Events class, and it's parameters now conform to C# guidelines. Please use the standalone struct instead. This struct will be removed in an upcoming release.")] public struct RealCurrency
  169. {
  170. public long realCurrencyAmount;
  171. public string realCurrencyType;
  172. }
  173. [System.Obsolete(@"This struct has been moved outside the Events class, and it's parameters now conform to C# guidelines. Please use the standalone struct instead. This struct will be removed in an upcoming release.")] public struct TransactionParameters
  174. {
  175. [System.Obsolete] public System.Nullable<bool> isInitiator;
  176. public string paymentCountry;
  177. public string productID;
  178. public Unity.Services.Analytics.Events.Product productsReceived;
  179. public Unity.Services.Analytics.Events.Product productsSpent;
  180. public System.Nullable<long> revenueValidated;
  181. public string storeID;
  182. public string storeItemID;
  183. public string storeItemSkuID;
  184. public string storeSourceID;
  185. public string transactionID;
  186. public string transactionName;
  187. public string transactionReceipt;
  188. public string transactionReceiptSignature;
  189. public System.Nullable<Unity.Services.Analytics.Events.TransactionServer> transactionServer;
  190. public Unity.Services.Analytics.Events.TransactionType transactionType;
  191. public string transactorID;
  192. }
  193. [System.Obsolete(@"This enum has been moved outside the Events class, the standalone enum should be used instead. This enum will be removed in an upcoming release.")] public enum TransactionServer
  194. {
  195. public const Unity.Services.Analytics.Events.TransactionServer AMAZON = 1;
  196. public const Unity.Services.Analytics.Events.TransactionServer APPLE = 0;
  197. public const Unity.Services.Analytics.Events.TransactionServer GOOGLE = 2;
  198. public int value__;
  199. }
  200. [System.Obsolete(@"This enum has been moved outside the Events class, the standalone enum should be used instead. This enum will be removed in an upcoming release.")] public enum TransactionType
  201. {
  202. public const Unity.Services.Analytics.Events.TransactionType INVALID = 0;
  203. public const Unity.Services.Analytics.Events.TransactionType PURCHASE = 2;
  204. public const Unity.Services.Analytics.Events.TransactionType SALE = 1;
  205. public const Unity.Services.Analytics.Events.TransactionType TRADE = 3;
  206. public int value__;
  207. }
  208. [System.Obsolete(@"This struct has been moved outside the Events class, and it's parameters now conform to C# guidelines. Please use the standalone struct instead. This struct will be removed in an upcoming release.")] public struct VirtualCurrency
  209. {
  210. public long virtualCurrencyAmount;
  211. public string virtualCurrencyName;
  212. public string virtualCurrencyType;
  213. }
  214. }
  215. public interface IAnalyticsService
  216. {
  217. public abstract string PrivacyUrl { get; }
  218. public abstract void AcquisitionSource(Unity.Services.Analytics.AcquisitionSourceParameters acquisitionSourceParameters);
  219. public abstract void AdImpression(Unity.Services.Analytics.AdImpressionParameters parameters);
  220. public abstract System.Threading.Tasks.Task<System.Collections.Generic.List<string>> CheckForRequiredConsents();
  221. public abstract long ConvertCurrencyToMinorUnits(string currencyCode, double value);
  222. public abstract void CustomData(string eventName, System.Collections.Generic.IDictionary<string, object> eventParams);
  223. public abstract void Flush();
  224. public abstract void OptOut();
  225. public abstract void ProvideOptInConsent(string identifier, bool consent);
  226. public abstract void RecordInternalEvent(Unity.Services.Analytics.Internal.Event eventToRecord);
  227. public abstract System.Threading.Tasks.Task SetAnalyticsEnabled(bool enabled);
  228. public abstract void Transaction(Unity.Services.Analytics.TransactionParameters transactionParameters);
  229. public abstract void TransactionFailed(Unity.Services.Analytics.TransactionFailedParameters parameters);
  230. }
  231. public struct Item
  232. {
  233. public long ItemAmount;
  234. public string ItemName;
  235. public string ItemType;
  236. }
  237. public struct Product
  238. {
  239. public System.Collections.Generic.List<Unity.Services.Analytics.Item> Items;
  240. public System.Nullable<Unity.Services.Analytics.RealCurrency> RealCurrency;
  241. public System.Collections.Generic.List<Unity.Services.Analytics.VirtualCurrency> VirtualCurrencies;
  242. }
  243. public struct RealCurrency
  244. {
  245. public long RealCurrencyAmount;
  246. public string RealCurrencyType;
  247. }
  248. public static class SdkVersion
  249. {
  250. public static readonly string SDK_VERSION;
  251. }
  252. public struct TransactionFailedParameters
  253. {
  254. public string AmazonUserID;
  255. public System.Nullable<long> EngagementID;
  256. public string FailureReason;
  257. public string GameStoreID;
  258. public System.Nullable<bool> IsInitiator;
  259. public string PaymentCountry;
  260. public string ProductID;
  261. public Unity.Services.Analytics.Product ProductsReceived;
  262. public Unity.Services.Analytics.Product ProductsSpent;
  263. public System.Nullable<long> RevenueValidated;
  264. public string StoreID;
  265. public string StoreItemID;
  266. public string StoreItemSkuID;
  267. public string StoreSourceID;
  268. public string TransactionID;
  269. public string TransactionName;
  270. public System.Nullable<Unity.Services.Analytics.TransactionServer> TransactionServer;
  271. public Unity.Services.Analytics.TransactionType TransactionType;
  272. }
  273. public struct TransactionParameters
  274. {
  275. public string PaymentCountry;
  276. public string ProductID;
  277. public Unity.Services.Analytics.Product ProductsReceived;
  278. public Unity.Services.Analytics.Product ProductsSpent;
  279. public System.Nullable<long> RevenueValidated;
  280. public string StoreID;
  281. public string StoreItemID;
  282. public string StoreItemSkuID;
  283. public string StoreSourceID;
  284. public string TransactionID;
  285. public string TransactionName;
  286. public string TransactionReceipt;
  287. public string TransactionReceiptSignature;
  288. public System.Nullable<Unity.Services.Analytics.TransactionServer> TransactionServer;
  289. public Unity.Services.Analytics.TransactionType TransactionType;
  290. public string TransactorID;
  291. }
  292. public enum TransactionServer
  293. {
  294. public const Unity.Services.Analytics.TransactionServer AMAZON = 1;
  295. public const Unity.Services.Analytics.TransactionServer APPLE = 0;
  296. public const Unity.Services.Analytics.TransactionServer GOOGLE = 2;
  297. public int value__;
  298. }
  299. public enum TransactionType
  300. {
  301. public const Unity.Services.Analytics.TransactionType INVALID = 0;
  302. public const Unity.Services.Analytics.TransactionType PURCHASE = 2;
  303. public const Unity.Services.Analytics.TransactionType SALE = 1;
  304. public const Unity.Services.Analytics.TransactionType TRADE = 3;
  305. public int value__;
  306. }
  307. public struct VirtualCurrency
  308. {
  309. public long VirtualCurrencyAmount;
  310. public string VirtualCurrencyName;
  311. public Unity.Services.Analytics.VirtualCurrencyType VirtualCurrencyType;
  312. }
  313. public enum VirtualCurrencyType
  314. {
  315. public const Unity.Services.Analytics.VirtualCurrencyType GRIND = 0;
  316. public const Unity.Services.Analytics.VirtualCurrencyType PREMIUM = 1;
  317. public const Unity.Services.Analytics.VirtualCurrencyType PREMIUM_GRIND = 2;
  318. public int value__;
  319. }
  320. }
  321. namespace Unity.Services.Analytics.Internal
  322. {
  323. public class Event
  324. {
  325. public string Name { get; }
  326. public Unity.Services.Analytics.Internal.EventData Parameters { get; }
  327. public System.Nullable<int> Version { get; }
  328. public Event(string name, System.Nullable<int> version) {}
  329. }
  330. public class EventData
  331. {
  332. public System.Collections.Generic.Dictionary<string, object> Data { get; }
  333. public void AddBatteryLoad();
  334. public void AddBuildGuuid();
  335. public void AddClientVersion();
  336. public void AddConnectionType();
  337. public void AddGameBundleID();
  338. public void AddPlatform();
  339. public void AddStdParamData(string sdkMethod, string uasID);
  340. public void AddUserCountry();
  341. public void Set(string key, bool value);
  342. public void Set(string key, double value);
  343. public void Set(string key, int value);
  344. public void Set(string key, long value);
  345. public void Set(string key, object value);
  346. public void Set(string key, float value);
  347. public void Set(string key, string value);
  348. }
  349. }
  350. namespace Unity.Services.Analytics.Internal.Platform
  351. {
  352. public static class UserCountry
  353. {
  354. public static string Name();
  355. }
  356. }
  357. namespace Unity.Services.Analytics.Platform
  358. {
  359. public static class Runtime
  360. {
  361. public static string Name();
  362. }
  363. }