//
// 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 CafeRankExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static CafeRankExcel GetRootAsCafeRankExcel(ByteBuffer _bb) { return GetRootAsCafeRankExcel(_bb, new CafeRankExcel()); }
public static CafeRankExcel GetRootAsCafeRankExcel(ByteBuffer _bb, CafeRankExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public CafeRankExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public long CafeId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public long Rank { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public long RecipeId { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public long ComfortMax { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public long TagCountMax { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public int CharacterVisitMin { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
public int CharacterVisitMax { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
public int CafeVisitWeightBase { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
public int CafeVisitWeightTagBonusStep(int j) { int o = __p.__offset(20); return o != 0 ? __p.bb.GetInt(__p.__vector(o) + j * 4) : (int)0; }
public int CafeVisitWeightTagBonusStepLength { get { int o = __p.__offset(20); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span GetCafeVisitWeightTagBonusStepBytes() { return __p.__vector_as_span(20, 4); }
#else
public ArraySegment? GetCafeVisitWeightTagBonusStepBytes() { return __p.__vector_as_arraysegment(20); }
#endif
public int[] GetCafeVisitWeightTagBonusStepArray() { return __p.__vector_as_array(20); }
public int CafeVisitWeightTagBonus(int j) { int o = __p.__offset(22); return o != 0 ? __p.bb.GetInt(__p.__vector(o) + j * 4) : (int)0; }
public int CafeVisitWeightTagBonusLength { get { int o = __p.__offset(22); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span GetCafeVisitWeightTagBonusBytes() { return __p.__vector_as_span(22, 4); }
#else
public ArraySegment? GetCafeVisitWeightTagBonusBytes() { return __p.__vector_as_arraysegment(22); }
#endif
public int[] GetCafeVisitWeightTagBonusArray() { return __p.__vector_as_array(22); }
public static Offset CreateCafeRankExcel(FlatBufferBuilder builder,
long CafeId = 0,
long Rank = 0,
long RecipeId = 0,
long ComfortMax = 0,
long TagCountMax = 0,
int CharacterVisitMin = 0,
int CharacterVisitMax = 0,
int CafeVisitWeightBase = 0,
VectorOffset CafeVisitWeightTagBonusStepOffset = default(VectorOffset),
VectorOffset CafeVisitWeightTagBonusOffset = default(VectorOffset)) {
builder.StartTable(10);
CafeRankExcel.AddTagCountMax(builder, TagCountMax);
CafeRankExcel.AddComfortMax(builder, ComfortMax);
CafeRankExcel.AddRecipeId(builder, RecipeId);
CafeRankExcel.AddRank(builder, Rank);
CafeRankExcel.AddCafeId(builder, CafeId);
CafeRankExcel.AddCafeVisitWeightTagBonus(builder, CafeVisitWeightTagBonusOffset);
CafeRankExcel.AddCafeVisitWeightTagBonusStep(builder, CafeVisitWeightTagBonusStepOffset);
CafeRankExcel.AddCafeVisitWeightBase(builder, CafeVisitWeightBase);
CafeRankExcel.AddCharacterVisitMax(builder, CharacterVisitMax);
CafeRankExcel.AddCharacterVisitMin(builder, CharacterVisitMin);
return CafeRankExcel.EndCafeRankExcel(builder);
}
public static void StartCafeRankExcel(FlatBufferBuilder builder) { builder.StartTable(10); }
public static void AddCafeId(FlatBufferBuilder builder, long cafeId) { builder.AddLong(0, cafeId, 0); }
public static void AddRank(FlatBufferBuilder builder, long rank) { builder.AddLong(1, rank, 0); }
public static void AddRecipeId(FlatBufferBuilder builder, long recipeId) { builder.AddLong(2, recipeId, 0); }
public static void AddComfortMax(FlatBufferBuilder builder, long comfortMax) { builder.AddLong(3, comfortMax, 0); }
public static void AddTagCountMax(FlatBufferBuilder builder, long tagCountMax) { builder.AddLong(4, tagCountMax, 0); }
public static void AddCharacterVisitMin(FlatBufferBuilder builder, int characterVisitMin) { builder.AddInt(5, characterVisitMin, 0); }
public static void AddCharacterVisitMax(FlatBufferBuilder builder, int characterVisitMax) { builder.AddInt(6, characterVisitMax, 0); }
public static void AddCafeVisitWeightBase(FlatBufferBuilder builder, int cafeVisitWeightBase) { builder.AddInt(7, cafeVisitWeightBase, 0); }
public static void AddCafeVisitWeightTagBonusStep(FlatBufferBuilder builder, VectorOffset cafeVisitWeightTagBonusStepOffset) { builder.AddOffset(8, cafeVisitWeightTagBonusStepOffset.Value, 0); }
public static VectorOffset CreateCafeVisitWeightTagBonusStepVector(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddInt(data[i]); return builder.EndVector(); }
public static VectorOffset CreateCafeVisitWeightTagBonusStepVectorBlock(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateCafeVisitWeightTagBonusStepVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateCafeVisitWeightTagBonusStepVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartCafeVisitWeightTagBonusStepVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static void AddCafeVisitWeightTagBonus(FlatBufferBuilder builder, VectorOffset cafeVisitWeightTagBonusOffset) { builder.AddOffset(9, cafeVisitWeightTagBonusOffset.Value, 0); }
public static VectorOffset CreateCafeVisitWeightTagBonusVector(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddInt(data[i]); return builder.EndVector(); }
public static VectorOffset CreateCafeVisitWeightTagBonusVectorBlock(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateCafeVisitWeightTagBonusVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateCafeVisitWeightTagBonusVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartCafeVisitWeightTagBonusVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static Offset EndCafeRankExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset(o);
}
}
static public class CafeRankExcelVerify
{
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
{
return verifier.VerifyTableStart(tablePos)
&& verifier.VerifyField(tablePos, 4 /*CafeId*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 6 /*Rank*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 8 /*RecipeId*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 10 /*ComfortMax*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 12 /*TagCountMax*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 14 /*CharacterVisitMin*/, 4 /*int*/, 4, false)
&& verifier.VerifyField(tablePos, 16 /*CharacterVisitMax*/, 4 /*int*/, 4, false)
&& verifier.VerifyField(tablePos, 18 /*CafeVisitWeightBase*/, 4 /*int*/, 4, false)
&& verifier.VerifyVectorOfData(tablePos, 20 /*CafeVisitWeightTagBonusStep*/, 4 /*int*/, false)
&& verifier.VerifyVectorOfData(tablePos, 22 /*CafeVisitWeightTagBonus*/, 4 /*int*/, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}