//
// 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 ArenaLevelSectionExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static ArenaLevelSectionExcel GetRootAsArenaLevelSectionExcel(ByteBuffer _bb) { return GetRootAsArenaLevelSectionExcel(_bb, new ArenaLevelSectionExcel()); }
public static ArenaLevelSectionExcel GetRootAsArenaLevelSectionExcel(ByteBuffer _bb, ArenaLevelSectionExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public ArenaLevelSectionExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public long ArenaSeasonId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public long StartLevel { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public long LastLevel { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public long UserCount { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public static Offset CreateArenaLevelSectionExcel(FlatBufferBuilder builder,
long ArenaSeasonId = 0,
long StartLevel = 0,
long LastLevel = 0,
long UserCount = 0) {
builder.StartTable(4);
ArenaLevelSectionExcel.AddUserCount(builder, UserCount);
ArenaLevelSectionExcel.AddLastLevel(builder, LastLevel);
ArenaLevelSectionExcel.AddStartLevel(builder, StartLevel);
ArenaLevelSectionExcel.AddArenaSeasonId(builder, ArenaSeasonId);
return ArenaLevelSectionExcel.EndArenaLevelSectionExcel(builder);
}
public static void StartArenaLevelSectionExcel(FlatBufferBuilder builder) { builder.StartTable(4); }
public static void AddArenaSeasonId(FlatBufferBuilder builder, long arenaSeasonId) { builder.AddLong(0, arenaSeasonId, 0); }
public static void AddStartLevel(FlatBufferBuilder builder, long startLevel) { builder.AddLong(1, startLevel, 0); }
public static void AddLastLevel(FlatBufferBuilder builder, long lastLevel) { builder.AddLong(2, lastLevel, 0); }
public static void AddUserCount(FlatBufferBuilder builder, long userCount) { builder.AddLong(3, userCount, 0); }
public static Offset EndArenaLevelSectionExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset(o);
}
public ArenaLevelSectionExcelT UnPack() {
var _o = new ArenaLevelSectionExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(ArenaLevelSectionExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("ArenaLevelSection");
_o.ArenaSeasonId = TableEncryptionService.Convert(this.ArenaSeasonId, key);
_o.StartLevel = TableEncryptionService.Convert(this.StartLevel, key);
_o.LastLevel = TableEncryptionService.Convert(this.LastLevel, key);
_o.UserCount = TableEncryptionService.Convert(this.UserCount, key);
}
public static Offset Pack(FlatBufferBuilder builder, ArenaLevelSectionExcelT _o) {
if (_o == null) return default(Offset);
return CreateArenaLevelSectionExcel(
builder,
_o.ArenaSeasonId,
_o.StartLevel,
_o.LastLevel,
_o.UserCount);
}
}
public class ArenaLevelSectionExcelT
{
public long ArenaSeasonId { get; set; }
public long StartLevel { get; set; }
public long LastLevel { get; set; }
public long UserCount { get; set; }
public ArenaLevelSectionExcelT() {
this.ArenaSeasonId = 0;
this.StartLevel = 0;
this.LastLevel = 0;
this.UserCount = 0;
}
}
static public class ArenaLevelSectionExcelVerify
{
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
{
return verifier.VerifyTableStart(tablePos)
&& verifier.VerifyField(tablePos, 4 /*ArenaSeasonId*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 6 /*StartLevel*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 8 /*LastLevel*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 10 /*UserCount*/, 8 /*long*/, 8, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}