// // 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 EventContentZoneExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static EventContentZoneExcel GetRootAsEventContentZoneExcel(ByteBuffer _bb) { return GetRootAsEventContentZoneExcel(_bb, new EventContentZoneExcel()); } public static EventContentZoneExcel GetRootAsEventContentZoneExcel(ByteBuffer _bb, EventContentZoneExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public EventContentZoneExcel __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 long OriginalZoneId { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long LocationId { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long LocationRank { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long EventPointForLocationRank { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public uint LocalizeEtcId { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } public long StudentVisitProb(int j) { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int StudentVisitProbLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetStudentVisitProbBytes() { return __p.__vector_as_span(16, 8); } #else public ArraySegment? GetStudentVisitProbBytes() { return __p.__vector_as_arraysegment(16); } #endif public long[] GetStudentVisitProbArray() { return __p.__vector_as_array(16); } public long RewardGroupId { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.Tag Tags(int j) { int o = __p.__offset(20); return o != 0 ? (SCHALE.Common.FlatData.Tag)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.Tag)0; } public int TagsLength { get { int o = __p.__offset(20); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetTagsBytes() { return __p.__vector_as_span(20, 4); } #else public ArraySegment? GetTagsBytes() { return __p.__vector_as_arraysegment(20); } #endif public SCHALE.Common.FlatData.Tag[] GetTagsArray() { int o = __p.__offset(20); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.Tag[] a = new SCHALE.Common.FlatData.Tag[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.Tag)__p.bb.GetInt(p + i * 4); } return a; } public SCHALE.Common.FlatData.Tag WhiteListTags(int j) { int o = __p.__offset(22); return o != 0 ? (SCHALE.Common.FlatData.Tag)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.Tag)0; } public int WhiteListTagsLength { get { int o = __p.__offset(22); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetWhiteListTagsBytes() { return __p.__vector_as_span(22, 4); } #else public ArraySegment? GetWhiteListTagsBytes() { return __p.__vector_as_arraysegment(22); } #endif public SCHALE.Common.FlatData.Tag[] GetWhiteListTagsArray() { int o = __p.__offset(22); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.Tag[] a = new SCHALE.Common.FlatData.Tag[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.Tag)__p.bb.GetInt(p + i * 4); } return a; } public static Offset CreateEventContentZoneExcel(FlatBufferBuilder builder, long Id = 0, long OriginalZoneId = 0, long LocationId = 0, long LocationRank = 0, long EventPointForLocationRank = 0, uint LocalizeEtcId = 0, VectorOffset StudentVisitProbOffset = default(VectorOffset), long RewardGroupId = 0, VectorOffset TagsOffset = default(VectorOffset), VectorOffset WhiteListTagsOffset = default(VectorOffset)) { builder.StartTable(10); EventContentZoneExcel.AddRewardGroupId(builder, RewardGroupId); EventContentZoneExcel.AddEventPointForLocationRank(builder, EventPointForLocationRank); EventContentZoneExcel.AddLocationRank(builder, LocationRank); EventContentZoneExcel.AddLocationId(builder, LocationId); EventContentZoneExcel.AddOriginalZoneId(builder, OriginalZoneId); EventContentZoneExcel.AddId(builder, Id); EventContentZoneExcel.AddWhiteListTags(builder, WhiteListTagsOffset); EventContentZoneExcel.AddTags(builder, TagsOffset); EventContentZoneExcel.AddStudentVisitProb(builder, StudentVisitProbOffset); EventContentZoneExcel.AddLocalizeEtcId(builder, LocalizeEtcId); return EventContentZoneExcel.EndEventContentZoneExcel(builder); } public static void StartEventContentZoneExcel(FlatBufferBuilder builder) { builder.StartTable(10); } public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); } public static void AddOriginalZoneId(FlatBufferBuilder builder, long originalZoneId) { builder.AddLong(1, originalZoneId, 0); } public static void AddLocationId(FlatBufferBuilder builder, long locationId) { builder.AddLong(2, locationId, 0); } public static void AddLocationRank(FlatBufferBuilder builder, long locationRank) { builder.AddLong(3, locationRank, 0); } public static void AddEventPointForLocationRank(FlatBufferBuilder builder, long eventPointForLocationRank) { builder.AddLong(4, eventPointForLocationRank, 0); } public static void AddLocalizeEtcId(FlatBufferBuilder builder, uint localizeEtcId) { builder.AddUint(5, localizeEtcId, 0); } public static void AddStudentVisitProb(FlatBufferBuilder builder, VectorOffset studentVisitProbOffset) { builder.AddOffset(6, studentVisitProbOffset.Value, 0); } public static VectorOffset CreateStudentVisitProbVector(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 CreateStudentVisitProbVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateStudentVisitProbVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateStudentVisitProbVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartStudentVisitProbVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static void AddRewardGroupId(FlatBufferBuilder builder, long rewardGroupId) { builder.AddLong(7, rewardGroupId, 0); } public static void AddTags(FlatBufferBuilder builder, VectorOffset tagsOffset) { builder.AddOffset(8, tagsOffset.Value, 0); } public static VectorOffset CreateTagsVector(FlatBufferBuilder builder, SCHALE.Common.FlatData.Tag[] 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 CreateTagsVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.Tag[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateTagsVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateTagsVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartTagsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddWhiteListTags(FlatBufferBuilder builder, VectorOffset whiteListTagsOffset) { builder.AddOffset(9, whiteListTagsOffset.Value, 0); } public static VectorOffset CreateWhiteListTagsVector(FlatBufferBuilder builder, SCHALE.Common.FlatData.Tag[] 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 CreateWhiteListTagsVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.Tag[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateWhiteListTagsVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateWhiteListTagsVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartWhiteListTagsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static Offset EndEventContentZoneExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } } static public class EventContentZoneExcelVerify { 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 /*OriginalZoneId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 8 /*LocationId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 10 /*LocationRank*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 12 /*EventPointForLocationRank*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 14 /*LocalizeEtcId*/, 4 /*uint*/, 4, false) && verifier.VerifyVectorOfData(tablePos, 16 /*StudentVisitProb*/, 8 /*long*/, false) && verifier.VerifyField(tablePos, 18 /*RewardGroupId*/, 8 /*long*/, 8, false) && verifier.VerifyVectorOfData(tablePos, 20 /*Tags*/, 4 /*SCHALE.Common.FlatData.Tag*/, false) && verifier.VerifyVectorOfData(tablePos, 22 /*WhiteListTags*/, 4 /*SCHALE.Common.FlatData.Tag*/, false) && verifier.VerifyTableEnd(tablePos); } } }