//
// 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 ScenarioContentCollectionExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static ScenarioContentCollectionExcel GetRootAsScenarioContentCollectionExcel(ByteBuffer _bb) { return GetRootAsScenarioContentCollectionExcel(_bb, new ScenarioContentCollectionExcel()); }
public static ScenarioContentCollectionExcel GetRootAsScenarioContentCollectionExcel(ByteBuffer _bb, ScenarioContentCollectionExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public ScenarioContentCollectionExcel __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 GroupId { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public SCHALE.Common.FlatData.CollectionUnlockType UnlockConditionType { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.CollectionUnlockType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.CollectionUnlockType.None_; } }
public long UnlockConditionParameter(int j) { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
public int UnlockConditionParameterLength { get { int o = __p.__offset(10); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span GetUnlockConditionParameterBytes() { return __p.__vector_as_span(10, 8); }
#else
public ArraySegment? GetUnlockConditionParameterBytes() { return __p.__vector_as_arraysegment(10); }
#endif
public long[] GetUnlockConditionParameterArray() { return __p.__vector_as_array(10); }
public SCHALE.Common.FlatData.MultipleConditionCheckType MultipleConditionCheckType_ { get { int o = __p.__offset(12); return o != 0 ? (SCHALE.Common.FlatData.MultipleConditionCheckType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.MultipleConditionCheckType.And; } }
public long UnlockConditionCount { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public bool IsObject { get { int o = __p.__offset(16); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
public bool IsHorizon { get { int o = __p.__offset(18); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
public string EmblemResource { get { int o = __p.__offset(20); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span GetEmblemResourceBytes() { return __p.__vector_as_span(20, 1); }
#else
public ArraySegment? GetEmblemResourceBytes() { return __p.__vector_as_arraysegment(20); }
#endif
public byte[] GetEmblemResourceArray() { return __p.__vector_as_array(20); }
public string ThumbResource { get { int o = __p.__offset(22); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span GetThumbResourceBytes() { return __p.__vector_as_span(22, 1); }
#else
public ArraySegment? GetThumbResourceBytes() { return __p.__vector_as_arraysegment(22); }
#endif
public byte[] GetThumbResourceArray() { return __p.__vector_as_array(22); }
public string FullResource { get { int o = __p.__offset(24); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span GetFullResourceBytes() { return __p.__vector_as_span(24, 1); }
#else
public ArraySegment? GetFullResourceBytes() { return __p.__vector_as_arraysegment(24); }
#endif
public byte[] GetFullResourceArray() { return __p.__vector_as_array(24); }
public uint LocalizeEtcId { get { int o = __p.__offset(26); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } }
public string SubNameLocalizeCodeId { get { int o = __p.__offset(28); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span GetSubNameLocalizeCodeIdBytes() { return __p.__vector_as_span(28, 1); }
#else
public ArraySegment? GetSubNameLocalizeCodeIdBytes() { return __p.__vector_as_arraysegment(28); }
#endif
public byte[] GetSubNameLocalizeCodeIdArray() { return __p.__vector_as_array(28); }
public static Offset CreateScenarioContentCollectionExcel(FlatBufferBuilder builder,
long Id = 0,
long GroupId = 0,
SCHALE.Common.FlatData.CollectionUnlockType UnlockConditionType = SCHALE.Common.FlatData.CollectionUnlockType.None_,
VectorOffset UnlockConditionParameterOffset = default(VectorOffset),
SCHALE.Common.FlatData.MultipleConditionCheckType MultipleConditionCheckType_ = SCHALE.Common.FlatData.MultipleConditionCheckType.And,
long UnlockConditionCount = 0,
bool IsObject = false,
bool IsHorizon = false,
StringOffset EmblemResourceOffset = default(StringOffset),
StringOffset ThumbResourceOffset = default(StringOffset),
StringOffset FullResourceOffset = default(StringOffset),
uint LocalizeEtcId = 0,
StringOffset SubNameLocalizeCodeIdOffset = default(StringOffset)) {
builder.StartTable(13);
ScenarioContentCollectionExcel.AddUnlockConditionCount(builder, UnlockConditionCount);
ScenarioContentCollectionExcel.AddGroupId(builder, GroupId);
ScenarioContentCollectionExcel.AddId(builder, Id);
ScenarioContentCollectionExcel.AddSubNameLocalizeCodeId(builder, SubNameLocalizeCodeIdOffset);
ScenarioContentCollectionExcel.AddLocalizeEtcId(builder, LocalizeEtcId);
ScenarioContentCollectionExcel.AddFullResource(builder, FullResourceOffset);
ScenarioContentCollectionExcel.AddThumbResource(builder, ThumbResourceOffset);
ScenarioContentCollectionExcel.AddEmblemResource(builder, EmblemResourceOffset);
ScenarioContentCollectionExcel.AddMultipleConditionCheckType_(builder, MultipleConditionCheckType_);
ScenarioContentCollectionExcel.AddUnlockConditionParameter(builder, UnlockConditionParameterOffset);
ScenarioContentCollectionExcel.AddUnlockConditionType(builder, UnlockConditionType);
ScenarioContentCollectionExcel.AddIsHorizon(builder, IsHorizon);
ScenarioContentCollectionExcel.AddIsObject(builder, IsObject);
return ScenarioContentCollectionExcel.EndScenarioContentCollectionExcel(builder);
}
public static void StartScenarioContentCollectionExcel(FlatBufferBuilder builder) { builder.StartTable(13); }
public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); }
public static void AddGroupId(FlatBufferBuilder builder, long groupId) { builder.AddLong(1, groupId, 0); }
public static void AddUnlockConditionType(FlatBufferBuilder builder, SCHALE.Common.FlatData.CollectionUnlockType unlockConditionType) { builder.AddInt(2, (int)unlockConditionType, 0); }
public static void AddUnlockConditionParameter(FlatBufferBuilder builder, VectorOffset unlockConditionParameterOffset) { builder.AddOffset(3, unlockConditionParameterOffset.Value, 0); }
public static VectorOffset CreateUnlockConditionParameterVector(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 CreateUnlockConditionParameterVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateUnlockConditionParameterVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateUnlockConditionParameterVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartUnlockConditionParameterVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
public static void AddMultipleConditionCheckType_(FlatBufferBuilder builder, SCHALE.Common.FlatData.MultipleConditionCheckType multipleConditionCheckType_) { builder.AddInt(4, (int)multipleConditionCheckType_, 0); }
public static void AddUnlockConditionCount(FlatBufferBuilder builder, long unlockConditionCount) { builder.AddLong(5, unlockConditionCount, 0); }
public static void AddIsObject(FlatBufferBuilder builder, bool isObject) { builder.AddBool(6, isObject, false); }
public static void AddIsHorizon(FlatBufferBuilder builder, bool isHorizon) { builder.AddBool(7, isHorizon, false); }
public static void AddEmblemResource(FlatBufferBuilder builder, StringOffset emblemResourceOffset) { builder.AddOffset(8, emblemResourceOffset.Value, 0); }
public static void AddThumbResource(FlatBufferBuilder builder, StringOffset thumbResourceOffset) { builder.AddOffset(9, thumbResourceOffset.Value, 0); }
public static void AddFullResource(FlatBufferBuilder builder, StringOffset fullResourceOffset) { builder.AddOffset(10, fullResourceOffset.Value, 0); }
public static void AddLocalizeEtcId(FlatBufferBuilder builder, uint localizeEtcId) { builder.AddUint(11, localizeEtcId, 0); }
public static void AddSubNameLocalizeCodeId(FlatBufferBuilder builder, StringOffset subNameLocalizeCodeIdOffset) { builder.AddOffset(12, subNameLocalizeCodeIdOffset.Value, 0); }
public static Offset EndScenarioContentCollectionExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset(o);
}
public ScenarioContentCollectionExcelT UnPack() {
var _o = new ScenarioContentCollectionExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(ScenarioContentCollectionExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("ScenarioContentCollection");
_o.Id = TableEncryptionService.Convert(this.Id, key);
_o.GroupId = TableEncryptionService.Convert(this.GroupId, key);
_o.UnlockConditionType = TableEncryptionService.Convert(this.UnlockConditionType, key);
_o.UnlockConditionParameter = new List();
for (var _j = 0; _j < this.UnlockConditionParameterLength; ++_j) {_o.UnlockConditionParameter.Add(TableEncryptionService.Convert(this.UnlockConditionParameter(_j), key));}
_o.MultipleConditionCheckType_ = TableEncryptionService.Convert(this.MultipleConditionCheckType_, key);
_o.UnlockConditionCount = TableEncryptionService.Convert(this.UnlockConditionCount, key);
_o.IsObject = TableEncryptionService.Convert(this.IsObject, key);
_o.IsHorizon = TableEncryptionService.Convert(this.IsHorizon, key);
_o.EmblemResource = TableEncryptionService.Convert(this.EmblemResource, key);
_o.ThumbResource = TableEncryptionService.Convert(this.ThumbResource, key);
_o.FullResource = TableEncryptionService.Convert(this.FullResource, key);
_o.LocalizeEtcId = TableEncryptionService.Convert(this.LocalizeEtcId, key);
_o.SubNameLocalizeCodeId = TableEncryptionService.Convert(this.SubNameLocalizeCodeId, key);
}
public static Offset Pack(FlatBufferBuilder builder, ScenarioContentCollectionExcelT _o) {
if (_o == null) return default(Offset);
var _UnlockConditionParameter = default(VectorOffset);
if (_o.UnlockConditionParameter != null) {
var __UnlockConditionParameter = _o.UnlockConditionParameter.ToArray();
_UnlockConditionParameter = CreateUnlockConditionParameterVector(builder, __UnlockConditionParameter);
}
var _EmblemResource = _o.EmblemResource == null ? default(StringOffset) : builder.CreateString(_o.EmblemResource);
var _ThumbResource = _o.ThumbResource == null ? default(StringOffset) : builder.CreateString(_o.ThumbResource);
var _FullResource = _o.FullResource == null ? default(StringOffset) : builder.CreateString(_o.FullResource);
var _SubNameLocalizeCodeId = _o.SubNameLocalizeCodeId == null ? default(StringOffset) : builder.CreateString(_o.SubNameLocalizeCodeId);
return CreateScenarioContentCollectionExcel(
builder,
_o.Id,
_o.GroupId,
_o.UnlockConditionType,
_UnlockConditionParameter,
_o.MultipleConditionCheckType_,
_o.UnlockConditionCount,
_o.IsObject,
_o.IsHorizon,
_EmblemResource,
_ThumbResource,
_FullResource,
_o.LocalizeEtcId,
_SubNameLocalizeCodeId);
}
}
public class ScenarioContentCollectionExcelT
{
public long Id { get; set; }
public long GroupId { get; set; }
public SCHALE.Common.FlatData.CollectionUnlockType UnlockConditionType { get; set; }
public List UnlockConditionParameter { get; set; }
public SCHALE.Common.FlatData.MultipleConditionCheckType MultipleConditionCheckType_ { get; set; }
public long UnlockConditionCount { get; set; }
public bool IsObject { get; set; }
public bool IsHorizon { get; set; }
public string EmblemResource { get; set; }
public string ThumbResource { get; set; }
public string FullResource { get; set; }
public uint LocalizeEtcId { get; set; }
public string SubNameLocalizeCodeId { get; set; }
public ScenarioContentCollectionExcelT() {
this.Id = 0;
this.GroupId = 0;
this.UnlockConditionType = SCHALE.Common.FlatData.CollectionUnlockType.None_;
this.UnlockConditionParameter = null;
this.MultipleConditionCheckType_ = SCHALE.Common.FlatData.MultipleConditionCheckType.And;
this.UnlockConditionCount = 0;
this.IsObject = false;
this.IsHorizon = false;
this.EmblemResource = null;
this.ThumbResource = null;
this.FullResource = null;
this.LocalizeEtcId = 0;
this.SubNameLocalizeCodeId = null;
}
}
static public class ScenarioContentCollectionExcelVerify
{
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 /*GroupId*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 8 /*UnlockConditionType*/, 4 /*SCHALE.Common.FlatData.CollectionUnlockType*/, 4, false)
&& verifier.VerifyVectorOfData(tablePos, 10 /*UnlockConditionParameter*/, 8 /*long*/, false)
&& verifier.VerifyField(tablePos, 12 /*MultipleConditionCheckType_*/, 4 /*SCHALE.Common.FlatData.MultipleConditionCheckType*/, 4, false)
&& verifier.VerifyField(tablePos, 14 /*UnlockConditionCount*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 16 /*IsObject*/, 1 /*bool*/, 1, false)
&& verifier.VerifyField(tablePos, 18 /*IsHorizon*/, 1 /*bool*/, 1, false)
&& verifier.VerifyString(tablePos, 20 /*EmblemResource*/, false)
&& verifier.VerifyString(tablePos, 22 /*ThumbResource*/, false)
&& verifier.VerifyString(tablePos, 24 /*FullResource*/, false)
&& verifier.VerifyField(tablePos, 26 /*LocalizeEtcId*/, 4 /*uint*/, 4, false)
&& verifier.VerifyString(tablePos, 28 /*SubNameLocalizeCodeId*/, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}