// // 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 EventContentShopExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static EventContentShopExcel GetRootAsEventContentShopExcel(ByteBuffer _bb) { return GetRootAsEventContentShopExcel(_bb, new EventContentShopExcel()); } public static EventContentShopExcel GetRootAsEventContentShopExcel(ByteBuffer _bb, EventContentShopExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public EventContentShopExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public long EventContentId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long Id { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public uint LocalizeEtcId { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } public SCHALE.Common.FlatData.ShopCategoryType CategoryType { get { int o = __p.__offset(10); return o != 0 ? (SCHALE.Common.FlatData.ShopCategoryType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ShopCategoryType.General; } } public bool IsLegacy { get { int o = __p.__offset(12); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public long GoodsId(int j) { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int GoodsIdLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetGoodsIdBytes() { return __p.__vector_as_span(14, 8); } #else public ArraySegment? GetGoodsIdBytes() { return __p.__vector_as_arraysegment(14); } #endif public long[] GetGoodsIdArray() { return __p.__vector_as_array(14); } public long DisplayOrder { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public string SalePeriodFrom { get { int o = __p.__offset(18); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetSalePeriodFromBytes() { return __p.__vector_as_span(18, 1); } #else public ArraySegment? GetSalePeriodFromBytes() { return __p.__vector_as_arraysegment(18); } #endif public byte[] GetSalePeriodFromArray() { return __p.__vector_as_array(18); } public string SalePeriodTo { get { int o = __p.__offset(20); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetSalePeriodToBytes() { return __p.__vector_as_span(20, 1); } #else public ArraySegment? GetSalePeriodToBytes() { return __p.__vector_as_arraysegment(20); } #endif public byte[] GetSalePeriodToArray() { return __p.__vector_as_array(20); } public long PurchaseCooltimeMin { get { int o = __p.__offset(22); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long PurchaseCountLimit { get { int o = __p.__offset(24); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.PurchaseCountResetType PurchaseCountResetType { get { int o = __p.__offset(26); return o != 0 ? (SCHALE.Common.FlatData.PurchaseCountResetType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.PurchaseCountResetType.None; } } public string BuyReportEventName { get { int o = __p.__offset(28); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetBuyReportEventNameBytes() { return __p.__vector_as_span(28, 1); } #else public ArraySegment? GetBuyReportEventNameBytes() { return __p.__vector_as_arraysegment(28); } #endif public byte[] GetBuyReportEventNameArray() { return __p.__vector_as_array(28); } public bool RestrictBuyWhenInventoryFull { get { int o = __p.__offset(30); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public static Offset CreateEventContentShopExcel(FlatBufferBuilder builder, long EventContentId = 0, long Id = 0, uint LocalizeEtcId = 0, SCHALE.Common.FlatData.ShopCategoryType CategoryType = SCHALE.Common.FlatData.ShopCategoryType.General, bool IsLegacy = false, VectorOffset GoodsIdOffset = default(VectorOffset), long DisplayOrder = 0, StringOffset SalePeriodFromOffset = default(StringOffset), StringOffset SalePeriodToOffset = default(StringOffset), long PurchaseCooltimeMin = 0, long PurchaseCountLimit = 0, SCHALE.Common.FlatData.PurchaseCountResetType PurchaseCountResetType = SCHALE.Common.FlatData.PurchaseCountResetType.None, StringOffset BuyReportEventNameOffset = default(StringOffset), bool RestrictBuyWhenInventoryFull = false) { builder.StartTable(14); EventContentShopExcel.AddPurchaseCountLimit(builder, PurchaseCountLimit); EventContentShopExcel.AddPurchaseCooltimeMin(builder, PurchaseCooltimeMin); EventContentShopExcel.AddDisplayOrder(builder, DisplayOrder); EventContentShopExcel.AddId(builder, Id); EventContentShopExcel.AddEventContentId(builder, EventContentId); EventContentShopExcel.AddBuyReportEventName(builder, BuyReportEventNameOffset); EventContentShopExcel.AddPurchaseCountResetType(builder, PurchaseCountResetType); EventContentShopExcel.AddSalePeriodTo(builder, SalePeriodToOffset); EventContentShopExcel.AddSalePeriodFrom(builder, SalePeriodFromOffset); EventContentShopExcel.AddGoodsId(builder, GoodsIdOffset); EventContentShopExcel.AddCategoryType(builder, CategoryType); EventContentShopExcel.AddLocalizeEtcId(builder, LocalizeEtcId); EventContentShopExcel.AddRestrictBuyWhenInventoryFull(builder, RestrictBuyWhenInventoryFull); EventContentShopExcel.AddIsLegacy(builder, IsLegacy); return EventContentShopExcel.EndEventContentShopExcel(builder); } public static void StartEventContentShopExcel(FlatBufferBuilder builder) { builder.StartTable(14); } public static void AddEventContentId(FlatBufferBuilder builder, long eventContentId) { builder.AddLong(0, eventContentId, 0); } public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(1, id, 0); } public static void AddLocalizeEtcId(FlatBufferBuilder builder, uint localizeEtcId) { builder.AddUint(2, localizeEtcId, 0); } public static void AddCategoryType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ShopCategoryType categoryType) { builder.AddInt(3, (int)categoryType, 0); } public static void AddIsLegacy(FlatBufferBuilder builder, bool isLegacy) { builder.AddBool(4, isLegacy, false); } public static void AddGoodsId(FlatBufferBuilder builder, VectorOffset goodsIdOffset) { builder.AddOffset(5, goodsIdOffset.Value, 0); } public static VectorOffset CreateGoodsIdVector(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddLong(data[i]); return builder.EndVector(); } public static VectorOffset CreateGoodsIdVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateGoodsIdVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateGoodsIdVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartGoodsIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static void AddDisplayOrder(FlatBufferBuilder builder, long displayOrder) { builder.AddLong(6, displayOrder, 0); } public static void AddSalePeriodFrom(FlatBufferBuilder builder, StringOffset salePeriodFromOffset) { builder.AddOffset(7, salePeriodFromOffset.Value, 0); } public static void AddSalePeriodTo(FlatBufferBuilder builder, StringOffset salePeriodToOffset) { builder.AddOffset(8, salePeriodToOffset.Value, 0); } public static void AddPurchaseCooltimeMin(FlatBufferBuilder builder, long purchaseCooltimeMin) { builder.AddLong(9, purchaseCooltimeMin, 0); } public static void AddPurchaseCountLimit(FlatBufferBuilder builder, long purchaseCountLimit) { builder.AddLong(10, purchaseCountLimit, 0); } public static void AddPurchaseCountResetType(FlatBufferBuilder builder, SCHALE.Common.FlatData.PurchaseCountResetType purchaseCountResetType) { builder.AddInt(11, (int)purchaseCountResetType, 0); } public static void AddBuyReportEventName(FlatBufferBuilder builder, StringOffset buyReportEventNameOffset) { builder.AddOffset(12, buyReportEventNameOffset.Value, 0); } public static void AddRestrictBuyWhenInventoryFull(FlatBufferBuilder builder, bool restrictBuyWhenInventoryFull) { builder.AddBool(13, restrictBuyWhenInventoryFull, false); } public static Offset EndEventContentShopExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } } static public class EventContentShopExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*EventContentId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 6 /*Id*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 8 /*LocalizeEtcId*/, 4 /*uint*/, 4, false) && verifier.VerifyField(tablePos, 10 /*CategoryType*/, 4 /*SCHALE.Common.FlatData.ShopCategoryType*/, 4, false) && verifier.VerifyField(tablePos, 12 /*IsLegacy*/, 1 /*bool*/, 1, false) && verifier.VerifyVectorOfData(tablePos, 14 /*GoodsId*/, 8 /*long*/, false) && verifier.VerifyField(tablePos, 16 /*DisplayOrder*/, 8 /*long*/, 8, false) && verifier.VerifyString(tablePos, 18 /*SalePeriodFrom*/, false) && verifier.VerifyString(tablePos, 20 /*SalePeriodTo*/, false) && verifier.VerifyField(tablePos, 22 /*PurchaseCooltimeMin*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 24 /*PurchaseCountLimit*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 26 /*PurchaseCountResetType*/, 4 /*SCHALE.Common.FlatData.PurchaseCountResetType*/, 4, false) && verifier.VerifyString(tablePos, 28 /*BuyReportEventName*/, false) && verifier.VerifyField(tablePos, 30 /*RestrictBuyWhenInventoryFull*/, 1 /*bool*/, 1, false) && verifier.VerifyTableEnd(tablePos); } } }