// // 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 ShopFreeRecruitPeriodExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static ShopFreeRecruitPeriodExcel GetRootAsShopFreeRecruitPeriodExcel(ByteBuffer _bb) { return GetRootAsShopFreeRecruitPeriodExcel(_bb, new ShopFreeRecruitPeriodExcel()); } public static ShopFreeRecruitPeriodExcel GetRootAsShopFreeRecruitPeriodExcel(ByteBuffer _bb, ShopFreeRecruitPeriodExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public ShopFreeRecruitPeriodExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public long ShopFreeRecruitId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long ShopFreeRecruitIntervalId { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public string IntervalDate { get { int o = __p.__offset(8); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetIntervalDateBytes() { return __p.__vector_as_span(8, 1); } #else public ArraySegment? GetIntervalDateBytes() { return __p.__vector_as_arraysegment(8); } #endif public byte[] GetIntervalDateArray() { return __p.__vector_as_array(8); } public int FreeRecruitCount { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public static Offset CreateShopFreeRecruitPeriodExcel(FlatBufferBuilder builder, long ShopFreeRecruitId = 0, long ShopFreeRecruitIntervalId = 0, StringOffset IntervalDateOffset = default(StringOffset), int FreeRecruitCount = 0) { builder.StartTable(4); ShopFreeRecruitPeriodExcel.AddShopFreeRecruitIntervalId(builder, ShopFreeRecruitIntervalId); ShopFreeRecruitPeriodExcel.AddShopFreeRecruitId(builder, ShopFreeRecruitId); ShopFreeRecruitPeriodExcel.AddFreeRecruitCount(builder, FreeRecruitCount); ShopFreeRecruitPeriodExcel.AddIntervalDate(builder, IntervalDateOffset); return ShopFreeRecruitPeriodExcel.EndShopFreeRecruitPeriodExcel(builder); } public static void StartShopFreeRecruitPeriodExcel(FlatBufferBuilder builder) { builder.StartTable(4); } public static void AddShopFreeRecruitId(FlatBufferBuilder builder, long shopFreeRecruitId) { builder.AddLong(0, shopFreeRecruitId, 0); } public static void AddShopFreeRecruitIntervalId(FlatBufferBuilder builder, long shopFreeRecruitIntervalId) { builder.AddLong(1, shopFreeRecruitIntervalId, 0); } public static void AddIntervalDate(FlatBufferBuilder builder, StringOffset intervalDateOffset) { builder.AddOffset(2, intervalDateOffset.Value, 0); } public static void AddFreeRecruitCount(FlatBufferBuilder builder, int freeRecruitCount) { builder.AddInt(3, freeRecruitCount, 0); } public static Offset EndShopFreeRecruitPeriodExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public ShopFreeRecruitPeriodExcelT UnPack() { var _o = new ShopFreeRecruitPeriodExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(ShopFreeRecruitPeriodExcelT _o) { byte[] key = TableEncryptionService.CreateKey("ShopFreeRecruitPeriod"); _o.ShopFreeRecruitId = TableEncryptionService.Convert(this.ShopFreeRecruitId, key); _o.ShopFreeRecruitIntervalId = TableEncryptionService.Convert(this.ShopFreeRecruitIntervalId, key); _o.IntervalDate = TableEncryptionService.Convert(this.IntervalDate, key); _o.FreeRecruitCount = TableEncryptionService.Convert(this.FreeRecruitCount, key); } public static Offset Pack(FlatBufferBuilder builder, ShopFreeRecruitPeriodExcelT _o) { if (_o == null) return default(Offset); var _IntervalDate = _o.IntervalDate == null ? default(StringOffset) : builder.CreateString(_o.IntervalDate); return CreateShopFreeRecruitPeriodExcel( builder, _o.ShopFreeRecruitId, _o.ShopFreeRecruitIntervalId, _IntervalDate, _o.FreeRecruitCount); } } public class ShopFreeRecruitPeriodExcelT { public long ShopFreeRecruitId { get; set; } public long ShopFreeRecruitIntervalId { get; set; } public string IntervalDate { get; set; } public int FreeRecruitCount { get; set; } public ShopFreeRecruitPeriodExcelT() { this.ShopFreeRecruitId = 0; this.ShopFreeRecruitIntervalId = 0; this.IntervalDate = null; this.FreeRecruitCount = 0; } } static public class ShopFreeRecruitPeriodExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*ShopFreeRecruitId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 6 /*ShopFreeRecruitIntervalId*/, 8 /*long*/, 8, false) && verifier.VerifyString(tablePos, 8 /*IntervalDate*/, false) && verifier.VerifyField(tablePos, 10 /*FreeRecruitCount*/, 4 /*int*/, 4, false) && verifier.VerifyTableEnd(tablePos); } } }