// // 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 ShopRefreshExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static ShopRefreshExcel GetRootAsShopRefreshExcel(ByteBuffer _bb) { return GetRootAsShopRefreshExcel(_bb, new ShopRefreshExcel()); } public static ShopRefreshExcel GetRootAsShopRefreshExcel(ByteBuffer _bb, ShopRefreshExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public ShopRefreshExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public long Id { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public uint LocalizeEtcId { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } public bool IsLegacy { get { int o = __p.__offset(8); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public long GoodsId { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long DisplayOrder { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.ShopCategoryType CategoryType { get { int o = __p.__offset(14); return o != 0 ? (SCHALE.Common.FlatData.ShopCategoryType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ShopCategoryType.General; } } public int RefreshGroup { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public int Prob { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public string BuyReportEventName { get { int o = __p.__offset(20); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetBuyReportEventNameBytes() { return __p.__vector_as_span(20, 1); } #else public ArraySegment? GetBuyReportEventNameBytes() { return __p.__vector_as_arraysegment(20); } #endif public byte[] GetBuyReportEventNameArray() { return __p.__vector_as_array(20); } public SCHALE.Common.FlatData.ProductDisplayTag DisplayTag { get { int o = __p.__offset(22); return o != 0 ? (SCHALE.Common.FlatData.ProductDisplayTag)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ProductDisplayTag.None; } } public static Offset CreateShopRefreshExcel(FlatBufferBuilder builder, long Id = 0, uint LocalizeEtcId = 0, bool IsLegacy = false, long GoodsId = 0, long DisplayOrder = 0, SCHALE.Common.FlatData.ShopCategoryType CategoryType = SCHALE.Common.FlatData.ShopCategoryType.General, int RefreshGroup = 0, int Prob = 0, StringOffset BuyReportEventNameOffset = default(StringOffset), SCHALE.Common.FlatData.ProductDisplayTag DisplayTag = SCHALE.Common.FlatData.ProductDisplayTag.None) { builder.StartTable(10); ShopRefreshExcel.AddDisplayOrder(builder, DisplayOrder); ShopRefreshExcel.AddGoodsId(builder, GoodsId); ShopRefreshExcel.AddId(builder, Id); ShopRefreshExcel.AddDisplayTag(builder, DisplayTag); ShopRefreshExcel.AddBuyReportEventName(builder, BuyReportEventNameOffset); ShopRefreshExcel.AddProb(builder, Prob); ShopRefreshExcel.AddRefreshGroup(builder, RefreshGroup); ShopRefreshExcel.AddCategoryType(builder, CategoryType); ShopRefreshExcel.AddLocalizeEtcId(builder, LocalizeEtcId); ShopRefreshExcel.AddIsLegacy(builder, IsLegacy); return ShopRefreshExcel.EndShopRefreshExcel(builder); } public static void StartShopRefreshExcel(FlatBufferBuilder builder) { builder.StartTable(10); } public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); } public static void AddLocalizeEtcId(FlatBufferBuilder builder, uint localizeEtcId) { builder.AddUint(1, localizeEtcId, 0); } public static void AddIsLegacy(FlatBufferBuilder builder, bool isLegacy) { builder.AddBool(2, isLegacy, false); } public static void AddGoodsId(FlatBufferBuilder builder, long goodsId) { builder.AddLong(3, goodsId, 0); } public static void AddDisplayOrder(FlatBufferBuilder builder, long displayOrder) { builder.AddLong(4, displayOrder, 0); } public static void AddCategoryType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ShopCategoryType categoryType) { builder.AddInt(5, (int)categoryType, 0); } public static void AddRefreshGroup(FlatBufferBuilder builder, int refreshGroup) { builder.AddInt(6, refreshGroup, 0); } public static void AddProb(FlatBufferBuilder builder, int prob) { builder.AddInt(7, prob, 0); } public static void AddBuyReportEventName(FlatBufferBuilder builder, StringOffset buyReportEventNameOffset) { builder.AddOffset(8, buyReportEventNameOffset.Value, 0); } public static void AddDisplayTag(FlatBufferBuilder builder, SCHALE.Common.FlatData.ProductDisplayTag displayTag) { builder.AddInt(9, (int)displayTag, 0); } public static Offset EndShopRefreshExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } } static public class ShopRefreshExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*Id*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 6 /*LocalizeEtcId*/, 4 /*uint*/, 4, false) && verifier.VerifyField(tablePos, 8 /*IsLegacy*/, 1 /*bool*/, 1, false) && verifier.VerifyField(tablePos, 10 /*GoodsId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 12 /*DisplayOrder*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 14 /*CategoryType*/, 4 /*SCHALE.Common.FlatData.ShopCategoryType*/, 4, false) && verifier.VerifyField(tablePos, 16 /*RefreshGroup*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 18 /*Prob*/, 4 /*int*/, 4, false) && verifier.VerifyString(tablePos, 20 /*BuyReportEventName*/, false) && verifier.VerifyField(tablePos, 22 /*DisplayTag*/, 4 /*SCHALE.Common.FlatData.ProductDisplayTag*/, 4, false) && verifier.VerifyTableEnd(tablePos); } } }