// // automatically generated by the FlatBuffers compiler, do not modify // namespace SCHALE.Common.FlatData { using global::System; using global::System.Collections.Generic; using global::Google.FlatBuffers; public struct EventContentChangeScenarioExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static EventContentChangeScenarioExcel GetRootAsEventContentChangeScenarioExcel(ByteBuffer _bb) { return GetRootAsEventContentChangeScenarioExcel(_bb, new EventContentChangeScenarioExcel()); } public static EventContentChangeScenarioExcel GetRootAsEventContentChangeScenarioExcel(ByteBuffer _bb, EventContentChangeScenarioExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public EventContentChangeScenarioExcel __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 SCHALE.Common.FlatData.EventChangeType ChangeType { get { int o = __p.__offset(6); return o != 0 ? (SCHALE.Common.FlatData.EventChangeType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.EventChangeType.MainSub; } } public long ChangeCount { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long ScenarioGroupId { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public static Offset CreateEventContentChangeScenarioExcel(FlatBufferBuilder builder, long EventContentId = 0, SCHALE.Common.FlatData.EventChangeType ChangeType = SCHALE.Common.FlatData.EventChangeType.MainSub, long ChangeCount = 0, long ScenarioGroupId = 0) { builder.StartTable(4); EventContentChangeScenarioExcel.AddScenarioGroupId(builder, ScenarioGroupId); EventContentChangeScenarioExcel.AddChangeCount(builder, ChangeCount); EventContentChangeScenarioExcel.AddEventContentId(builder, EventContentId); EventContentChangeScenarioExcel.AddChangeType(builder, ChangeType); return EventContentChangeScenarioExcel.EndEventContentChangeScenarioExcel(builder); } public static void StartEventContentChangeScenarioExcel(FlatBufferBuilder builder) { builder.StartTable(4); } public static void AddEventContentId(FlatBufferBuilder builder, long eventContentId) { builder.AddLong(0, eventContentId, 0); } public static void AddChangeType(FlatBufferBuilder builder, SCHALE.Common.FlatData.EventChangeType changeType) { builder.AddInt(1, (int)changeType, 0); } public static void AddChangeCount(FlatBufferBuilder builder, long changeCount) { builder.AddLong(2, changeCount, 0); } public static void AddScenarioGroupId(FlatBufferBuilder builder, long scenarioGroupId) { builder.AddLong(3, scenarioGroupId, 0); } public static Offset EndEventContentChangeScenarioExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } } static public class EventContentChangeScenarioExcelVerify { 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 /*ChangeType*/, 4 /*SCHALE.Common.FlatData.EventChangeType*/, 4, false) && verifier.VerifyField(tablePos, 8 /*ChangeCount*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 10 /*ScenarioGroupId*/, 8 /*long*/, 8, false) && verifier.VerifyTableEnd(tablePos); } } }