// // automatically generated by the FlatBuffers compiler, do not modify // namespace SCHALE.Common.FlatData { using global::System; using global::System.Collections.Generic; using global::SCHALE.Common.Crypto; using global::Google.FlatBuffers; public struct EventContentMiniEventTokenExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static EventContentMiniEventTokenExcel GetRootAsEventContentMiniEventTokenExcel(ByteBuffer _bb) { return GetRootAsEventContentMiniEventTokenExcel(_bb, new EventContentMiniEventTokenExcel()); } public static EventContentMiniEventTokenExcel GetRootAsEventContentMiniEventTokenExcel(ByteBuffer _bb, EventContentMiniEventTokenExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public EventContentMiniEventTokenExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public long EventContentId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long ItemUniqueId { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long MaximumAmount { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public static Offset CreateEventContentMiniEventTokenExcel(FlatBufferBuilder builder, long EventContentId = 0, long ItemUniqueId = 0, long MaximumAmount = 0) { builder.StartTable(3); EventContentMiniEventTokenExcel.AddMaximumAmount(builder, MaximumAmount); EventContentMiniEventTokenExcel.AddItemUniqueId(builder, ItemUniqueId); EventContentMiniEventTokenExcel.AddEventContentId(builder, EventContentId); return EventContentMiniEventTokenExcel.EndEventContentMiniEventTokenExcel(builder); } public static void StartEventContentMiniEventTokenExcel(FlatBufferBuilder builder) { builder.StartTable(3); } public static void AddEventContentId(FlatBufferBuilder builder, long eventContentId) { builder.AddLong(0, eventContentId, 0); } public static void AddItemUniqueId(FlatBufferBuilder builder, long itemUniqueId) { builder.AddLong(1, itemUniqueId, 0); } public static void AddMaximumAmount(FlatBufferBuilder builder, long maximumAmount) { builder.AddLong(2, maximumAmount, 0); } public static Offset EndEventContentMiniEventTokenExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public EventContentMiniEventTokenExcelT UnPack() { var _o = new EventContentMiniEventTokenExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(EventContentMiniEventTokenExcelT _o) { byte[] key = TableEncryptionService.CreateKey("EventContentMiniEventToken"); _o.EventContentId = TableEncryptionService.Convert(this.EventContentId, key); _o.ItemUniqueId = TableEncryptionService.Convert(this.ItemUniqueId, key); _o.MaximumAmount = TableEncryptionService.Convert(this.MaximumAmount, key); } public static Offset Pack(FlatBufferBuilder builder, EventContentMiniEventTokenExcelT _o) { if (_o == null) return default(Offset); return CreateEventContentMiniEventTokenExcel( builder, _o.EventContentId, _o.ItemUniqueId, _o.MaximumAmount); } } public class EventContentMiniEventTokenExcelT { public long EventContentId { get; set; } public long ItemUniqueId { get; set; } public long MaximumAmount { get; set; } public EventContentMiniEventTokenExcelT() { this.EventContentId = 0; this.ItemUniqueId = 0; this.MaximumAmount = 0; } } static public class EventContentMiniEventTokenExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*EventContentId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 6 /*ItemUniqueId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 8 /*MaximumAmount*/, 8 /*long*/, 8, false) && verifier.VerifyTableEnd(tablePos); } } }