// // 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 RecipeExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static RecipeExcel GetRootAsRecipeExcel(ByteBuffer _bb) { return GetRootAsRecipeExcel(_bb, new RecipeExcel()); } public static RecipeExcel GetRootAsRecipeExcel(ByteBuffer _bb, RecipeExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public RecipeExcel __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 SCHALE.Common.FlatData.RecipeType RecipeType { get { int o = __p.__offset(6); return o != 0 ? (SCHALE.Common.FlatData.RecipeType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.RecipeType.None; } } public long RecipeIngredientId { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long RecipeSelectionGroupId { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.ParcelType ParcelType_(int j) { int o = __p.__offset(12); 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(12); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetParcelType_Bytes() { return __p.__vector_as_span(12, 4); } #else public ArraySegment? GetParcelType_Bytes() { return __p.__vector_as_arraysegment(12); } #endif public SCHALE.Common.FlatData.ParcelType[] GetParcelType_Array() { int o = __p.__offset(12); 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(14); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int ParcelIdLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetParcelIdBytes() { return __p.__vector_as_span(14, 8); } #else public ArraySegment? GetParcelIdBytes() { return __p.__vector_as_arraysegment(14); } #endif public long[] GetParcelIdArray() { return __p.__vector_as_array(14); } public long ResultAmountMin(int j) { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int ResultAmountMinLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetResultAmountMinBytes() { return __p.__vector_as_span(16, 8); } #else public ArraySegment? GetResultAmountMinBytes() { return __p.__vector_as_arraysegment(16); } #endif public long[] GetResultAmountMinArray() { return __p.__vector_as_array(16); } public long ResultAmountMax(int j) { int o = __p.__offset(18); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int ResultAmountMaxLength { get { int o = __p.__offset(18); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetResultAmountMaxBytes() { return __p.__vector_as_span(18, 8); } #else public ArraySegment? GetResultAmountMaxBytes() { return __p.__vector_as_arraysegment(18); } #endif public long[] GetResultAmountMaxArray() { return __p.__vector_as_array(18); } public static Offset CreateRecipeExcel(FlatBufferBuilder builder, long Id = 0, SCHALE.Common.FlatData.RecipeType RecipeType = SCHALE.Common.FlatData.RecipeType.None, long RecipeIngredientId = 0, long RecipeSelectionGroupId = 0, VectorOffset ParcelType_Offset = default(VectorOffset), VectorOffset ParcelIdOffset = default(VectorOffset), VectorOffset ResultAmountMinOffset = default(VectorOffset), VectorOffset ResultAmountMaxOffset = default(VectorOffset)) { builder.StartTable(8); RecipeExcel.AddRecipeSelectionGroupId(builder, RecipeSelectionGroupId); RecipeExcel.AddRecipeIngredientId(builder, RecipeIngredientId); RecipeExcel.AddId(builder, Id); RecipeExcel.AddResultAmountMax(builder, ResultAmountMaxOffset); RecipeExcel.AddResultAmountMin(builder, ResultAmountMinOffset); RecipeExcel.AddParcelId(builder, ParcelIdOffset); RecipeExcel.AddParcelType_(builder, ParcelType_Offset); RecipeExcel.AddRecipeType(builder, RecipeType); return RecipeExcel.EndRecipeExcel(builder); } public static void StartRecipeExcel(FlatBufferBuilder builder) { builder.StartTable(8); } public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); } public static void AddRecipeType(FlatBufferBuilder builder, SCHALE.Common.FlatData.RecipeType recipeType) { builder.AddInt(1, (int)recipeType, 0); } public static void AddRecipeIngredientId(FlatBufferBuilder builder, long recipeIngredientId) { builder.AddLong(2, recipeIngredientId, 0); } public static void AddRecipeSelectionGroupId(FlatBufferBuilder builder, long recipeSelectionGroupId) { builder.AddLong(3, recipeSelectionGroupId, 0); } public static void AddParcelType_(FlatBufferBuilder builder, VectorOffset parcelType_Offset) { builder.AddOffset(4, 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(5, 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 AddResultAmountMin(FlatBufferBuilder builder, VectorOffset resultAmountMinOffset) { builder.AddOffset(6, resultAmountMinOffset.Value, 0); } public static VectorOffset CreateResultAmountMinVector(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 CreateResultAmountMinVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateResultAmountMinVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateResultAmountMinVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartResultAmountMinVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static void AddResultAmountMax(FlatBufferBuilder builder, VectorOffset resultAmountMaxOffset) { builder.AddOffset(7, resultAmountMaxOffset.Value, 0); } public static VectorOffset CreateResultAmountMaxVector(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 CreateResultAmountMaxVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateResultAmountMaxVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateResultAmountMaxVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartResultAmountMaxVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static Offset EndRecipeExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } } static public class RecipeExcelVerify { 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 /*RecipeType*/, 4 /*SCHALE.Common.FlatData.RecipeType*/, 4, false) && verifier.VerifyField(tablePos, 8 /*RecipeIngredientId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 10 /*RecipeSelectionGroupId*/, 8 /*long*/, 8, false) && verifier.VerifyVectorOfData(tablePos, 12 /*ParcelType_*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, false) && verifier.VerifyVectorOfData(tablePos, 14 /*ParcelId*/, 8 /*long*/, false) && verifier.VerifyVectorOfData(tablePos, 16 /*ResultAmountMin*/, 8 /*long*/, false) && verifier.VerifyVectorOfData(tablePos, 18 /*ResultAmountMax*/, 8 /*long*/, false) && verifier.VerifyTableEnd(tablePos); } } }