//
// 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 EventContentTreasureRewardExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static EventContentTreasureRewardExcel GetRootAsEventContentTreasureRewardExcel(ByteBuffer _bb) { return GetRootAsEventContentTreasureRewardExcel(_bb, new EventContentTreasureRewardExcel()); }
public static EventContentTreasureRewardExcel GetRootAsEventContentTreasureRewardExcel(ByteBuffer _bb, EventContentTreasureRewardExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public EventContentTreasureRewardExcel __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 LocalizeCodeID { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span GetLocalizeCodeIDBytes() { return __p.__vector_as_span(6, 1); }
#else
public ArraySegment? GetLocalizeCodeIDBytes() { return __p.__vector_as_arraysegment(6); }
#endif
public byte[] GetLocalizeCodeIDArray() { return __p.__vector_as_array(6); }
public int CellUnderImageWidth { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
public int CellUnderImageHeight { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
public bool HiddenImage { get { int o = __p.__offset(12); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
public SCHALE.Common.FlatData.ParcelType RewardParcelType(int j) { int o = __p.__offset(14); return o != 0 ? (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.ParcelType)0; }
public int RewardParcelTypeLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span GetRewardParcelTypeBytes() { return __p.__vector_as_span(14, 4); }
#else
public ArraySegment? GetRewardParcelTypeBytes() { return __p.__vector_as_arraysegment(14); }
#endif
public SCHALE.Common.FlatData.ParcelType[] GetRewardParcelTypeArray() { int o = __p.__offset(14); 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 RewardParcelId(int j) { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
public int RewardParcelIdLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span GetRewardParcelIdBytes() { return __p.__vector_as_span(16, 8); }
#else
public ArraySegment? GetRewardParcelIdBytes() { return __p.__vector_as_arraysegment(16); }
#endif
public long[] GetRewardParcelIdArray() { return __p.__vector_as_array(16); }
public long RewardParcelAmount(int j) { int o = __p.__offset(18); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
public int RewardParcelAmountLength { get { int o = __p.__offset(18); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span GetRewardParcelAmountBytes() { return __p.__vector_as_span(18, 8); }
#else
public ArraySegment? GetRewardParcelAmountBytes() { return __p.__vector_as_arraysegment(18); }
#endif
public long[] GetRewardParcelAmountArray() { return __p.__vector_as_array(18); }
public string CellUnderImagePath { get { int o = __p.__offset(20); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span GetCellUnderImagePathBytes() { return __p.__vector_as_span(20, 1); }
#else
public ArraySegment? GetCellUnderImagePathBytes() { return __p.__vector_as_arraysegment(20); }
#endif
public byte[] GetCellUnderImagePathArray() { return __p.__vector_as_array(20); }
public string TreasureSmallImagePath { get { int o = __p.__offset(22); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span GetTreasureSmallImagePathBytes() { return __p.__vector_as_span(22, 1); }
#else
public ArraySegment? GetTreasureSmallImagePathBytes() { return __p.__vector_as_arraysegment(22); }
#endif
public byte[] GetTreasureSmallImagePathArray() { return __p.__vector_as_array(22); }
public static Offset CreateEventContentTreasureRewardExcel(FlatBufferBuilder builder,
long Id = 0,
StringOffset LocalizeCodeIDOffset = default(StringOffset),
int CellUnderImageWidth = 0,
int CellUnderImageHeight = 0,
bool HiddenImage = false,
VectorOffset RewardParcelTypeOffset = default(VectorOffset),
VectorOffset RewardParcelIdOffset = default(VectorOffset),
VectorOffset RewardParcelAmountOffset = default(VectorOffset),
StringOffset CellUnderImagePathOffset = default(StringOffset),
StringOffset TreasureSmallImagePathOffset = default(StringOffset)) {
builder.StartTable(10);
EventContentTreasureRewardExcel.AddId(builder, Id);
EventContentTreasureRewardExcel.AddTreasureSmallImagePath(builder, TreasureSmallImagePathOffset);
EventContentTreasureRewardExcel.AddCellUnderImagePath(builder, CellUnderImagePathOffset);
EventContentTreasureRewardExcel.AddRewardParcelAmount(builder, RewardParcelAmountOffset);
EventContentTreasureRewardExcel.AddRewardParcelId(builder, RewardParcelIdOffset);
EventContentTreasureRewardExcel.AddRewardParcelType(builder, RewardParcelTypeOffset);
EventContentTreasureRewardExcel.AddCellUnderImageHeight(builder, CellUnderImageHeight);
EventContentTreasureRewardExcel.AddCellUnderImageWidth(builder, CellUnderImageWidth);
EventContentTreasureRewardExcel.AddLocalizeCodeID(builder, LocalizeCodeIDOffset);
EventContentTreasureRewardExcel.AddHiddenImage(builder, HiddenImage);
return EventContentTreasureRewardExcel.EndEventContentTreasureRewardExcel(builder);
}
public static void StartEventContentTreasureRewardExcel(FlatBufferBuilder builder) { builder.StartTable(10); }
public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); }
public static void AddLocalizeCodeID(FlatBufferBuilder builder, StringOffset localizeCodeIDOffset) { builder.AddOffset(1, localizeCodeIDOffset.Value, 0); }
public static void AddCellUnderImageWidth(FlatBufferBuilder builder, int cellUnderImageWidth) { builder.AddInt(2, cellUnderImageWidth, 0); }
public static void AddCellUnderImageHeight(FlatBufferBuilder builder, int cellUnderImageHeight) { builder.AddInt(3, cellUnderImageHeight, 0); }
public static void AddHiddenImage(FlatBufferBuilder builder, bool hiddenImage) { builder.AddBool(4, hiddenImage, false); }
public static void AddRewardParcelType(FlatBufferBuilder builder, VectorOffset rewardParcelTypeOffset) { builder.AddOffset(5, rewardParcelTypeOffset.Value, 0); }
public static VectorOffset CreateRewardParcelTypeVector(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 CreateRewardParcelTypeVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRewardParcelTypeVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRewardParcelTypeVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartRewardParcelTypeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static void AddRewardParcelId(FlatBufferBuilder builder, VectorOffset rewardParcelIdOffset) { builder.AddOffset(6, rewardParcelIdOffset.Value, 0); }
public static VectorOffset CreateRewardParcelIdVector(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 CreateRewardParcelIdVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRewardParcelIdVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRewardParcelIdVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartRewardParcelIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
public static void AddRewardParcelAmount(FlatBufferBuilder builder, VectorOffset rewardParcelAmountOffset) { builder.AddOffset(7, rewardParcelAmountOffset.Value, 0); }
public static VectorOffset CreateRewardParcelAmountVector(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 CreateRewardParcelAmountVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRewardParcelAmountVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRewardParcelAmountVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartRewardParcelAmountVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
public static void AddCellUnderImagePath(FlatBufferBuilder builder, StringOffset cellUnderImagePathOffset) { builder.AddOffset(8, cellUnderImagePathOffset.Value, 0); }
public static void AddTreasureSmallImagePath(FlatBufferBuilder builder, StringOffset treasureSmallImagePathOffset) { builder.AddOffset(9, treasureSmallImagePathOffset.Value, 0); }
public static Offset EndEventContentTreasureRewardExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset(o);
}
}
static public class EventContentTreasureRewardExcelVerify
{
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 /*LocalizeCodeID*/, false)
&& verifier.VerifyField(tablePos, 8 /*CellUnderImageWidth*/, 4 /*int*/, 4, false)
&& verifier.VerifyField(tablePos, 10 /*CellUnderImageHeight*/, 4 /*int*/, 4, false)
&& verifier.VerifyField(tablePos, 12 /*HiddenImage*/, 1 /*bool*/, 1, false)
&& verifier.VerifyVectorOfData(tablePos, 14 /*RewardParcelType*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, false)
&& verifier.VerifyVectorOfData(tablePos, 16 /*RewardParcelId*/, 8 /*long*/, false)
&& verifier.VerifyVectorOfData(tablePos, 18 /*RewardParcelAmount*/, 8 /*long*/, false)
&& verifier.VerifyString(tablePos, 20 /*CellUnderImagePath*/, false)
&& verifier.VerifyString(tablePos, 22 /*TreasureSmallImagePath*/, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}