// // 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 CafeProductionExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static CafeProductionExcel GetRootAsCafeProductionExcel(ByteBuffer _bb) { return GetRootAsCafeProductionExcel(_bb, new CafeProductionExcel()); } public static CafeProductionExcel GetRootAsCafeProductionExcel(ByteBuffer _bb, CafeProductionExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public CafeProductionExcel __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 long Rank { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.ParcelType CafeProductionParcelType { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ParcelType.None; } } public long CafeProductionParcelId { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long ParcelProductionCoefficient { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long ParcelProductionCorrectionValue { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long ParcelStorageMax { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public static Offset CreateCafeProductionExcel(FlatBufferBuilder builder, long CafeId = 0, long Rank = 0, SCHALE.Common.FlatData.ParcelType CafeProductionParcelType = SCHALE.Common.FlatData.ParcelType.None, long CafeProductionParcelId = 0, long ParcelProductionCoefficient = 0, long ParcelProductionCorrectionValue = 0, long ParcelStorageMax = 0) { builder.StartTable(7); CafeProductionExcel.AddParcelStorageMax(builder, ParcelStorageMax); CafeProductionExcel.AddParcelProductionCorrectionValue(builder, ParcelProductionCorrectionValue); CafeProductionExcel.AddParcelProductionCoefficient(builder, ParcelProductionCoefficient); CafeProductionExcel.AddCafeProductionParcelId(builder, CafeProductionParcelId); CafeProductionExcel.AddRank(builder, Rank); CafeProductionExcel.AddCafeId(builder, CafeId); CafeProductionExcel.AddCafeProductionParcelType(builder, CafeProductionParcelType); return CafeProductionExcel.EndCafeProductionExcel(builder); } public static void StartCafeProductionExcel(FlatBufferBuilder builder) { builder.StartTable(7); } public static void AddCafeId(FlatBufferBuilder builder, long cafeId) { builder.AddLong(0, cafeId, 0); } public static void AddRank(FlatBufferBuilder builder, long rank) { builder.AddLong(1, rank, 0); } public static void AddCafeProductionParcelType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType cafeProductionParcelType) { builder.AddInt(2, (int)cafeProductionParcelType, 0); } public static void AddCafeProductionParcelId(FlatBufferBuilder builder, long cafeProductionParcelId) { builder.AddLong(3, cafeProductionParcelId, 0); } public static void AddParcelProductionCoefficient(FlatBufferBuilder builder, long parcelProductionCoefficient) { builder.AddLong(4, parcelProductionCoefficient, 0); } public static void AddParcelProductionCorrectionValue(FlatBufferBuilder builder, long parcelProductionCorrectionValue) { builder.AddLong(5, parcelProductionCorrectionValue, 0); } public static void AddParcelStorageMax(FlatBufferBuilder builder, long parcelStorageMax) { builder.AddLong(6, parcelStorageMax, 0); } public static Offset EndCafeProductionExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public CafeProductionExcelT UnPack() { var _o = new CafeProductionExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(CafeProductionExcelT _o) { byte[] key = TableEncryptionService.CreateKey("CafeProduction"); _o.CafeId = TableEncryptionService.Convert(this.CafeId, key); _o.Rank = TableEncryptionService.Convert(this.Rank, key); _o.CafeProductionParcelType = TableEncryptionService.Convert(this.CafeProductionParcelType, key); _o.CafeProductionParcelId = TableEncryptionService.Convert(this.CafeProductionParcelId, key); _o.ParcelProductionCoefficient = TableEncryptionService.Convert(this.ParcelProductionCoefficient, key); _o.ParcelProductionCorrectionValue = TableEncryptionService.Convert(this.ParcelProductionCorrectionValue, key); _o.ParcelStorageMax = TableEncryptionService.Convert(this.ParcelStorageMax, key); } public static Offset Pack(FlatBufferBuilder builder, CafeProductionExcelT _o) { if (_o == null) return default(Offset); return CreateCafeProductionExcel( builder, _o.CafeId, _o.Rank, _o.CafeProductionParcelType, _o.CafeProductionParcelId, _o.ParcelProductionCoefficient, _o.ParcelProductionCorrectionValue, _o.ParcelStorageMax); } } public class CafeProductionExcelT { public long CafeId { get; set; } public long Rank { get; set; } public SCHALE.Common.FlatData.ParcelType CafeProductionParcelType { get; set; } public long CafeProductionParcelId { get; set; } public long ParcelProductionCoefficient { get; set; } public long ParcelProductionCorrectionValue { get; set; } public long ParcelStorageMax { get; set; } public CafeProductionExcelT() { this.CafeId = 0; this.Rank = 0; this.CafeProductionParcelType = SCHALE.Common.FlatData.ParcelType.None; this.CafeProductionParcelId = 0; this.ParcelProductionCoefficient = 0; this.ParcelProductionCorrectionValue = 0; this.ParcelStorageMax = 0; } } static public class CafeProductionExcelVerify { 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 /*Rank*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 8 /*CafeProductionParcelType*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, 4, false) && verifier.VerifyField(tablePos, 10 /*CafeProductionParcelId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 12 /*ParcelProductionCoefficient*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 14 /*ParcelProductionCorrectionValue*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 16 /*ParcelStorageMax*/, 8 /*long*/, 8, false) && verifier.VerifyTableEnd(tablePos); } } }