SCHALE.GameServer/SCHALE.Common/FlatData/ArenaSeasonExcel.cs

126 lines
6.1 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 ArenaSeasonExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static ArenaSeasonExcel GetRootAsArenaSeasonExcel(ByteBuffer _bb) { return GetRootAsArenaSeasonExcel(_bb, new ArenaSeasonExcel()); }
public static ArenaSeasonExcel GetRootAsArenaSeasonExcel(ByteBuffer _bb, ArenaSeasonExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public ArenaSeasonExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public long UniqueId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public string SeasonStartDate { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetSeasonStartDateBytes() { return __p.__vector_as_span<byte>(6, 1); }
#else
public ArraySegment<byte>? GetSeasonStartDateBytes() { return __p.__vector_as_arraysegment(6); }
#endif
public byte[] GetSeasonStartDateArray() { return __p.__vector_as_array<byte>(6); }
public string SeasonEndDate { get { int o = __p.__offset(8); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetSeasonEndDateBytes() { return __p.__vector_as_span<byte>(8, 1); }
#else
public ArraySegment<byte>? GetSeasonEndDateBytes() { return __p.__vector_as_arraysegment(8); }
#endif
public byte[] GetSeasonEndDateArray() { return __p.__vector_as_array<byte>(8); }
public long SeasonGroupLimit { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public long PrevSeasonId { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public static Offset<SCHALE.Common.FlatData.ArenaSeasonExcel> CreateArenaSeasonExcel(FlatBufferBuilder builder,
long UniqueId = 0,
StringOffset SeasonStartDateOffset = default(StringOffset),
StringOffset SeasonEndDateOffset = default(StringOffset),
long SeasonGroupLimit = 0,
long PrevSeasonId = 0) {
builder.StartTable(5);
ArenaSeasonExcel.AddPrevSeasonId(builder, PrevSeasonId);
ArenaSeasonExcel.AddSeasonGroupLimit(builder, SeasonGroupLimit);
ArenaSeasonExcel.AddUniqueId(builder, UniqueId);
ArenaSeasonExcel.AddSeasonEndDate(builder, SeasonEndDateOffset);
ArenaSeasonExcel.AddSeasonStartDate(builder, SeasonStartDateOffset);
return ArenaSeasonExcel.EndArenaSeasonExcel(builder);
}
public static void StartArenaSeasonExcel(FlatBufferBuilder builder) { builder.StartTable(5); }
public static void AddUniqueId(FlatBufferBuilder builder, long uniqueId) { builder.AddLong(0, uniqueId, 0); }
public static void AddSeasonStartDate(FlatBufferBuilder builder, StringOffset seasonStartDateOffset) { builder.AddOffset(1, seasonStartDateOffset.Value, 0); }
public static void AddSeasonEndDate(FlatBufferBuilder builder, StringOffset seasonEndDateOffset) { builder.AddOffset(2, seasonEndDateOffset.Value, 0); }
public static void AddSeasonGroupLimit(FlatBufferBuilder builder, long seasonGroupLimit) { builder.AddLong(3, seasonGroupLimit, 0); }
public static void AddPrevSeasonId(FlatBufferBuilder builder, long prevSeasonId) { builder.AddLong(4, prevSeasonId, 0); }
public static Offset<SCHALE.Common.FlatData.ArenaSeasonExcel> EndArenaSeasonExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.ArenaSeasonExcel>(o);
}
public ArenaSeasonExcelT UnPack() {
var _o = new ArenaSeasonExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(ArenaSeasonExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("ArenaSeason");
_o.UniqueId = TableEncryptionService.Convert(this.UniqueId, key);
_o.SeasonStartDate = TableEncryptionService.Convert(this.SeasonStartDate, key);
_o.SeasonEndDate = TableEncryptionService.Convert(this.SeasonEndDate, key);
_o.SeasonGroupLimit = TableEncryptionService.Convert(this.SeasonGroupLimit, key);
_o.PrevSeasonId = TableEncryptionService.Convert(this.PrevSeasonId, key);
}
public static Offset<SCHALE.Common.FlatData.ArenaSeasonExcel> Pack(FlatBufferBuilder builder, ArenaSeasonExcelT _o) {
if (_o == null) return default(Offset<SCHALE.Common.FlatData.ArenaSeasonExcel>);
var _SeasonStartDate = _o.SeasonStartDate == null ? default(StringOffset) : builder.CreateString(_o.SeasonStartDate);
var _SeasonEndDate = _o.SeasonEndDate == null ? default(StringOffset) : builder.CreateString(_o.SeasonEndDate);
return CreateArenaSeasonExcel(
builder,
_o.UniqueId,
_SeasonStartDate,
_SeasonEndDate,
_o.SeasonGroupLimit,
_o.PrevSeasonId);
}
}
public class ArenaSeasonExcelT
{
public long UniqueId { get; set; }
public string SeasonStartDate { get; set; }
public string SeasonEndDate { get; set; }
public long SeasonGroupLimit { get; set; }
public long PrevSeasonId { get; set; }
public ArenaSeasonExcelT() {
this.UniqueId = 0;
this.SeasonStartDate = null;
this.SeasonEndDate = null;
this.SeasonGroupLimit = 0;
this.PrevSeasonId = 0;
}
}
static public class ArenaSeasonExcelVerify
{
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
{
return verifier.VerifyTableStart(tablePos)
&& verifier.VerifyField(tablePos, 4 /*UniqueId*/, 8 /*long*/, 8, false)
&& verifier.VerifyString(tablePos, 6 /*SeasonStartDate*/, false)
&& verifier.VerifyString(tablePos, 8 /*SeasonEndDate*/, false)
&& verifier.VerifyField(tablePos, 10 /*SeasonGroupLimit*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 12 /*PrevSeasonId*/, 8 /*long*/, 8, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}