// // 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 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); } public ToastExcelT UnPack() { var _o = new ToastExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(ToastExcelT _o) { byte[] key = TableEncryptionService.CreateKey("Toast"); _o.Id = TableEncryptionService.Convert(this.Id, key); _o.ToastType_ = TableEncryptionService.Convert(this.ToastType_, key); _o.MissionId = TableEncryptionService.Convert(this.MissionId, key); _o.TextId = TableEncryptionService.Convert(this.TextId, key); _o.LifeTime = TableEncryptionService.Convert(this.LifeTime, key); } public static Offset Pack(FlatBufferBuilder builder, ToastExcelT _o) { if (_o == null) return default(Offset); return CreateToastExcel( builder, _o.Id, _o.ToastType_, _o.MissionId, _o.TextId, _o.LifeTime); } } public class ToastExcelT { public uint Id { get; set; } public SCHALE.Common.FlatData.ToastType ToastType_ { get; set; } public uint MissionId { get; set; } public uint TextId { get; set; } public long LifeTime { get; set; } public ToastExcelT() { this.Id = 0; this.ToastType_ = SCHALE.Common.FlatData.ToastType.None; this.MissionId = 0; this.TextId = 0; this.LifeTime = 0; } } 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); } } }