// // 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 ShopCashExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static ShopCashExcel GetRootAsShopCashExcel(ByteBuffer _bb) { return GetRootAsShopCashExcel(_bb, new ShopCashExcel()); } public static ShopCashExcel GetRootAsShopCashExcel(ByteBuffer _bb, ShopCashExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public ShopCashExcel __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 long CashProductId { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.PurchaseSourceType PackageType { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.PurchaseSourceType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.PurchaseSourceType.None; } } public uint LocalizeEtcId { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } public string IconPath { get { int o = __p.__offset(12); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetIconPathBytes() { return __p.__vector_as_span(12, 1); } #else public ArraySegment? GetIconPathBytes() { return __p.__vector_as_arraysegment(12); } #endif public byte[] GetIconPathArray() { return __p.__vector_as_array(12); } public long DisplayOrder { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long RenewalDisplayOrder { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.ProductCategory CategoryType { get { int o = __p.__offset(18); return o != 0 ? (SCHALE.Common.FlatData.ProductCategory)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ProductCategory.None; } } public SCHALE.Common.FlatData.ProductDisplayTag DisplayTag { get { int o = __p.__offset(20); return o != 0 ? (SCHALE.Common.FlatData.ProductDisplayTag)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ProductDisplayTag.None; } } public string SalePeriodFrom { get { int o = __p.__offset(22); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetSalePeriodFromBytes() { return __p.__vector_as_span(22, 1); } #else public ArraySegment? GetSalePeriodFromBytes() { return __p.__vector_as_arraysegment(22); } #endif public byte[] GetSalePeriodFromArray() { return __p.__vector_as_array(22); } public string SalePeriodTo { get { int o = __p.__offset(24); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetSalePeriodToBytes() { return __p.__vector_as_span(24, 1); } #else public ArraySegment? GetSalePeriodToBytes() { return __p.__vector_as_arraysegment(24); } #endif public byte[] GetSalePeriodToArray() { return __p.__vector_as_array(24); } public bool PeriodTag { get { int o = __p.__offset(26); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public long AccountLevelLimit { get { int o = __p.__offset(28); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public bool AccountLevelHide { get { int o = __p.__offset(30); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public long ClearMissionLimit { get { int o = __p.__offset(32); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public bool ClearMissionHide { get { int o = __p.__offset(34); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public string PurchaseReportEventName { get { int o = __p.__offset(36); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetPurchaseReportEventNameBytes() { return __p.__vector_as_span(36, 1); } #else public ArraySegment? GetPurchaseReportEventNameBytes() { return __p.__vector_as_arraysegment(36); } #endif public byte[] GetPurchaseReportEventNameArray() { return __p.__vector_as_array(36); } public static Offset CreateShopCashExcel(FlatBufferBuilder builder, long Id = 0, long CashProductId = 0, SCHALE.Common.FlatData.PurchaseSourceType PackageType = SCHALE.Common.FlatData.PurchaseSourceType.None, uint LocalizeEtcId = 0, StringOffset IconPathOffset = default(StringOffset), long DisplayOrder = 0, long RenewalDisplayOrder = 0, SCHALE.Common.FlatData.ProductCategory CategoryType = SCHALE.Common.FlatData.ProductCategory.None, SCHALE.Common.FlatData.ProductDisplayTag DisplayTag = SCHALE.Common.FlatData.ProductDisplayTag.None, StringOffset SalePeriodFromOffset = default(StringOffset), StringOffset SalePeriodToOffset = default(StringOffset), bool PeriodTag = false, long AccountLevelLimit = 0, bool AccountLevelHide = false, long ClearMissionLimit = 0, bool ClearMissionHide = false, StringOffset PurchaseReportEventNameOffset = default(StringOffset)) { builder.StartTable(17); ShopCashExcel.AddClearMissionLimit(builder, ClearMissionLimit); ShopCashExcel.AddAccountLevelLimit(builder, AccountLevelLimit); ShopCashExcel.AddRenewalDisplayOrder(builder, RenewalDisplayOrder); ShopCashExcel.AddDisplayOrder(builder, DisplayOrder); ShopCashExcel.AddCashProductId(builder, CashProductId); ShopCashExcel.AddId(builder, Id); ShopCashExcel.AddPurchaseReportEventName(builder, PurchaseReportEventNameOffset); ShopCashExcel.AddSalePeriodTo(builder, SalePeriodToOffset); ShopCashExcel.AddSalePeriodFrom(builder, SalePeriodFromOffset); ShopCashExcel.AddDisplayTag(builder, DisplayTag); ShopCashExcel.AddCategoryType(builder, CategoryType); ShopCashExcel.AddIconPath(builder, IconPathOffset); ShopCashExcel.AddLocalizeEtcId(builder, LocalizeEtcId); ShopCashExcel.AddPackageType(builder, PackageType); ShopCashExcel.AddClearMissionHide(builder, ClearMissionHide); ShopCashExcel.AddAccountLevelHide(builder, AccountLevelHide); ShopCashExcel.AddPeriodTag(builder, PeriodTag); return ShopCashExcel.EndShopCashExcel(builder); } public static void StartShopCashExcel(FlatBufferBuilder builder) { builder.StartTable(17); } public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); } public static void AddCashProductId(FlatBufferBuilder builder, long cashProductId) { builder.AddLong(1, cashProductId, 0); } public static void AddPackageType(FlatBufferBuilder builder, SCHALE.Common.FlatData.PurchaseSourceType packageType) { builder.AddInt(2, (int)packageType, 0); } public static void AddLocalizeEtcId(FlatBufferBuilder builder, uint localizeEtcId) { builder.AddUint(3, localizeEtcId, 0); } public static void AddIconPath(FlatBufferBuilder builder, StringOffset iconPathOffset) { builder.AddOffset(4, iconPathOffset.Value, 0); } public static void AddDisplayOrder(FlatBufferBuilder builder, long displayOrder) { builder.AddLong(5, displayOrder, 0); } public static void AddRenewalDisplayOrder(FlatBufferBuilder builder, long renewalDisplayOrder) { builder.AddLong(6, renewalDisplayOrder, 0); } public static void AddCategoryType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ProductCategory categoryType) { builder.AddInt(7, (int)categoryType, 0); } public static void AddDisplayTag(FlatBufferBuilder builder, SCHALE.Common.FlatData.ProductDisplayTag displayTag) { builder.AddInt(8, (int)displayTag, 0); } public static void AddSalePeriodFrom(FlatBufferBuilder builder, StringOffset salePeriodFromOffset) { builder.AddOffset(9, salePeriodFromOffset.Value, 0); } public static void AddSalePeriodTo(FlatBufferBuilder builder, StringOffset salePeriodToOffset) { builder.AddOffset(10, salePeriodToOffset.Value, 0); } public static void AddPeriodTag(FlatBufferBuilder builder, bool periodTag) { builder.AddBool(11, periodTag, false); } public static void AddAccountLevelLimit(FlatBufferBuilder builder, long accountLevelLimit) { builder.AddLong(12, accountLevelLimit, 0); } public static void AddAccountLevelHide(FlatBufferBuilder builder, bool accountLevelHide) { builder.AddBool(13, accountLevelHide, false); } public static void AddClearMissionLimit(FlatBufferBuilder builder, long clearMissionLimit) { builder.AddLong(14, clearMissionLimit, 0); } public static void AddClearMissionHide(FlatBufferBuilder builder, bool clearMissionHide) { builder.AddBool(15, clearMissionHide, false); } public static void AddPurchaseReportEventName(FlatBufferBuilder builder, StringOffset purchaseReportEventNameOffset) { builder.AddOffset(16, purchaseReportEventNameOffset.Value, 0); } public static Offset EndShopCashExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public ShopCashExcelT UnPack() { var _o = new ShopCashExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(ShopCashExcelT _o) { byte[] key = TableEncryptionService.CreateKey("ShopCash"); _o.Id = TableEncryptionService.Convert(this.Id, key); _o.CashProductId = TableEncryptionService.Convert(this.CashProductId, key); _o.PackageType = TableEncryptionService.Convert(this.PackageType, key); _o.LocalizeEtcId = TableEncryptionService.Convert(this.LocalizeEtcId, key); _o.IconPath = TableEncryptionService.Convert(this.IconPath, key); _o.DisplayOrder = TableEncryptionService.Convert(this.DisplayOrder, key); _o.RenewalDisplayOrder = TableEncryptionService.Convert(this.RenewalDisplayOrder, key); _o.CategoryType = TableEncryptionService.Convert(this.CategoryType, key); _o.DisplayTag = TableEncryptionService.Convert(this.DisplayTag, key); _o.SalePeriodFrom = TableEncryptionService.Convert(this.SalePeriodFrom, key); _o.SalePeriodTo = TableEncryptionService.Convert(this.SalePeriodTo, key); _o.PeriodTag = TableEncryptionService.Convert(this.PeriodTag, key); _o.AccountLevelLimit = TableEncryptionService.Convert(this.AccountLevelLimit, key); _o.AccountLevelHide = TableEncryptionService.Convert(this.AccountLevelHide, key); _o.ClearMissionLimit = TableEncryptionService.Convert(this.ClearMissionLimit, key); _o.ClearMissionHide = TableEncryptionService.Convert(this.ClearMissionHide, key); _o.PurchaseReportEventName = TableEncryptionService.Convert(this.PurchaseReportEventName, key); } public static Offset Pack(FlatBufferBuilder builder, ShopCashExcelT _o) { if (_o == null) return default(Offset); var _IconPath = _o.IconPath == null ? default(StringOffset) : builder.CreateString(_o.IconPath); var _SalePeriodFrom = _o.SalePeriodFrom == null ? default(StringOffset) : builder.CreateString(_o.SalePeriodFrom); var _SalePeriodTo = _o.SalePeriodTo == null ? default(StringOffset) : builder.CreateString(_o.SalePeriodTo); var _PurchaseReportEventName = _o.PurchaseReportEventName == null ? default(StringOffset) : builder.CreateString(_o.PurchaseReportEventName); return CreateShopCashExcel( builder, _o.Id, _o.CashProductId, _o.PackageType, _o.LocalizeEtcId, _IconPath, _o.DisplayOrder, _o.RenewalDisplayOrder, _o.CategoryType, _o.DisplayTag, _SalePeriodFrom, _SalePeriodTo, _o.PeriodTag, _o.AccountLevelLimit, _o.AccountLevelHide, _o.ClearMissionLimit, _o.ClearMissionHide, _PurchaseReportEventName); } } public class ShopCashExcelT { public long Id { get; set; } public long CashProductId { get; set; } public SCHALE.Common.FlatData.PurchaseSourceType PackageType { get; set; } public uint LocalizeEtcId { get; set; } public string IconPath { get; set; } public long DisplayOrder { get; set; } public long RenewalDisplayOrder { get; set; } public SCHALE.Common.FlatData.ProductCategory CategoryType { get; set; } public SCHALE.Common.FlatData.ProductDisplayTag DisplayTag { get; set; } public string SalePeriodFrom { get; set; } public string SalePeriodTo { get; set; } public bool PeriodTag { get; set; } public long AccountLevelLimit { get; set; } public bool AccountLevelHide { get; set; } public long ClearMissionLimit { get; set; } public bool ClearMissionHide { get; set; } public string PurchaseReportEventName { get; set; } public ShopCashExcelT() { this.Id = 0; this.CashProductId = 0; this.PackageType = SCHALE.Common.FlatData.PurchaseSourceType.None; this.LocalizeEtcId = 0; this.IconPath = null; this.DisplayOrder = 0; this.RenewalDisplayOrder = 0; this.CategoryType = SCHALE.Common.FlatData.ProductCategory.None; this.DisplayTag = SCHALE.Common.FlatData.ProductDisplayTag.None; this.SalePeriodFrom = null; this.SalePeriodTo = null; this.PeriodTag = false; this.AccountLevelLimit = 0; this.AccountLevelHide = false; this.ClearMissionLimit = 0; this.ClearMissionHide = false; this.PurchaseReportEventName = null; } } static public class ShopCashExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*Id*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 6 /*CashProductId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 8 /*PackageType*/, 4 /*SCHALE.Common.FlatData.PurchaseSourceType*/, 4, false) && verifier.VerifyField(tablePos, 10 /*LocalizeEtcId*/, 4 /*uint*/, 4, false) && verifier.VerifyString(tablePos, 12 /*IconPath*/, false) && verifier.VerifyField(tablePos, 14 /*DisplayOrder*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 16 /*RenewalDisplayOrder*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 18 /*CategoryType*/, 4 /*SCHALE.Common.FlatData.ProductCategory*/, 4, false) && verifier.VerifyField(tablePos, 20 /*DisplayTag*/, 4 /*SCHALE.Common.FlatData.ProductDisplayTag*/, 4, false) && verifier.VerifyString(tablePos, 22 /*SalePeriodFrom*/, false) && verifier.VerifyString(tablePos, 24 /*SalePeriodTo*/, false) && verifier.VerifyField(tablePos, 26 /*PeriodTag*/, 1 /*bool*/, 1, false) && verifier.VerifyField(tablePos, 28 /*AccountLevelLimit*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 30 /*AccountLevelHide*/, 1 /*bool*/, 1, false) && verifier.VerifyField(tablePos, 32 /*ClearMissionLimit*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 34 /*ClearMissionHide*/, 1 /*bool*/, 1, false) && verifier.VerifyString(tablePos, 36 /*PurchaseReportEventName*/, false) && verifier.VerifyTableEnd(tablePos); } } }