// // 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 EventContentShopInfoExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static EventContentShopInfoExcel GetRootAsEventContentShopInfoExcel(ByteBuffer _bb) { return GetRootAsEventContentShopInfoExcel(_bb, new EventContentShopInfoExcel()); } public static EventContentShopInfoExcel GetRootAsEventContentShopInfoExcel(ByteBuffer _bb, EventContentShopInfoExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public EventContentShopInfoExcel __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 SCHALE.Common.FlatData.ShopCategoryType CategoryType { get { int o = __p.__offset(6); return o != 0 ? (SCHALE.Common.FlatData.ShopCategoryType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ShopCategoryType.General; } } public uint LocalizeCode { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } public SCHALE.Common.FlatData.ParcelType CostParcelType(int j) { int o = __p.__offset(10); return o != 0 ? (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.ParcelType)0; } public int CostParcelTypeLength { get { int o = __p.__offset(10); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetCostParcelTypeBytes() { return __p.__vector_as_span(10, 4); } #else public ArraySegment? GetCostParcelTypeBytes() { return __p.__vector_as_arraysegment(10); } #endif public SCHALE.Common.FlatData.ParcelType[] GetCostParcelTypeArray() { int o = __p.__offset(10); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.ParcelType[] a = new SCHALE.Common.FlatData.ParcelType[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(p + i * 4); } return a; } public long CostParcelId(int j) { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int CostParcelIdLength { get { int o = __p.__offset(12); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetCostParcelIdBytes() { return __p.__vector_as_span(12, 8); } #else public ArraySegment? GetCostParcelIdBytes() { return __p.__vector_as_arraysegment(12); } #endif public long[] GetCostParcelIdArray() { return __p.__vector_as_array(12); } public bool IsRefresh { get { int o = __p.__offset(14); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public bool IsSoldOutDimmed { get { int o = __p.__offset(16); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public long AutoRefreshCoolTime { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long RefreshAbleCount { get { int o = __p.__offset(20); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long GoodsId(int j) { int o = __p.__offset(22); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int GoodsIdLength { get { int o = __p.__offset(22); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetGoodsIdBytes() { return __p.__vector_as_span(22, 8); } #else public ArraySegment? GetGoodsIdBytes() { return __p.__vector_as_arraysegment(22); } #endif public long[] GetGoodsIdArray() { return __p.__vector_as_array(22); } public string OpenPeriodFrom { get { int o = __p.__offset(24); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetOpenPeriodFromBytes() { return __p.__vector_as_span(24, 1); } #else public ArraySegment? GetOpenPeriodFromBytes() { return __p.__vector_as_arraysegment(24); } #endif public byte[] GetOpenPeriodFromArray() { return __p.__vector_as_array(24); } public string OpenPeriodTo { get { int o = __p.__offset(26); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetOpenPeriodToBytes() { return __p.__vector_as_span(26, 1); } #else public ArraySegment? GetOpenPeriodToBytes() { return __p.__vector_as_arraysegment(26); } #endif public byte[] GetOpenPeriodToArray() { return __p.__vector_as_array(26); } public string ShopProductUpdateDate { get { int o = __p.__offset(28); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetShopProductUpdateDateBytes() { return __p.__vector_as_span(28, 1); } #else public ArraySegment? GetShopProductUpdateDateBytes() { return __p.__vector_as_arraysegment(28); } #endif public byte[] GetShopProductUpdateDateArray() { return __p.__vector_as_array(28); } public static Offset CreateEventContentShopInfoExcel(FlatBufferBuilder builder, long EventContentId = 0, SCHALE.Common.FlatData.ShopCategoryType CategoryType = SCHALE.Common.FlatData.ShopCategoryType.General, uint LocalizeCode = 0, VectorOffset CostParcelTypeOffset = default(VectorOffset), VectorOffset CostParcelIdOffset = default(VectorOffset), bool IsRefresh = false, bool IsSoldOutDimmed = false, long AutoRefreshCoolTime = 0, long RefreshAbleCount = 0, VectorOffset GoodsIdOffset = default(VectorOffset), StringOffset OpenPeriodFromOffset = default(StringOffset), StringOffset OpenPeriodToOffset = default(StringOffset), StringOffset ShopProductUpdateDateOffset = default(StringOffset)) { builder.StartTable(13); EventContentShopInfoExcel.AddRefreshAbleCount(builder, RefreshAbleCount); EventContentShopInfoExcel.AddAutoRefreshCoolTime(builder, AutoRefreshCoolTime); EventContentShopInfoExcel.AddEventContentId(builder, EventContentId); EventContentShopInfoExcel.AddShopProductUpdateDate(builder, ShopProductUpdateDateOffset); EventContentShopInfoExcel.AddOpenPeriodTo(builder, OpenPeriodToOffset); EventContentShopInfoExcel.AddOpenPeriodFrom(builder, OpenPeriodFromOffset); EventContentShopInfoExcel.AddGoodsId(builder, GoodsIdOffset); EventContentShopInfoExcel.AddCostParcelId(builder, CostParcelIdOffset); EventContentShopInfoExcel.AddCostParcelType(builder, CostParcelTypeOffset); EventContentShopInfoExcel.AddLocalizeCode(builder, LocalizeCode); EventContentShopInfoExcel.AddCategoryType(builder, CategoryType); EventContentShopInfoExcel.AddIsSoldOutDimmed(builder, IsSoldOutDimmed); EventContentShopInfoExcel.AddIsRefresh(builder, IsRefresh); return EventContentShopInfoExcel.EndEventContentShopInfoExcel(builder); } public static void StartEventContentShopInfoExcel(FlatBufferBuilder builder) { builder.StartTable(13); } public static void AddEventContentId(FlatBufferBuilder builder, long eventContentId) { builder.AddLong(0, eventContentId, 0); } public static void AddCategoryType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ShopCategoryType categoryType) { builder.AddInt(1, (int)categoryType, 0); } public static void AddLocalizeCode(FlatBufferBuilder builder, uint localizeCode) { builder.AddUint(2, localizeCode, 0); } public static void AddCostParcelType(FlatBufferBuilder builder, VectorOffset costParcelTypeOffset) { builder.AddOffset(3, costParcelTypeOffset.Value, 0); } public static VectorOffset CreateCostParcelTypeVector(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddInt((int)data[i]); return builder.EndVector(); } public static VectorOffset CreateCostParcelTypeVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateCostParcelTypeVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateCostParcelTypeVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartCostParcelTypeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddCostParcelId(FlatBufferBuilder builder, VectorOffset costParcelIdOffset) { builder.AddOffset(4, costParcelIdOffset.Value, 0); } public static VectorOffset CreateCostParcelIdVector(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 CreateCostParcelIdVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateCostParcelIdVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateCostParcelIdVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartCostParcelIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static void AddIsRefresh(FlatBufferBuilder builder, bool isRefresh) { builder.AddBool(5, isRefresh, false); } public static void AddIsSoldOutDimmed(FlatBufferBuilder builder, bool isSoldOutDimmed) { builder.AddBool(6, isSoldOutDimmed, false); } public static void AddAutoRefreshCoolTime(FlatBufferBuilder builder, long autoRefreshCoolTime) { builder.AddLong(7, autoRefreshCoolTime, 0); } public static void AddRefreshAbleCount(FlatBufferBuilder builder, long refreshAbleCount) { builder.AddLong(8, refreshAbleCount, 0); } public static void AddGoodsId(FlatBufferBuilder builder, VectorOffset goodsIdOffset) { builder.AddOffset(9, 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 AddOpenPeriodFrom(FlatBufferBuilder builder, StringOffset openPeriodFromOffset) { builder.AddOffset(10, openPeriodFromOffset.Value, 0); } public static void AddOpenPeriodTo(FlatBufferBuilder builder, StringOffset openPeriodToOffset) { builder.AddOffset(11, openPeriodToOffset.Value, 0); } public static void AddShopProductUpdateDate(FlatBufferBuilder builder, StringOffset shopProductUpdateDateOffset) { builder.AddOffset(12, shopProductUpdateDateOffset.Value, 0); } public static Offset EndEventContentShopInfoExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } } static public class EventContentShopInfoExcelVerify { 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 /*CategoryType*/, 4 /*SCHALE.Common.FlatData.ShopCategoryType*/, 4, false) && verifier.VerifyField(tablePos, 8 /*LocalizeCode*/, 4 /*uint*/, 4, false) && verifier.VerifyVectorOfData(tablePos, 10 /*CostParcelType*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, false) && verifier.VerifyVectorOfData(tablePos, 12 /*CostParcelId*/, 8 /*long*/, false) && verifier.VerifyField(tablePos, 14 /*IsRefresh*/, 1 /*bool*/, 1, false) && verifier.VerifyField(tablePos, 16 /*IsSoldOutDimmed*/, 1 /*bool*/, 1, false) && verifier.VerifyField(tablePos, 18 /*AutoRefreshCoolTime*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 20 /*RefreshAbleCount*/, 8 /*long*/, 8, false) && verifier.VerifyVectorOfData(tablePos, 22 /*GoodsId*/, 8 /*long*/, false) && verifier.VerifyString(tablePos, 24 /*OpenPeriodFrom*/, false) && verifier.VerifyString(tablePos, 26 /*OpenPeriodTo*/, false) && verifier.VerifyString(tablePos, 28 /*ShopProductUpdateDate*/, false) && verifier.VerifyTableEnd(tablePos); } } }