// // 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 EventContentExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static EventContentExcel GetRootAsEventContentExcel(ByteBuffer _bb) { return GetRootAsEventContentExcel(_bb, new EventContentExcel()); } public static EventContentExcel GetRootAsEventContentExcel(ByteBuffer _bb, EventContentExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public EventContentExcel __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 DevName { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetDevNameBytes() { return __p.__vector_as_span(6, 1); } #else public ArraySegment? GetDevNameBytes() { return __p.__vector_as_arraysegment(6); } #endif public byte[] GetDevNameArray() { return __p.__vector_as_array(6); } public long EventContentId { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public string BgImagePath { get { int o = __p.__offset(10); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetBgImagePathBytes() { return __p.__vector_as_span(10, 1); } #else public ArraySegment? GetBgImagePathBytes() { return __p.__vector_as_arraysegment(10); } #endif public byte[] GetBgImagePathArray() { return __p.__vector_as_array(10); } public static Offset CreateEventContentExcel(FlatBufferBuilder builder, long Id = 0, StringOffset DevNameOffset = default(StringOffset), long EventContentId = 0, StringOffset BgImagePathOffset = default(StringOffset)) { builder.StartTable(4); EventContentExcel.AddEventContentId(builder, EventContentId); EventContentExcel.AddId(builder, Id); EventContentExcel.AddBgImagePath(builder, BgImagePathOffset); EventContentExcel.AddDevName(builder, DevNameOffset); return EventContentExcel.EndEventContentExcel(builder); } public static void StartEventContentExcel(FlatBufferBuilder builder) { builder.StartTable(4); } public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); } public static void AddDevName(FlatBufferBuilder builder, StringOffset devNameOffset) { builder.AddOffset(1, devNameOffset.Value, 0); } public static void AddEventContentId(FlatBufferBuilder builder, long eventContentId) { builder.AddLong(2, eventContentId, 0); } public static void AddBgImagePath(FlatBufferBuilder builder, StringOffset bgImagePathOffset) { builder.AddOffset(3, bgImagePathOffset.Value, 0); } public static Offset EndEventContentExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public EventContentExcelT UnPack() { var _o = new EventContentExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(EventContentExcelT _o) { byte[] key = TableEncryptionService.CreateKey("EventContent"); _o.Id = TableEncryptionService.Convert(this.Id, key); _o.DevName = TableEncryptionService.Convert(this.DevName, key); _o.EventContentId = TableEncryptionService.Convert(this.EventContentId, key); _o.BgImagePath = TableEncryptionService.Convert(this.BgImagePath, key); } public static Offset Pack(FlatBufferBuilder builder, EventContentExcelT _o) { if (_o == null) return default(Offset); var _DevName = _o.DevName == null ? default(StringOffset) : builder.CreateString(_o.DevName); var _BgImagePath = _o.BgImagePath == null ? default(StringOffset) : builder.CreateString(_o.BgImagePath); return CreateEventContentExcel( builder, _o.Id, _DevName, _o.EventContentId, _BgImagePath); } } public class EventContentExcelT { public long Id { get; set; } public string DevName { get; set; } public long EventContentId { get; set; } public string BgImagePath { get; set; } public EventContentExcelT() { this.Id = 0; this.DevName = null; this.EventContentId = 0; this.BgImagePath = null; } } static public class EventContentExcelVerify { 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 /*DevName*/, false) && verifier.VerifyField(tablePos, 8 /*EventContentId*/, 8 /*long*/, 8, false) && verifier.VerifyString(tablePos, 10 /*BgImagePath*/, false) && verifier.VerifyTableEnd(tablePos); } } }