// // 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 CafeInfoExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static CafeInfoExcel GetRootAsCafeInfoExcel(ByteBuffer _bb) { return GetRootAsCafeInfoExcel(_bb, new CafeInfoExcel()); } public static CafeInfoExcel GetRootAsCafeInfoExcel(ByteBuffer _bb, CafeInfoExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public CafeInfoExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public long CafeId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public bool IsDefault { get { int o = __p.__offset(6); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public SCHALE.Common.FlatData.OpenConditionContent OpenConditionCafeId { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.OpenConditionContent)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.OpenConditionContent.Shop; } } public SCHALE.Common.FlatData.OpenConditionContent OpenConditionCafeInvite { get { int o = __p.__offset(10); return o != 0 ? (SCHALE.Common.FlatData.OpenConditionContent)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.OpenConditionContent.Shop; } } public static Offset CreateCafeInfoExcel(FlatBufferBuilder builder, long CafeId = 0, bool IsDefault = false, SCHALE.Common.FlatData.OpenConditionContent OpenConditionCafeId = SCHALE.Common.FlatData.OpenConditionContent.Shop, SCHALE.Common.FlatData.OpenConditionContent OpenConditionCafeInvite = SCHALE.Common.FlatData.OpenConditionContent.Shop) { builder.StartTable(4); CafeInfoExcel.AddCafeId(builder, CafeId); CafeInfoExcel.AddOpenConditionCafeInvite(builder, OpenConditionCafeInvite); CafeInfoExcel.AddOpenConditionCafeId(builder, OpenConditionCafeId); CafeInfoExcel.AddIsDefault(builder, IsDefault); return CafeInfoExcel.EndCafeInfoExcel(builder); } public static void StartCafeInfoExcel(FlatBufferBuilder builder) { builder.StartTable(4); } public static void AddCafeId(FlatBufferBuilder builder, long cafeId) { builder.AddLong(0, cafeId, 0); } public static void AddIsDefault(FlatBufferBuilder builder, bool isDefault) { builder.AddBool(1, isDefault, false); } public static void AddOpenConditionCafeId(FlatBufferBuilder builder, SCHALE.Common.FlatData.OpenConditionContent openConditionCafeId) { builder.AddInt(2, (int)openConditionCafeId, 0); } public static void AddOpenConditionCafeInvite(FlatBufferBuilder builder, SCHALE.Common.FlatData.OpenConditionContent openConditionCafeInvite) { builder.AddInt(3, (int)openConditionCafeInvite, 0); } public static Offset EndCafeInfoExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public CafeInfoExcelT UnPack() { var _o = new CafeInfoExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(CafeInfoExcelT _o) { byte[] key = TableEncryptionService.CreateKey("CafeInfo"); _o.CafeId = TableEncryptionService.Convert(this.CafeId, key); _o.IsDefault = TableEncryptionService.Convert(this.IsDefault, key); _o.OpenConditionCafeId = TableEncryptionService.Convert(this.OpenConditionCafeId, key); _o.OpenConditionCafeInvite = TableEncryptionService.Convert(this.OpenConditionCafeInvite, key); } public static Offset Pack(FlatBufferBuilder builder, CafeInfoExcelT _o) { if (_o == null) return default(Offset); return CreateCafeInfoExcel( builder, _o.CafeId, _o.IsDefault, _o.OpenConditionCafeId, _o.OpenConditionCafeInvite); } } public class CafeInfoExcelT { public long CafeId { get; set; } public bool IsDefault { get; set; } public SCHALE.Common.FlatData.OpenConditionContent OpenConditionCafeId { get; set; } public SCHALE.Common.FlatData.OpenConditionContent OpenConditionCafeInvite { get; set; } public CafeInfoExcelT() { this.CafeId = 0; this.IsDefault = false; this.OpenConditionCafeId = SCHALE.Common.FlatData.OpenConditionContent.Shop; this.OpenConditionCafeInvite = SCHALE.Common.FlatData.OpenConditionContent.Shop; } } static public class CafeInfoExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*CafeId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 6 /*IsDefault*/, 1 /*bool*/, 1, false) && verifier.VerifyField(tablePos, 8 /*OpenConditionCafeId*/, 4 /*SCHALE.Common.FlatData.OpenConditionContent*/, 4, false) && verifier.VerifyField(tablePos, 10 /*OpenConditionCafeInvite*/, 4 /*SCHALE.Common.FlatData.OpenConditionContent*/, 4, false) && verifier.VerifyTableEnd(tablePos); } } }