// // 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 EventContentChangeExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static EventContentChangeExcel GetRootAsEventContentChangeExcel(ByteBuffer _bb) { return GetRootAsEventContentChangeExcel(_bb, new EventContentChangeExcel()); } public static EventContentChangeExcel GetRootAsEventContentChangeExcel(ByteBuffer _bb, EventContentChangeExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public EventContentChangeExcel __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 ChangeCount { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public bool IsLast { get { int o = __p.__offset(8); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public SCHALE.Common.FlatData.ParcelType RewardParcelType { get { int o = __p.__offset(10); return o != 0 ? (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ParcelType.None; } } public long RewardId { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public int RewardAmount { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public SCHALE.Common.FlatData.ParcelType ChangeCostType { get { int o = __p.__offset(16); return o != 0 ? (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ParcelType.None; } } public long ChangeCostId { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public int ChangeCostAmount { get { int o = __p.__offset(20); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public static Offset CreateEventContentChangeExcel(FlatBufferBuilder builder, long EventContentId = 0, long ChangeCount = 0, bool IsLast = false, SCHALE.Common.FlatData.ParcelType RewardParcelType = SCHALE.Common.FlatData.ParcelType.None, long RewardId = 0, int RewardAmount = 0, SCHALE.Common.FlatData.ParcelType ChangeCostType = SCHALE.Common.FlatData.ParcelType.None, long ChangeCostId = 0, int ChangeCostAmount = 0) { builder.StartTable(9); EventContentChangeExcel.AddChangeCostId(builder, ChangeCostId); EventContentChangeExcel.AddRewardId(builder, RewardId); EventContentChangeExcel.AddChangeCount(builder, ChangeCount); EventContentChangeExcel.AddEventContentId(builder, EventContentId); EventContentChangeExcel.AddChangeCostAmount(builder, ChangeCostAmount); EventContentChangeExcel.AddChangeCostType(builder, ChangeCostType); EventContentChangeExcel.AddRewardAmount(builder, RewardAmount); EventContentChangeExcel.AddRewardParcelType(builder, RewardParcelType); EventContentChangeExcel.AddIsLast(builder, IsLast); return EventContentChangeExcel.EndEventContentChangeExcel(builder); } public static void StartEventContentChangeExcel(FlatBufferBuilder builder) { builder.StartTable(9); } public static void AddEventContentId(FlatBufferBuilder builder, long eventContentId) { builder.AddLong(0, eventContentId, 0); } public static void AddChangeCount(FlatBufferBuilder builder, long changeCount) { builder.AddLong(1, changeCount, 0); } public static void AddIsLast(FlatBufferBuilder builder, bool isLast) { builder.AddBool(2, isLast, false); } public static void AddRewardParcelType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType rewardParcelType) { builder.AddInt(3, (int)rewardParcelType, 0); } public static void AddRewardId(FlatBufferBuilder builder, long rewardId) { builder.AddLong(4, rewardId, 0); } public static void AddRewardAmount(FlatBufferBuilder builder, int rewardAmount) { builder.AddInt(5, rewardAmount, 0); } public static void AddChangeCostType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType changeCostType) { builder.AddInt(6, (int)changeCostType, 0); } public static void AddChangeCostId(FlatBufferBuilder builder, long changeCostId) { builder.AddLong(7, changeCostId, 0); } public static void AddChangeCostAmount(FlatBufferBuilder builder, int changeCostAmount) { builder.AddInt(8, changeCostAmount, 0); } public static Offset EndEventContentChangeExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public EventContentChangeExcelT UnPack() { var _o = new EventContentChangeExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(EventContentChangeExcelT _o) { byte[] key = TableEncryptionService.CreateKey("EventContentChange"); _o.EventContentId = TableEncryptionService.Convert(this.EventContentId, key); _o.ChangeCount = TableEncryptionService.Convert(this.ChangeCount, key); _o.IsLast = TableEncryptionService.Convert(this.IsLast, key); _o.RewardParcelType = TableEncryptionService.Convert(this.RewardParcelType, key); _o.RewardId = TableEncryptionService.Convert(this.RewardId, key); _o.RewardAmount = TableEncryptionService.Convert(this.RewardAmount, key); _o.ChangeCostType = TableEncryptionService.Convert(this.ChangeCostType, key); _o.ChangeCostId = TableEncryptionService.Convert(this.ChangeCostId, key); _o.ChangeCostAmount = TableEncryptionService.Convert(this.ChangeCostAmount, key); } public static Offset Pack(FlatBufferBuilder builder, EventContentChangeExcelT _o) { if (_o == null) return default(Offset); return CreateEventContentChangeExcel( builder, _o.EventContentId, _o.ChangeCount, _o.IsLast, _o.RewardParcelType, _o.RewardId, _o.RewardAmount, _o.ChangeCostType, _o.ChangeCostId, _o.ChangeCostAmount); } } public class EventContentChangeExcelT { public long EventContentId { get; set; } public long ChangeCount { get; set; } public bool IsLast { get; set; } public SCHALE.Common.FlatData.ParcelType RewardParcelType { get; set; } public long RewardId { get; set; } public int RewardAmount { get; set; } public SCHALE.Common.FlatData.ParcelType ChangeCostType { get; set; } public long ChangeCostId { get; set; } public int ChangeCostAmount { get; set; } public EventContentChangeExcelT() { this.EventContentId = 0; this.ChangeCount = 0; this.IsLast = false; this.RewardParcelType = SCHALE.Common.FlatData.ParcelType.None; this.RewardId = 0; this.RewardAmount = 0; this.ChangeCostType = SCHALE.Common.FlatData.ParcelType.None; this.ChangeCostId = 0; this.ChangeCostAmount = 0; } } static public class EventContentChangeExcelVerify { 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 /*ChangeCount*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 8 /*IsLast*/, 1 /*bool*/, 1, false) && verifier.VerifyField(tablePos, 10 /*RewardParcelType*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, 4, false) && verifier.VerifyField(tablePos, 12 /*RewardId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 14 /*RewardAmount*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 16 /*ChangeCostType*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, 4, false) && verifier.VerifyField(tablePos, 18 /*ChangeCostId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 20 /*ChangeCostAmount*/, 4 /*int*/, 4, false) && verifier.VerifyTableEnd(tablePos); } } }