SCHALE.GameServer/SCHALE.Common/FlatData/EventContentShopExcel.cs

232 lines
15 KiB
C#

// <auto-generated>
// automatically generated by the FlatBuffers compiler, do not modify
// </auto-generated>
namespace SCHALE.Common.FlatData
{
using global::System;
using global::System.Collections.Generic;
using global::SCHALE.Common.Crypto;
using global::Google.FlatBuffers;
public struct EventContentShopExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static EventContentShopExcel GetRootAsEventContentShopExcel(ByteBuffer _bb) { return GetRootAsEventContentShopExcel(_bb, new EventContentShopExcel()); }
public static EventContentShopExcel GetRootAsEventContentShopExcel(ByteBuffer _bb, EventContentShopExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public EventContentShopExcel __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 long Id { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public uint LocalizeEtcId { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } }
public SCHALE.Common.FlatData.ShopCategoryType CategoryType { get { int o = __p.__offset(10); return o != 0 ? (SCHALE.Common.FlatData.ShopCategoryType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ShopCategoryType.General; } }
public bool IsLegacy { get { int o = __p.__offset(12); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
public long GoodsId(int j) { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
public int GoodsIdLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span<long> GetGoodsIdBytes() { return __p.__vector_as_span<long>(14, 8); }
#else
public ArraySegment<byte>? GetGoodsIdBytes() { return __p.__vector_as_arraysegment(14); }
#endif
public long[] GetGoodsIdArray() { return __p.__vector_as_array<long>(14); }
public long DisplayOrder { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public string SalePeriodFrom { get { int o = __p.__offset(18); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetSalePeriodFromBytes() { return __p.__vector_as_span<byte>(18, 1); }
#else
public ArraySegment<byte>? GetSalePeriodFromBytes() { return __p.__vector_as_arraysegment(18); }
#endif
public byte[] GetSalePeriodFromArray() { return __p.__vector_as_array<byte>(18); }
public string SalePeriodTo { get { int o = __p.__offset(20); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetSalePeriodToBytes() { return __p.__vector_as_span<byte>(20, 1); }
#else
public ArraySegment<byte>? GetSalePeriodToBytes() { return __p.__vector_as_arraysegment(20); }
#endif
public byte[] GetSalePeriodToArray() { return __p.__vector_as_array<byte>(20); }
public long PurchaseCooltimeMin { get { int o = __p.__offset(22); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public long PurchaseCountLimit { get { int o = __p.__offset(24); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public SCHALE.Common.FlatData.PurchaseCountResetType PurchaseCountResetType_ { get { int o = __p.__offset(26); return o != 0 ? (SCHALE.Common.FlatData.PurchaseCountResetType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.PurchaseCountResetType.None; } }
public string BuyReportEventName { get { int o = __p.__offset(28); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetBuyReportEventNameBytes() { return __p.__vector_as_span<byte>(28, 1); }
#else
public ArraySegment<byte>? GetBuyReportEventNameBytes() { return __p.__vector_as_arraysegment(28); }
#endif
public byte[] GetBuyReportEventNameArray() { return __p.__vector_as_array<byte>(28); }
public bool RestrictBuyWhenInventoryFull { get { int o = __p.__offset(30); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
public static Offset<SCHALE.Common.FlatData.EventContentShopExcel> CreateEventContentShopExcel(FlatBufferBuilder builder,
long EventContentId = 0,
long Id = 0,
uint LocalizeEtcId = 0,
SCHALE.Common.FlatData.ShopCategoryType CategoryType = SCHALE.Common.FlatData.ShopCategoryType.General,
bool IsLegacy = false,
VectorOffset GoodsIdOffset = default(VectorOffset),
long DisplayOrder = 0,
StringOffset SalePeriodFromOffset = default(StringOffset),
StringOffset SalePeriodToOffset = default(StringOffset),
long PurchaseCooltimeMin = 0,
long PurchaseCountLimit = 0,
SCHALE.Common.FlatData.PurchaseCountResetType PurchaseCountResetType_ = SCHALE.Common.FlatData.PurchaseCountResetType.None,
StringOffset BuyReportEventNameOffset = default(StringOffset),
bool RestrictBuyWhenInventoryFull = false) {
builder.StartTable(14);
EventContentShopExcel.AddPurchaseCountLimit(builder, PurchaseCountLimit);
EventContentShopExcel.AddPurchaseCooltimeMin(builder, PurchaseCooltimeMin);
EventContentShopExcel.AddDisplayOrder(builder, DisplayOrder);
EventContentShopExcel.AddId(builder, Id);
EventContentShopExcel.AddEventContentId(builder, EventContentId);
EventContentShopExcel.AddBuyReportEventName(builder, BuyReportEventNameOffset);
EventContentShopExcel.AddPurchaseCountResetType_(builder, PurchaseCountResetType_);
EventContentShopExcel.AddSalePeriodTo(builder, SalePeriodToOffset);
EventContentShopExcel.AddSalePeriodFrom(builder, SalePeriodFromOffset);
EventContentShopExcel.AddGoodsId(builder, GoodsIdOffset);
EventContentShopExcel.AddCategoryType(builder, CategoryType);
EventContentShopExcel.AddLocalizeEtcId(builder, LocalizeEtcId);
EventContentShopExcel.AddRestrictBuyWhenInventoryFull(builder, RestrictBuyWhenInventoryFull);
EventContentShopExcel.AddIsLegacy(builder, IsLegacy);
return EventContentShopExcel.EndEventContentShopExcel(builder);
}
public static void StartEventContentShopExcel(FlatBufferBuilder builder) { builder.StartTable(14); }
public static void AddEventContentId(FlatBufferBuilder builder, long eventContentId) { builder.AddLong(0, eventContentId, 0); }
public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(1, id, 0); }
public static void AddLocalizeEtcId(FlatBufferBuilder builder, uint localizeEtcId) { builder.AddUint(2, localizeEtcId, 0); }
public static void AddCategoryType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ShopCategoryType categoryType) { builder.AddInt(3, (int)categoryType, 0); }
public static void AddIsLegacy(FlatBufferBuilder builder, bool isLegacy) { builder.AddBool(4, isLegacy, false); }
public static void AddGoodsId(FlatBufferBuilder builder, VectorOffset goodsIdOffset) { builder.AddOffset(5, goodsIdOffset.Value, 0); }
public static VectorOffset CreateGoodsIdVector(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddLong(data[i]); return builder.EndVector(); }
public static VectorOffset CreateGoodsIdVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateGoodsIdVectorBlock(FlatBufferBuilder builder, ArraySegment<long> data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateGoodsIdVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<long>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartGoodsIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
public static void AddDisplayOrder(FlatBufferBuilder builder, long displayOrder) { builder.AddLong(6, displayOrder, 0); }
public static void AddSalePeriodFrom(FlatBufferBuilder builder, StringOffset salePeriodFromOffset) { builder.AddOffset(7, salePeriodFromOffset.Value, 0); }
public static void AddSalePeriodTo(FlatBufferBuilder builder, StringOffset salePeriodToOffset) { builder.AddOffset(8, salePeriodToOffset.Value, 0); }
public static void AddPurchaseCooltimeMin(FlatBufferBuilder builder, long purchaseCooltimeMin) { builder.AddLong(9, purchaseCooltimeMin, 0); }
public static void AddPurchaseCountLimit(FlatBufferBuilder builder, long purchaseCountLimit) { builder.AddLong(10, purchaseCountLimit, 0); }
public static void AddPurchaseCountResetType_(FlatBufferBuilder builder, SCHALE.Common.FlatData.PurchaseCountResetType purchaseCountResetType_) { builder.AddInt(11, (int)purchaseCountResetType_, 0); }
public static void AddBuyReportEventName(FlatBufferBuilder builder, StringOffset buyReportEventNameOffset) { builder.AddOffset(12, buyReportEventNameOffset.Value, 0); }
public static void AddRestrictBuyWhenInventoryFull(FlatBufferBuilder builder, bool restrictBuyWhenInventoryFull) { builder.AddBool(13, restrictBuyWhenInventoryFull, false); }
public static Offset<SCHALE.Common.FlatData.EventContentShopExcel> EndEventContentShopExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.EventContentShopExcel>(o);
}
public EventContentShopExcelT UnPack() {
var _o = new EventContentShopExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(EventContentShopExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("EventContentShop");
_o.EventContentId = TableEncryptionService.Convert(this.EventContentId, key);
_o.Id = TableEncryptionService.Convert(this.Id, key);
_o.LocalizeEtcId = TableEncryptionService.Convert(this.LocalizeEtcId, key);
_o.CategoryType = TableEncryptionService.Convert(this.CategoryType, key);
_o.IsLegacy = TableEncryptionService.Convert(this.IsLegacy, key);
_o.GoodsId = new List<long>();
for (var _j = 0; _j < this.GoodsIdLength; ++_j) {_o.GoodsId.Add(TableEncryptionService.Convert(this.GoodsId(_j), key));}
_o.DisplayOrder = TableEncryptionService.Convert(this.DisplayOrder, key);
_o.SalePeriodFrom = TableEncryptionService.Convert(this.SalePeriodFrom, key);
_o.SalePeriodTo = TableEncryptionService.Convert(this.SalePeriodTo, key);
_o.PurchaseCooltimeMin = TableEncryptionService.Convert(this.PurchaseCooltimeMin, key);
_o.PurchaseCountLimit = TableEncryptionService.Convert(this.PurchaseCountLimit, key);
_o.PurchaseCountResetType_ = TableEncryptionService.Convert(this.PurchaseCountResetType_, key);
_o.BuyReportEventName = TableEncryptionService.Convert(this.BuyReportEventName, key);
_o.RestrictBuyWhenInventoryFull = TableEncryptionService.Convert(this.RestrictBuyWhenInventoryFull, key);
}
public static Offset<SCHALE.Common.FlatData.EventContentShopExcel> Pack(FlatBufferBuilder builder, EventContentShopExcelT _o) {
if (_o == null) return default(Offset<SCHALE.Common.FlatData.EventContentShopExcel>);
var _GoodsId = default(VectorOffset);
if (_o.GoodsId != null) {
var __GoodsId = _o.GoodsId.ToArray();
_GoodsId = CreateGoodsIdVector(builder, __GoodsId);
}
var _SalePeriodFrom = _o.SalePeriodFrom == null ? default(StringOffset) : builder.CreateString(_o.SalePeriodFrom);
var _SalePeriodTo = _o.SalePeriodTo == null ? default(StringOffset) : builder.CreateString(_o.SalePeriodTo);
var _BuyReportEventName = _o.BuyReportEventName == null ? default(StringOffset) : builder.CreateString(_o.BuyReportEventName);
return CreateEventContentShopExcel(
builder,
_o.EventContentId,
_o.Id,
_o.LocalizeEtcId,
_o.CategoryType,
_o.IsLegacy,
_GoodsId,
_o.DisplayOrder,
_SalePeriodFrom,
_SalePeriodTo,
_o.PurchaseCooltimeMin,
_o.PurchaseCountLimit,
_o.PurchaseCountResetType_,
_BuyReportEventName,
_o.RestrictBuyWhenInventoryFull);
}
}
public class EventContentShopExcelT
{
public long EventContentId { get; set; }
public long Id { get; set; }
public uint LocalizeEtcId { get; set; }
public SCHALE.Common.FlatData.ShopCategoryType CategoryType { get; set; }
public bool IsLegacy { get; set; }
public List<long> GoodsId { get; set; }
public long DisplayOrder { get; set; }
public string SalePeriodFrom { get; set; }
public string SalePeriodTo { get; set; }
public long PurchaseCooltimeMin { get; set; }
public long PurchaseCountLimit { get; set; }
public SCHALE.Common.FlatData.PurchaseCountResetType PurchaseCountResetType_ { get; set; }
public string BuyReportEventName { get; set; }
public bool RestrictBuyWhenInventoryFull { get; set; }
public EventContentShopExcelT() {
this.EventContentId = 0;
this.Id = 0;
this.LocalizeEtcId = 0;
this.CategoryType = SCHALE.Common.FlatData.ShopCategoryType.General;
this.IsLegacy = false;
this.GoodsId = null;
this.DisplayOrder = 0;
this.SalePeriodFrom = null;
this.SalePeriodTo = null;
this.PurchaseCooltimeMin = 0;
this.PurchaseCountLimit = 0;
this.PurchaseCountResetType_ = SCHALE.Common.FlatData.PurchaseCountResetType.None;
this.BuyReportEventName = null;
this.RestrictBuyWhenInventoryFull = false;
}
}
static public class EventContentShopExcelVerify
{
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
{
return verifier.VerifyTableStart(tablePos)
&& verifier.VerifyField(tablePos, 4 /*EventContentId*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 6 /*Id*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 8 /*LocalizeEtcId*/, 4 /*uint*/, 4, false)
&& verifier.VerifyField(tablePos, 10 /*CategoryType*/, 4 /*SCHALE.Common.FlatData.ShopCategoryType*/, 4, false)
&& verifier.VerifyField(tablePos, 12 /*IsLegacy*/, 1 /*bool*/, 1, false)
&& verifier.VerifyVectorOfData(tablePos, 14 /*GoodsId*/, 8 /*long*/, false)
&& verifier.VerifyField(tablePos, 16 /*DisplayOrder*/, 8 /*long*/, 8, false)
&& verifier.VerifyString(tablePos, 18 /*SalePeriodFrom*/, false)
&& verifier.VerifyString(tablePos, 20 /*SalePeriodTo*/, false)
&& verifier.VerifyField(tablePos, 22 /*PurchaseCooltimeMin*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 24 /*PurchaseCountLimit*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 26 /*PurchaseCountResetType_*/, 4 /*SCHALE.Common.FlatData.PurchaseCountResetType*/, 4, false)
&& verifier.VerifyString(tablePos, 28 /*BuyReportEventName*/, false)
&& verifier.VerifyField(tablePos, 30 /*RestrictBuyWhenInventoryFull*/, 1 /*bool*/, 1, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}