// // 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 SystemMailExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static SystemMailExcel GetRootAsSystemMailExcel(ByteBuffer _bb) { return GetRootAsSystemMailExcel(_bb, new SystemMailExcel()); } public static SystemMailExcel GetRootAsSystemMailExcel(ByteBuffer _bb, SystemMailExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public SystemMailExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public SCHALE.Common.FlatData.MailType MailType { get { int o = __p.__offset(4); return o != 0 ? (SCHALE.Common.FlatData.MailType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.MailType.System; } } public long ExpiredDay { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public string Sender { get { int o = __p.__offset(8); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetSenderBytes() { return __p.__vector_as_span(8, 1); } #else public ArraySegment? GetSenderBytes() { return __p.__vector_as_arraysegment(8); } #endif public byte[] GetSenderArray() { return __p.__vector_as_array(8); } public string Comment { get { int o = __p.__offset(10); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetCommentBytes() { return __p.__vector_as_span(10, 1); } #else public ArraySegment? GetCommentBytes() { return __p.__vector_as_arraysegment(10); } #endif public byte[] GetCommentArray() { return __p.__vector_as_array(10); } public static Offset CreateSystemMailExcel(FlatBufferBuilder builder, SCHALE.Common.FlatData.MailType MailType = SCHALE.Common.FlatData.MailType.System, long ExpiredDay = 0, StringOffset SenderOffset = default(StringOffset), StringOffset CommentOffset = default(StringOffset)) { builder.StartTable(4); SystemMailExcel.AddExpiredDay(builder, ExpiredDay); SystemMailExcel.AddComment(builder, CommentOffset); SystemMailExcel.AddSender(builder, SenderOffset); SystemMailExcel.AddMailType(builder, MailType); return SystemMailExcel.EndSystemMailExcel(builder); } public static void StartSystemMailExcel(FlatBufferBuilder builder) { builder.StartTable(4); } public static void AddMailType(FlatBufferBuilder builder, SCHALE.Common.FlatData.MailType mailType) { builder.AddInt(0, (int)mailType, 0); } public static void AddExpiredDay(FlatBufferBuilder builder, long expiredDay) { builder.AddLong(1, expiredDay, 0); } public static void AddSender(FlatBufferBuilder builder, StringOffset senderOffset) { builder.AddOffset(2, senderOffset.Value, 0); } public static void AddComment(FlatBufferBuilder builder, StringOffset commentOffset) { builder.AddOffset(3, commentOffset.Value, 0); } public static Offset EndSystemMailExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } } static public class SystemMailExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*MailType*/, 4 /*SCHALE.Common.FlatData.MailType*/, 4, false) && verifier.VerifyField(tablePos, 6 /*ExpiredDay*/, 8 /*long*/, 8, false) && verifier.VerifyString(tablePos, 8 /*Sender*/, false) && verifier.VerifyString(tablePos, 10 /*Comment*/, false) && verifier.VerifyTableEnd(tablePos); } } }