// // automatically generated by the FlatBuffers compiler, do not modify // namespace SCHALE.Common.FlatData { using global::System; using global::System.Collections.Generic; using global::SCHALE.Common.Crypto; using global::Google.FlatBuffers; public struct StickerPageContentExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static StickerPageContentExcel GetRootAsStickerPageContentExcel(ByteBuffer _bb) { return GetRootAsStickerPageContentExcel(_bb, new StickerPageContentExcel()); } public static StickerPageContentExcel GetRootAsStickerPageContentExcel(ByteBuffer _bb, StickerPageContentExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public StickerPageContentExcel __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 StickerGroupId { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long StickerPageId { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long StickerSlot { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.StickerGetConditionType StickerGetConditionType_ { get { int o = __p.__offset(12); return o != 0 ? (SCHALE.Common.FlatData.StickerGetConditionType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.StickerGetConditionType.None_; } } public SCHALE.Common.FlatData.StickerCheckPassType StickerCheckPassType_ { get { int o = __p.__offset(14); return o != 0 ? (SCHALE.Common.FlatData.StickerCheckPassType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.StickerCheckPassType.None_; } } public SCHALE.Common.FlatData.GetStickerConditionType GetStickerConditionType_ { get { int o = __p.__offset(16); return o != 0 ? (SCHALE.Common.FlatData.GetStickerConditionType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.GetStickerConditionType.None_; } } public long StickerGetConditionCount { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long StickerGetConditionParameter(int j) { int o = __p.__offset(20); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int StickerGetConditionParameterLength { get { int o = __p.__offset(20); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetStickerGetConditionParameterBytes() { return __p.__vector_as_span(20, 8); } #else public ArraySegment? GetStickerGetConditionParameterBytes() { return __p.__vector_as_arraysegment(20); } #endif public long[] GetStickerGetConditionParameterArray() { return __p.__vector_as_array(20); } public SCHALE.Common.FlatData.Tag StickerGetConditionParameterTag(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 StickerGetConditionParameterTagLength { get { int o = __p.__offset(22); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetStickerGetConditionParameterTagBytes() { return __p.__vector_as_span(22, 4); } #else public ArraySegment? GetStickerGetConditionParameterTagBytes() { return __p.__vector_as_arraysegment(22); } #endif public SCHALE.Common.FlatData.Tag[] GetStickerGetConditionParameterTagArray() { 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 uint PackedStickerIconLocalizeEtcId { get { int o = __p.__offset(24); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } public string PackedStickerIconPath { get { int o = __p.__offset(26); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetPackedStickerIconPathBytes() { return __p.__vector_as_span(26, 1); } #else public ArraySegment? GetPackedStickerIconPathBytes() { return __p.__vector_as_arraysegment(26); } #endif public byte[] GetPackedStickerIconPathArray() { return __p.__vector_as_array(26); } public string IconPath { get { int o = __p.__offset(28); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetIconPathBytes() { return __p.__vector_as_span(28, 1); } #else public ArraySegment? GetIconPathBytes() { return __p.__vector_as_arraysegment(28); } #endif public byte[] GetIconPathArray() { return __p.__vector_as_array(28); } public string StickerDetailPath { get { int o = __p.__offset(30); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetStickerDetailPathBytes() { return __p.__vector_as_span(30, 1); } #else public ArraySegment? GetStickerDetailPathBytes() { return __p.__vector_as_arraysegment(30); } #endif public byte[] GetStickerDetailPathArray() { return __p.__vector_as_array(30); } public static Offset CreateStickerPageContentExcel(FlatBufferBuilder builder, long Id = 0, long StickerGroupId = 0, long StickerPageId = 0, long StickerSlot = 0, SCHALE.Common.FlatData.StickerGetConditionType StickerGetConditionType_ = SCHALE.Common.FlatData.StickerGetConditionType.None_, SCHALE.Common.FlatData.StickerCheckPassType StickerCheckPassType_ = SCHALE.Common.FlatData.StickerCheckPassType.None_, SCHALE.Common.FlatData.GetStickerConditionType GetStickerConditionType_ = SCHALE.Common.FlatData.GetStickerConditionType.None_, long StickerGetConditionCount = 0, VectorOffset StickerGetConditionParameterOffset = default(VectorOffset), VectorOffset StickerGetConditionParameterTagOffset = default(VectorOffset), uint PackedStickerIconLocalizeEtcId = 0, StringOffset PackedStickerIconPathOffset = default(StringOffset), StringOffset IconPathOffset = default(StringOffset), StringOffset StickerDetailPathOffset = default(StringOffset)) { builder.StartTable(14); StickerPageContentExcel.AddStickerGetConditionCount(builder, StickerGetConditionCount); StickerPageContentExcel.AddStickerSlot(builder, StickerSlot); StickerPageContentExcel.AddStickerPageId(builder, StickerPageId); StickerPageContentExcel.AddStickerGroupId(builder, StickerGroupId); StickerPageContentExcel.AddId(builder, Id); StickerPageContentExcel.AddStickerDetailPath(builder, StickerDetailPathOffset); StickerPageContentExcel.AddIconPath(builder, IconPathOffset); StickerPageContentExcel.AddPackedStickerIconPath(builder, PackedStickerIconPathOffset); StickerPageContentExcel.AddPackedStickerIconLocalizeEtcId(builder, PackedStickerIconLocalizeEtcId); StickerPageContentExcel.AddStickerGetConditionParameterTag(builder, StickerGetConditionParameterTagOffset); StickerPageContentExcel.AddStickerGetConditionParameter(builder, StickerGetConditionParameterOffset); StickerPageContentExcel.AddGetStickerConditionType_(builder, GetStickerConditionType_); StickerPageContentExcel.AddStickerCheckPassType_(builder, StickerCheckPassType_); StickerPageContentExcel.AddStickerGetConditionType_(builder, StickerGetConditionType_); return StickerPageContentExcel.EndStickerPageContentExcel(builder); } public static void StartStickerPageContentExcel(FlatBufferBuilder builder) { builder.StartTable(14); } public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); } public static void AddStickerGroupId(FlatBufferBuilder builder, long stickerGroupId) { builder.AddLong(1, stickerGroupId, 0); } public static void AddStickerPageId(FlatBufferBuilder builder, long stickerPageId) { builder.AddLong(2, stickerPageId, 0); } public static void AddStickerSlot(FlatBufferBuilder builder, long stickerSlot) { builder.AddLong(3, stickerSlot, 0); } public static void AddStickerGetConditionType_(FlatBufferBuilder builder, SCHALE.Common.FlatData.StickerGetConditionType stickerGetConditionType_) { builder.AddInt(4, (int)stickerGetConditionType_, 0); } public static void AddStickerCheckPassType_(FlatBufferBuilder builder, SCHALE.Common.FlatData.StickerCheckPassType stickerCheckPassType_) { builder.AddInt(5, (int)stickerCheckPassType_, 0); } public static void AddGetStickerConditionType_(FlatBufferBuilder builder, SCHALE.Common.FlatData.GetStickerConditionType getStickerConditionType_) { builder.AddInt(6, (int)getStickerConditionType_, 0); } public static void AddStickerGetConditionCount(FlatBufferBuilder builder, long stickerGetConditionCount) { builder.AddLong(7, stickerGetConditionCount, 0); } public static void AddStickerGetConditionParameter(FlatBufferBuilder builder, VectorOffset stickerGetConditionParameterOffset) { builder.AddOffset(8, stickerGetConditionParameterOffset.Value, 0); } public static VectorOffset CreateStickerGetConditionParameterVector(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 CreateStickerGetConditionParameterVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateStickerGetConditionParameterVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateStickerGetConditionParameterVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartStickerGetConditionParameterVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static void AddStickerGetConditionParameterTag(FlatBufferBuilder builder, VectorOffset stickerGetConditionParameterTagOffset) { builder.AddOffset(9, stickerGetConditionParameterTagOffset.Value, 0); } public static VectorOffset CreateStickerGetConditionParameterTagVector(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 CreateStickerGetConditionParameterTagVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.Tag[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateStickerGetConditionParameterTagVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateStickerGetConditionParameterTagVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartStickerGetConditionParameterTagVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddPackedStickerIconLocalizeEtcId(FlatBufferBuilder builder, uint packedStickerIconLocalizeEtcId) { builder.AddUint(10, packedStickerIconLocalizeEtcId, 0); } public static void AddPackedStickerIconPath(FlatBufferBuilder builder, StringOffset packedStickerIconPathOffset) { builder.AddOffset(11, packedStickerIconPathOffset.Value, 0); } public static void AddIconPath(FlatBufferBuilder builder, StringOffset iconPathOffset) { builder.AddOffset(12, iconPathOffset.Value, 0); } public static void AddStickerDetailPath(FlatBufferBuilder builder, StringOffset stickerDetailPathOffset) { builder.AddOffset(13, stickerDetailPathOffset.Value, 0); } public static Offset EndStickerPageContentExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public StickerPageContentExcelT UnPack() { var _o = new StickerPageContentExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(StickerPageContentExcelT _o) { byte[] key = TableEncryptionService.CreateKey("StickerPageContent"); _o.Id = TableEncryptionService.Convert(this.Id, key); _o.StickerGroupId = TableEncryptionService.Convert(this.StickerGroupId, key); _o.StickerPageId = TableEncryptionService.Convert(this.StickerPageId, key); _o.StickerSlot = TableEncryptionService.Convert(this.StickerSlot, key); _o.StickerGetConditionType_ = TableEncryptionService.Convert(this.StickerGetConditionType_, key); _o.StickerCheckPassType_ = TableEncryptionService.Convert(this.StickerCheckPassType_, key); _o.GetStickerConditionType_ = TableEncryptionService.Convert(this.GetStickerConditionType_, key); _o.StickerGetConditionCount = TableEncryptionService.Convert(this.StickerGetConditionCount, key); _o.StickerGetConditionParameter = new List(); for (var _j = 0; _j < this.StickerGetConditionParameterLength; ++_j) {_o.StickerGetConditionParameter.Add(TableEncryptionService.Convert(this.StickerGetConditionParameter(_j), key));} _o.StickerGetConditionParameterTag = new List(); for (var _j = 0; _j < this.StickerGetConditionParameterTagLength; ++_j) {_o.StickerGetConditionParameterTag.Add(TableEncryptionService.Convert(this.StickerGetConditionParameterTag(_j), key));} _o.PackedStickerIconLocalizeEtcId = TableEncryptionService.Convert(this.PackedStickerIconLocalizeEtcId, key); _o.PackedStickerIconPath = TableEncryptionService.Convert(this.PackedStickerIconPath, key); _o.IconPath = TableEncryptionService.Convert(this.IconPath, key); _o.StickerDetailPath = TableEncryptionService.Convert(this.StickerDetailPath, key); } public static Offset Pack(FlatBufferBuilder builder, StickerPageContentExcelT _o) { if (_o == null) return default(Offset); var _StickerGetConditionParameter = default(VectorOffset); if (_o.StickerGetConditionParameter != null) { var __StickerGetConditionParameter = _o.StickerGetConditionParameter.ToArray(); _StickerGetConditionParameter = CreateStickerGetConditionParameterVector(builder, __StickerGetConditionParameter); } var _StickerGetConditionParameterTag = default(VectorOffset); if (_o.StickerGetConditionParameterTag != null) { var __StickerGetConditionParameterTag = _o.StickerGetConditionParameterTag.ToArray(); _StickerGetConditionParameterTag = CreateStickerGetConditionParameterTagVector(builder, __StickerGetConditionParameterTag); } var _PackedStickerIconPath = _o.PackedStickerIconPath == null ? default(StringOffset) : builder.CreateString(_o.PackedStickerIconPath); var _IconPath = _o.IconPath == null ? default(StringOffset) : builder.CreateString(_o.IconPath); var _StickerDetailPath = _o.StickerDetailPath == null ? default(StringOffset) : builder.CreateString(_o.StickerDetailPath); return CreateStickerPageContentExcel( builder, _o.Id, _o.StickerGroupId, _o.StickerPageId, _o.StickerSlot, _o.StickerGetConditionType_, _o.StickerCheckPassType_, _o.GetStickerConditionType_, _o.StickerGetConditionCount, _StickerGetConditionParameter, _StickerGetConditionParameterTag, _o.PackedStickerIconLocalizeEtcId, _PackedStickerIconPath, _IconPath, _StickerDetailPath); } } public class StickerPageContentExcelT { public long Id { get; set; } public long StickerGroupId { get; set; } public long StickerPageId { get; set; } public long StickerSlot { get; set; } public SCHALE.Common.FlatData.StickerGetConditionType StickerGetConditionType_ { get; set; } public SCHALE.Common.FlatData.StickerCheckPassType StickerCheckPassType_ { get; set; } public SCHALE.Common.FlatData.GetStickerConditionType GetStickerConditionType_ { get; set; } public long StickerGetConditionCount { get; set; } public List StickerGetConditionParameter { get; set; } public List StickerGetConditionParameterTag { get; set; } public uint PackedStickerIconLocalizeEtcId { get; set; } public string PackedStickerIconPath { get; set; } public string IconPath { get; set; } public string StickerDetailPath { get; set; } public StickerPageContentExcelT() { this.Id = 0; this.StickerGroupId = 0; this.StickerPageId = 0; this.StickerSlot = 0; this.StickerGetConditionType_ = SCHALE.Common.FlatData.StickerGetConditionType.None_; this.StickerCheckPassType_ = SCHALE.Common.FlatData.StickerCheckPassType.None_; this.GetStickerConditionType_ = SCHALE.Common.FlatData.GetStickerConditionType.None_; this.StickerGetConditionCount = 0; this.StickerGetConditionParameter = null; this.StickerGetConditionParameterTag = null; this.PackedStickerIconLocalizeEtcId = 0; this.PackedStickerIconPath = null; this.IconPath = null; this.StickerDetailPath = null; } } static public class StickerPageContentExcelVerify { 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 /*StickerGroupId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 8 /*StickerPageId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 10 /*StickerSlot*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 12 /*StickerGetConditionType_*/, 4 /*SCHALE.Common.FlatData.StickerGetConditionType*/, 4, false) && verifier.VerifyField(tablePos, 14 /*StickerCheckPassType_*/, 4 /*SCHALE.Common.FlatData.StickerCheckPassType*/, 4, false) && verifier.VerifyField(tablePos, 16 /*GetStickerConditionType_*/, 4 /*SCHALE.Common.FlatData.GetStickerConditionType*/, 4, false) && verifier.VerifyField(tablePos, 18 /*StickerGetConditionCount*/, 8 /*long*/, 8, false) && verifier.VerifyVectorOfData(tablePos, 20 /*StickerGetConditionParameter*/, 8 /*long*/, false) && verifier.VerifyVectorOfData(tablePos, 22 /*StickerGetConditionParameterTag*/, 4 /*SCHALE.Common.FlatData.Tag*/, false) && verifier.VerifyField(tablePos, 24 /*PackedStickerIconLocalizeEtcId*/, 4 /*uint*/, 4, false) && verifier.VerifyString(tablePos, 26 /*PackedStickerIconPath*/, false) && verifier.VerifyString(tablePos, 28 /*IconPath*/, false) && verifier.VerifyString(tablePos, 30 /*StickerDetailPath*/, false) && verifier.VerifyTableEnd(tablePos); } } }