// // 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 EventContentSpoilerPopupExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static EventContentSpoilerPopupExcel GetRootAsEventContentSpoilerPopupExcel(ByteBuffer _bb) { return GetRootAsEventContentSpoilerPopupExcel(_bb, new EventContentSpoilerPopupExcel()); } public static EventContentSpoilerPopupExcel GetRootAsEventContentSpoilerPopupExcel(ByteBuffer _bb, EventContentSpoilerPopupExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public EventContentSpoilerPopupExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public long EventContentId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public string SpoilerPopupTitle { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetSpoilerPopupTitleBytes() { return __p.__vector_as_span(6, 1); } #else public ArraySegment? GetSpoilerPopupTitleBytes() { return __p.__vector_as_arraysegment(6); } #endif public byte[] GetSpoilerPopupTitleArray() { return __p.__vector_as_array(6); } public string SpoilerPopupDescription { get { int o = __p.__offset(8); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetSpoilerPopupDescriptionBytes() { return __p.__vector_as_span(8, 1); } #else public ArraySegment? GetSpoilerPopupDescriptionBytes() { return __p.__vector_as_arraysegment(8); } #endif public byte[] GetSpoilerPopupDescriptionArray() { return __p.__vector_as_array(8); } public bool IsWarningPopUp { get { int o = __p.__offset(10); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public long ConditionScenarioModeId { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public static Offset CreateEventContentSpoilerPopupExcel(FlatBufferBuilder builder, long EventContentId = 0, StringOffset SpoilerPopupTitleOffset = default(StringOffset), StringOffset SpoilerPopupDescriptionOffset = default(StringOffset), bool IsWarningPopUp = false, long ConditionScenarioModeId = 0) { builder.StartTable(5); EventContentSpoilerPopupExcel.AddConditionScenarioModeId(builder, ConditionScenarioModeId); EventContentSpoilerPopupExcel.AddEventContentId(builder, EventContentId); EventContentSpoilerPopupExcel.AddSpoilerPopupDescription(builder, SpoilerPopupDescriptionOffset); EventContentSpoilerPopupExcel.AddSpoilerPopupTitle(builder, SpoilerPopupTitleOffset); EventContentSpoilerPopupExcel.AddIsWarningPopUp(builder, IsWarningPopUp); return EventContentSpoilerPopupExcel.EndEventContentSpoilerPopupExcel(builder); } public static void StartEventContentSpoilerPopupExcel(FlatBufferBuilder builder) { builder.StartTable(5); } public static void AddEventContentId(FlatBufferBuilder builder, long eventContentId) { builder.AddLong(0, eventContentId, 0); } public static void AddSpoilerPopupTitle(FlatBufferBuilder builder, StringOffset spoilerPopupTitleOffset) { builder.AddOffset(1, spoilerPopupTitleOffset.Value, 0); } public static void AddSpoilerPopupDescription(FlatBufferBuilder builder, StringOffset spoilerPopupDescriptionOffset) { builder.AddOffset(2, spoilerPopupDescriptionOffset.Value, 0); } public static void AddIsWarningPopUp(FlatBufferBuilder builder, bool isWarningPopUp) { builder.AddBool(3, isWarningPopUp, false); } public static void AddConditionScenarioModeId(FlatBufferBuilder builder, long conditionScenarioModeId) { builder.AddLong(4, conditionScenarioModeId, 0); } public static Offset EndEventContentSpoilerPopupExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public EventContentSpoilerPopupExcelT UnPack() { var _o = new EventContentSpoilerPopupExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(EventContentSpoilerPopupExcelT _o) { byte[] key = TableEncryptionService.CreateKey("EventContentSpoilerPopup"); _o.EventContentId = TableEncryptionService.Convert(this.EventContentId, key); _o.SpoilerPopupTitle = TableEncryptionService.Convert(this.SpoilerPopupTitle, key); _o.SpoilerPopupDescription = TableEncryptionService.Convert(this.SpoilerPopupDescription, key); _o.IsWarningPopUp = TableEncryptionService.Convert(this.IsWarningPopUp, key); _o.ConditionScenarioModeId = TableEncryptionService.Convert(this.ConditionScenarioModeId, key); } public static Offset Pack(FlatBufferBuilder builder, EventContentSpoilerPopupExcelT _o) { if (_o == null) return default(Offset); var _SpoilerPopupTitle = _o.SpoilerPopupTitle == null ? default(StringOffset) : builder.CreateString(_o.SpoilerPopupTitle); var _SpoilerPopupDescription = _o.SpoilerPopupDescription == null ? default(StringOffset) : builder.CreateString(_o.SpoilerPopupDescription); return CreateEventContentSpoilerPopupExcel( builder, _o.EventContentId, _SpoilerPopupTitle, _SpoilerPopupDescription, _o.IsWarningPopUp, _o.ConditionScenarioModeId); } } public class EventContentSpoilerPopupExcelT { public long EventContentId { get; set; } public string SpoilerPopupTitle { get; set; } public string SpoilerPopupDescription { get; set; } public bool IsWarningPopUp { get; set; } public long ConditionScenarioModeId { get; set; } public EventContentSpoilerPopupExcelT() { this.EventContentId = 0; this.SpoilerPopupTitle = null; this.SpoilerPopupDescription = null; this.IsWarningPopUp = false; this.ConditionScenarioModeId = 0; } } static public class EventContentSpoilerPopupExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*EventContentId*/, 8 /*long*/, 8, false) && verifier.VerifyString(tablePos, 6 /*SpoilerPopupTitle*/, false) && verifier.VerifyString(tablePos, 8 /*SpoilerPopupDescription*/, false) && verifier.VerifyField(tablePos, 10 /*IsWarningPopUp*/, 1 /*bool*/, 1, false) && verifier.VerifyField(tablePos, 12 /*ConditionScenarioModeId*/, 8 /*long*/, 8, false) && verifier.VerifyTableEnd(tablePos); } } }