// // 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 ToastExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static ToastExcel GetRootAsToastExcel(ByteBuffer _bb) { return GetRootAsToastExcel(_bb, new ToastExcel()); } public static ToastExcel GetRootAsToastExcel(ByteBuffer _bb, ToastExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public ToastExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public uint Id { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } public SCHALE.Common.FlatData.ToastType ToastType { get { int o = __p.__offset(6); return o != 0 ? (SCHALE.Common.FlatData.ToastType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ToastType.None; } } public uint MissionId { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } public uint TextId { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } public long LifeTime { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public static Offset CreateToastExcel(FlatBufferBuilder builder, uint Id = 0, SCHALE.Common.FlatData.ToastType ToastType = SCHALE.Common.FlatData.ToastType.None, uint MissionId = 0, uint TextId = 0, long LifeTime = 0) { builder.StartTable(5); ToastExcel.AddLifeTime(builder, LifeTime); ToastExcel.AddTextId(builder, TextId); ToastExcel.AddMissionId(builder, MissionId); ToastExcel.AddToastType(builder, ToastType); ToastExcel.AddId(builder, Id); return ToastExcel.EndToastExcel(builder); } public static void StartToastExcel(FlatBufferBuilder builder) { builder.StartTable(5); } public static void AddId(FlatBufferBuilder builder, uint id) { builder.AddUint(0, id, 0); } public static void AddToastType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ToastType toastType) { builder.AddInt(1, (int)toastType, 0); } public static void AddMissionId(FlatBufferBuilder builder, uint missionId) { builder.AddUint(2, missionId, 0); } public static void AddTextId(FlatBufferBuilder builder, uint textId) { builder.AddUint(3, textId, 0); } public static void AddLifeTime(FlatBufferBuilder builder, long lifeTime) { builder.AddLong(4, lifeTime, 0); } public static Offset EndToastExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } } static public class ToastExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*Id*/, 4 /*uint*/, 4, false) && verifier.VerifyField(tablePos, 6 /*ToastType*/, 4 /*SCHALE.Common.FlatData.ToastType*/, 4, false) && verifier.VerifyField(tablePos, 8 /*MissionId*/, 4 /*uint*/, 4, false) && verifier.VerifyField(tablePos, 10 /*TextId*/, 4 /*uint*/, 4, false) && verifier.VerifyField(tablePos, 12 /*LifeTime*/, 8 /*long*/, 8, false) && verifier.VerifyTableEnd(tablePos); } } }