// // 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 ProductMonthlyExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static ProductMonthlyExcel GetRootAsProductMonthlyExcel(ByteBuffer _bb) { return GetRootAsProductMonthlyExcel(_bb, new ProductMonthlyExcel()); } public static ProductMonthlyExcel GetRootAsProductMonthlyExcel(ByteBuffer _bb, ProductMonthlyExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public ProductMonthlyExcel __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 string ProductId { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetProductIdBytes() { return __p.__vector_as_span(6, 1); } #else public ArraySegment? GetProductIdBytes() { return __p.__vector_as_arraysegment(6); } #endif public byte[] GetProductIdArray() { return __p.__vector_as_array(6); } public SCHALE.Common.FlatData.StoreType StoreType { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.StoreType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.StoreType.None; } } public long Price { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public string PriceReference { get { int o = __p.__offset(12); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetPriceReferenceBytes() { return __p.__vector_as_span(12, 1); } #else public ArraySegment? GetPriceReferenceBytes() { return __p.__vector_as_arraysegment(12); } #endif public byte[] GetPriceReferenceArray() { return __p.__vector_as_array(12); } public SCHALE.Common.FlatData.ProductTagType ProductTagType { get { int o = __p.__offset(14); return o != 0 ? (SCHALE.Common.FlatData.ProductTagType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ProductTagType.Monthly; } } public long MonthlyDays { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.ParcelType ParcelType_(int j) { int o = __p.__offset(18); return o != 0 ? (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.ParcelType)0; } public int ParcelType_Length { get { int o = __p.__offset(18); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetParcelType_Bytes() { return __p.__vector_as_span(18, 4); } #else public ArraySegment? GetParcelType_Bytes() { return __p.__vector_as_arraysegment(18); } #endif public SCHALE.Common.FlatData.ParcelType[] GetParcelType_Array() { int o = __p.__offset(18); 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 ParcelId(int j) { int o = __p.__offset(20); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int ParcelIdLength { get { int o = __p.__offset(20); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetParcelIdBytes() { return __p.__vector_as_span(20, 8); } #else public ArraySegment? GetParcelIdBytes() { return __p.__vector_as_arraysegment(20); } #endif public long[] GetParcelIdArray() { return __p.__vector_as_array(20); } public long ParcelAmount(int j) { int o = __p.__offset(22); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int ParcelAmountLength { get { int o = __p.__offset(22); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetParcelAmountBytes() { return __p.__vector_as_span(22, 8); } #else public ArraySegment? GetParcelAmountBytes() { return __p.__vector_as_arraysegment(22); } #endif public long[] GetParcelAmountArray() { return __p.__vector_as_array(22); } public long EnterCostReduceGroupId { get { int o = __p.__offset(24); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.ParcelType DailyParcelType(int j) { int o = __p.__offset(26); return o != 0 ? (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.ParcelType)0; } public int DailyParcelTypeLength { get { int o = __p.__offset(26); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetDailyParcelTypeBytes() { return __p.__vector_as_span(26, 4); } #else public ArraySegment? GetDailyParcelTypeBytes() { return __p.__vector_as_arraysegment(26); } #endif public SCHALE.Common.FlatData.ParcelType[] GetDailyParcelTypeArray() { int o = __p.__offset(26); 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 DailyParcelId(int j) { int o = __p.__offset(28); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int DailyParcelIdLength { get { int o = __p.__offset(28); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetDailyParcelIdBytes() { return __p.__vector_as_span(28, 8); } #else public ArraySegment? GetDailyParcelIdBytes() { return __p.__vector_as_arraysegment(28); } #endif public long[] GetDailyParcelIdArray() { return __p.__vector_as_array(28); } public long DailyParcelAmount(int j) { int o = __p.__offset(30); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int DailyParcelAmountLength { get { int o = __p.__offset(30); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetDailyParcelAmountBytes() { return __p.__vector_as_span(30, 8); } #else public ArraySegment? GetDailyParcelAmountBytes() { return __p.__vector_as_arraysegment(30); } #endif public long[] GetDailyParcelAmountArray() { return __p.__vector_as_array(30); } public static Offset CreateProductMonthlyExcel(FlatBufferBuilder builder, long Id = 0, StringOffset ProductIdOffset = default(StringOffset), SCHALE.Common.FlatData.StoreType StoreType = SCHALE.Common.FlatData.StoreType.None, long Price = 0, StringOffset PriceReferenceOffset = default(StringOffset), SCHALE.Common.FlatData.ProductTagType ProductTagType = SCHALE.Common.FlatData.ProductTagType.Monthly, long MonthlyDays = 0, VectorOffset ParcelType_Offset = default(VectorOffset), VectorOffset ParcelIdOffset = default(VectorOffset), VectorOffset ParcelAmountOffset = default(VectorOffset), long EnterCostReduceGroupId = 0, VectorOffset DailyParcelTypeOffset = default(VectorOffset), VectorOffset DailyParcelIdOffset = default(VectorOffset), VectorOffset DailyParcelAmountOffset = default(VectorOffset)) { builder.StartTable(14); ProductMonthlyExcel.AddEnterCostReduceGroupId(builder, EnterCostReduceGroupId); ProductMonthlyExcel.AddMonthlyDays(builder, MonthlyDays); ProductMonthlyExcel.AddPrice(builder, Price); ProductMonthlyExcel.AddId(builder, Id); ProductMonthlyExcel.AddDailyParcelAmount(builder, DailyParcelAmountOffset); ProductMonthlyExcel.AddDailyParcelId(builder, DailyParcelIdOffset); ProductMonthlyExcel.AddDailyParcelType(builder, DailyParcelTypeOffset); ProductMonthlyExcel.AddParcelAmount(builder, ParcelAmountOffset); ProductMonthlyExcel.AddParcelId(builder, ParcelIdOffset); ProductMonthlyExcel.AddParcelType_(builder, ParcelType_Offset); ProductMonthlyExcel.AddProductTagType(builder, ProductTagType); ProductMonthlyExcel.AddPriceReference(builder, PriceReferenceOffset); ProductMonthlyExcel.AddStoreType(builder, StoreType); ProductMonthlyExcel.AddProductId(builder, ProductIdOffset); return ProductMonthlyExcel.EndProductMonthlyExcel(builder); } public static void StartProductMonthlyExcel(FlatBufferBuilder builder) { builder.StartTable(14); } public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); } public static void AddProductId(FlatBufferBuilder builder, StringOffset productIdOffset) { builder.AddOffset(1, productIdOffset.Value, 0); } public static void AddStoreType(FlatBufferBuilder builder, SCHALE.Common.FlatData.StoreType storeType) { builder.AddInt(2, (int)storeType, 0); } public static void AddPrice(FlatBufferBuilder builder, long price) { builder.AddLong(3, price, 0); } public static void AddPriceReference(FlatBufferBuilder builder, StringOffset priceReferenceOffset) { builder.AddOffset(4, priceReferenceOffset.Value, 0); } public static void AddProductTagType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ProductTagType productTagType) { builder.AddInt(5, (int)productTagType, 0); } public static void AddMonthlyDays(FlatBufferBuilder builder, long monthlyDays) { builder.AddLong(6, monthlyDays, 0); } public static void AddParcelType_(FlatBufferBuilder builder, VectorOffset parcelType_Offset) { builder.AddOffset(7, parcelType_Offset.Value, 0); } public static VectorOffset CreateParcelType_Vector(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 CreateParcelType_VectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateParcelType_VectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateParcelType_VectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartParcelType_Vector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddParcelId(FlatBufferBuilder builder, VectorOffset parcelIdOffset) { builder.AddOffset(8, parcelIdOffset.Value, 0); } public static VectorOffset CreateParcelIdVector(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 CreateParcelIdVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateParcelIdVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateParcelIdVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartParcelIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static void AddParcelAmount(FlatBufferBuilder builder, VectorOffset parcelAmountOffset) { builder.AddOffset(9, parcelAmountOffset.Value, 0); } public static VectorOffset CreateParcelAmountVector(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 CreateParcelAmountVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateParcelAmountVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateParcelAmountVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartParcelAmountVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static void AddEnterCostReduceGroupId(FlatBufferBuilder builder, long enterCostReduceGroupId) { builder.AddLong(10, enterCostReduceGroupId, 0); } public static void AddDailyParcelType(FlatBufferBuilder builder, VectorOffset dailyParcelTypeOffset) { builder.AddOffset(11, dailyParcelTypeOffset.Value, 0); } public static VectorOffset CreateDailyParcelTypeVector(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 CreateDailyParcelTypeVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateDailyParcelTypeVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateDailyParcelTypeVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartDailyParcelTypeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddDailyParcelId(FlatBufferBuilder builder, VectorOffset dailyParcelIdOffset) { builder.AddOffset(12, dailyParcelIdOffset.Value, 0); } public static VectorOffset CreateDailyParcelIdVector(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 CreateDailyParcelIdVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateDailyParcelIdVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateDailyParcelIdVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartDailyParcelIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static void AddDailyParcelAmount(FlatBufferBuilder builder, VectorOffset dailyParcelAmountOffset) { builder.AddOffset(13, dailyParcelAmountOffset.Value, 0); } public static VectorOffset CreateDailyParcelAmountVector(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 CreateDailyParcelAmountVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateDailyParcelAmountVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateDailyParcelAmountVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartDailyParcelAmountVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static Offset EndProductMonthlyExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } } static public class ProductMonthlyExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*Id*/, 8 /*long*/, 8, false) && verifier.VerifyString(tablePos, 6 /*ProductId*/, false) && verifier.VerifyField(tablePos, 8 /*StoreType*/, 4 /*SCHALE.Common.FlatData.StoreType*/, 4, false) && verifier.VerifyField(tablePos, 10 /*Price*/, 8 /*long*/, 8, false) && verifier.VerifyString(tablePos, 12 /*PriceReference*/, false) && verifier.VerifyField(tablePos, 14 /*ProductTagType*/, 4 /*SCHALE.Common.FlatData.ProductTagType*/, 4, false) && verifier.VerifyField(tablePos, 16 /*MonthlyDays*/, 8 /*long*/, 8, false) && verifier.VerifyVectorOfData(tablePos, 18 /*ParcelType_*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, false) && verifier.VerifyVectorOfData(tablePos, 20 /*ParcelId*/, 8 /*long*/, false) && verifier.VerifyVectorOfData(tablePos, 22 /*ParcelAmount*/, 8 /*long*/, false) && verifier.VerifyField(tablePos, 24 /*EnterCostReduceGroupId*/, 8 /*long*/, 8, false) && verifier.VerifyVectorOfData(tablePos, 26 /*DailyParcelType*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, false) && verifier.VerifyVectorOfData(tablePos, 28 /*DailyParcelId*/, 8 /*long*/, false) && verifier.VerifyVectorOfData(tablePos, 30 /*DailyParcelAmount*/, 8 /*long*/, false) && verifier.VerifyTableEnd(tablePos); } } }