// // 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 StageFileRefreshSettingExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static StageFileRefreshSettingExcel GetRootAsStageFileRefreshSettingExcel(ByteBuffer _bb) { return GetRootAsStageFileRefreshSettingExcel(_bb, new StageFileRefreshSettingExcel()); } public static StageFileRefreshSettingExcel GetRootAsStageFileRefreshSettingExcel(ByteBuffer _bb, StageFileRefreshSettingExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public StageFileRefreshSettingExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public long GroundId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public bool ForceSave { get { int o = __p.__offset(6); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public static Offset CreateStageFileRefreshSettingExcel(FlatBufferBuilder builder, long GroundId = 0, bool ForceSave = false) { builder.StartTable(2); StageFileRefreshSettingExcel.AddGroundId(builder, GroundId); StageFileRefreshSettingExcel.AddForceSave(builder, ForceSave); return StageFileRefreshSettingExcel.EndStageFileRefreshSettingExcel(builder); } public static void StartStageFileRefreshSettingExcel(FlatBufferBuilder builder) { builder.StartTable(2); } public static void AddGroundId(FlatBufferBuilder builder, long groundId) { builder.AddLong(0, groundId, 0); } public static void AddForceSave(FlatBufferBuilder builder, bool forceSave) { builder.AddBool(1, forceSave, false); } public static Offset EndStageFileRefreshSettingExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public StageFileRefreshSettingExcelT UnPack() { var _o = new StageFileRefreshSettingExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(StageFileRefreshSettingExcelT _o) { byte[] key = TableEncryptionService.CreateKey("StageFileRefreshSetting"); _o.GroundId = TableEncryptionService.Convert(this.GroundId, key); _o.ForceSave = TableEncryptionService.Convert(this.ForceSave, key); } public static Offset Pack(FlatBufferBuilder builder, StageFileRefreshSettingExcelT _o) { if (_o == null) return default(Offset); return CreateStageFileRefreshSettingExcel( builder, _o.GroundId, _o.ForceSave); } } public class StageFileRefreshSettingExcelT { public long GroundId { get; set; } public bool ForceSave { get; set; } public StageFileRefreshSettingExcelT() { this.GroundId = 0; this.ForceSave = false; } } static public class StageFileRefreshSettingExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*GroundId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 6 /*ForceSave*/, 1 /*bool*/, 1, false) && verifier.VerifyTableEnd(tablePos); } } }