SCHALE.GameServer/SCHALE.Common/FlatData/AttendanceRewardExcel.cs

182 lines
12 KiB
C#
Raw Normal View History

2024-04-21 00:21:57 +00:00
// <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;
2024-04-29 15:52:45 +00:00
using global::SCHALE.Common.Crypto;
2024-04-21 00:21:57 +00:00
using global::Google.FlatBuffers;
public struct AttendanceRewardExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static AttendanceRewardExcel GetRootAsAttendanceRewardExcel(ByteBuffer _bb) { return GetRootAsAttendanceRewardExcel(_bb, new AttendanceRewardExcel()); }
public static AttendanceRewardExcel GetRootAsAttendanceRewardExcel(ByteBuffer _bb, AttendanceRewardExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public AttendanceRewardExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public long AttendanceId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public long Day { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public string RewardIcon { get { int o = __p.__offset(8); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetRewardIconBytes() { return __p.__vector_as_span<byte>(8, 1); }
#else
public ArraySegment<byte>? GetRewardIconBytes() { return __p.__vector_as_arraysegment(8); }
#endif
public byte[] GetRewardIconArray() { return __p.__vector_as_array<byte>(8); }
public SCHALE.Common.FlatData.ParcelType RewardParcelType(int j) { int o = __p.__offset(10); return o != 0 ? (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.ParcelType)0; }
public int RewardParcelTypeLength { get { int o = __p.__offset(10); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span<SCHALE.Common.FlatData.ParcelType> GetRewardParcelTypeBytes() { return __p.__vector_as_span<SCHALE.Common.FlatData.ParcelType>(10, 4); }
#else
public ArraySegment<byte>? GetRewardParcelTypeBytes() { return __p.__vector_as_arraysegment(10); }
#endif
public SCHALE.Common.FlatData.ParcelType[] GetRewardParcelTypeArray() { int o = __p.__offset(10); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.ParcelType[] a = new SCHALE.Common.FlatData.ParcelType[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(p + i * 4); } return a; }
public long RewardId(int j) { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
public int RewardIdLength { get { int o = __p.__offset(12); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span<long> GetRewardIdBytes() { return __p.__vector_as_span<long>(12, 8); }
#else
public ArraySegment<byte>? GetRewardIdBytes() { return __p.__vector_as_arraysegment(12); }
#endif
public long[] GetRewardIdArray() { return __p.__vector_as_array<long>(12); }
public long RewardAmount(int j) { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
public int RewardAmountLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span<long> GetRewardAmountBytes() { return __p.__vector_as_span<long>(14, 8); }
#else
public ArraySegment<byte>? GetRewardAmountBytes() { return __p.__vector_as_arraysegment(14); }
#endif
public long[] GetRewardAmountArray() { return __p.__vector_as_array<long>(14); }
public static Offset<SCHALE.Common.FlatData.AttendanceRewardExcel> CreateAttendanceRewardExcel(FlatBufferBuilder builder,
long AttendanceId = 0,
long Day = 0,
StringOffset RewardIconOffset = default(StringOffset),
VectorOffset RewardParcelTypeOffset = default(VectorOffset),
VectorOffset RewardIdOffset = default(VectorOffset),
VectorOffset RewardAmountOffset = default(VectorOffset)) {
builder.StartTable(6);
AttendanceRewardExcel.AddDay(builder, Day);
AttendanceRewardExcel.AddAttendanceId(builder, AttendanceId);
AttendanceRewardExcel.AddRewardAmount(builder, RewardAmountOffset);
AttendanceRewardExcel.AddRewardId(builder, RewardIdOffset);
AttendanceRewardExcel.AddRewardParcelType(builder, RewardParcelTypeOffset);
AttendanceRewardExcel.AddRewardIcon(builder, RewardIconOffset);
return AttendanceRewardExcel.EndAttendanceRewardExcel(builder);
}
public static void StartAttendanceRewardExcel(FlatBufferBuilder builder) { builder.StartTable(6); }
public static void AddAttendanceId(FlatBufferBuilder builder, long attendanceId) { builder.AddLong(0, attendanceId, 0); }
public static void AddDay(FlatBufferBuilder builder, long day) { builder.AddLong(1, day, 0); }
public static void AddRewardIcon(FlatBufferBuilder builder, StringOffset rewardIconOffset) { builder.AddOffset(2, rewardIconOffset.Value, 0); }
public static void AddRewardParcelType(FlatBufferBuilder builder, VectorOffset rewardParcelTypeOffset) { builder.AddOffset(3, rewardParcelTypeOffset.Value, 0); }
public static VectorOffset CreateRewardParcelTypeVector(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddInt((int)data[i]); return builder.EndVector(); }
public static VectorOffset CreateRewardParcelTypeVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRewardParcelTypeVectorBlock(FlatBufferBuilder builder, ArraySegment<SCHALE.Common.FlatData.ParcelType> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRewardParcelTypeVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<SCHALE.Common.FlatData.ParcelType>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartRewardParcelTypeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static void AddRewardId(FlatBufferBuilder builder, VectorOffset rewardIdOffset) { builder.AddOffset(4, rewardIdOffset.Value, 0); }
public static VectorOffset CreateRewardIdVector(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 CreateRewardIdVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRewardIdVectorBlock(FlatBufferBuilder builder, ArraySegment<long> data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRewardIdVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<long>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartRewardIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
public static void AddRewardAmount(FlatBufferBuilder builder, VectorOffset rewardAmountOffset) { builder.AddOffset(5, rewardAmountOffset.Value, 0); }
public static VectorOffset CreateRewardAmountVector(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 CreateRewardAmountVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRewardAmountVectorBlock(FlatBufferBuilder builder, ArraySegment<long> data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRewardAmountVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<long>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartRewardAmountVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
public static Offset<SCHALE.Common.FlatData.AttendanceRewardExcel> EndAttendanceRewardExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.AttendanceRewardExcel>(o);
}
2024-04-29 15:52:45 +00:00
public AttendanceRewardExcelT UnPack() {
var _o = new AttendanceRewardExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(AttendanceRewardExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("AttendanceReward");
_o.AttendanceId = TableEncryptionService.Convert(this.AttendanceId, key);
_o.Day = TableEncryptionService.Convert(this.Day, key);
_o.RewardIcon = TableEncryptionService.Convert(this.RewardIcon, key);
_o.RewardParcelType = new List<SCHALE.Common.FlatData.ParcelType>();
for (var _j = 0; _j < this.RewardParcelTypeLength; ++_j) {_o.RewardParcelType.Add(TableEncryptionService.Convert(this.RewardParcelType(_j), key));}
_o.RewardId = new List<long>();
for (var _j = 0; _j < this.RewardIdLength; ++_j) {_o.RewardId.Add(TableEncryptionService.Convert(this.RewardId(_j), key));}
_o.RewardAmount = new List<long>();
for (var _j = 0; _j < this.RewardAmountLength; ++_j) {_o.RewardAmount.Add(TableEncryptionService.Convert(this.RewardAmount(_j), key));}
}
public static Offset<SCHALE.Common.FlatData.AttendanceRewardExcel> Pack(FlatBufferBuilder builder, AttendanceRewardExcelT _o) {
if (_o == null) return default(Offset<SCHALE.Common.FlatData.AttendanceRewardExcel>);
var _RewardIcon = _o.RewardIcon == null ? default(StringOffset) : builder.CreateString(_o.RewardIcon);
var _RewardParcelType = default(VectorOffset);
if (_o.RewardParcelType != null) {
var __RewardParcelType = _o.RewardParcelType.ToArray();
_RewardParcelType = CreateRewardParcelTypeVector(builder, __RewardParcelType);
}
var _RewardId = default(VectorOffset);
if (_o.RewardId != null) {
var __RewardId = _o.RewardId.ToArray();
_RewardId = CreateRewardIdVector(builder, __RewardId);
}
var _RewardAmount = default(VectorOffset);
if (_o.RewardAmount != null) {
var __RewardAmount = _o.RewardAmount.ToArray();
_RewardAmount = CreateRewardAmountVector(builder, __RewardAmount);
}
return CreateAttendanceRewardExcel(
builder,
_o.AttendanceId,
_o.Day,
_RewardIcon,
_RewardParcelType,
_RewardId,
_RewardAmount);
}
}
public class AttendanceRewardExcelT
{
public long AttendanceId { get; set; }
public long Day { get; set; }
public string RewardIcon { get; set; }
public List<SCHALE.Common.FlatData.ParcelType> RewardParcelType { get; set; }
public List<long> RewardId { get; set; }
public List<long> RewardAmount { get; set; }
public AttendanceRewardExcelT() {
this.AttendanceId = 0;
this.Day = 0;
this.RewardIcon = null;
this.RewardParcelType = null;
this.RewardId = null;
this.RewardAmount = null;
}
2024-04-21 00:21:57 +00:00
}
static public class AttendanceRewardExcelVerify
{
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
{
return verifier.VerifyTableStart(tablePos)
&& verifier.VerifyField(tablePos, 4 /*AttendanceId*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 6 /*Day*/, 8 /*long*/, 8, false)
&& verifier.VerifyString(tablePos, 8 /*RewardIcon*/, false)
&& verifier.VerifyVectorOfData(tablePos, 10 /*RewardParcelType*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, false)
&& verifier.VerifyVectorOfData(tablePos, 12 /*RewardId*/, 8 /*long*/, false)
&& verifier.VerifyVectorOfData(tablePos, 14 /*RewardAmount*/, 8 /*long*/, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}