//
// 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 CharacterVoiceSubtitleExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static CharacterVoiceSubtitleExcel GetRootAsCharacterVoiceSubtitleExcel(ByteBuffer _bb) { return GetRootAsCharacterVoiceSubtitleExcel(_bb, new CharacterVoiceSubtitleExcel()); }
public static CharacterVoiceSubtitleExcel GetRootAsCharacterVoiceSubtitleExcel(ByteBuffer _bb, CharacterVoiceSubtitleExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public CharacterVoiceSubtitleExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public string LocalizeCVGroup { get { int o = __p.__offset(4); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span GetLocalizeCVGroupBytes() { return __p.__vector_as_span(4, 1); }
#else
public ArraySegment? GetLocalizeCVGroupBytes() { return __p.__vector_as_arraysegment(4); }
#endif
public byte[] GetLocalizeCVGroupArray() { return __p.__vector_as_array(4); }
public long CharacterVoiceGroupId { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public long Duration { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public bool Separate { get { int o = __p.__offset(10); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
public string LocalizeKR { get { int o = __p.__offset(12); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span GetLocalizeKRBytes() { return __p.__vector_as_span(12, 1); }
#else
public ArraySegment? GetLocalizeKRBytes() { return __p.__vector_as_arraysegment(12); }
#endif
public byte[] GetLocalizeKRArray() { return __p.__vector_as_array(12); }
public string LocalizeJP { get { int o = __p.__offset(14); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span GetLocalizeJPBytes() { return __p.__vector_as_span(14, 1); }
#else
public ArraySegment? GetLocalizeJPBytes() { return __p.__vector_as_arraysegment(14); }
#endif
public byte[] GetLocalizeJPArray() { return __p.__vector_as_array(14); }
public static Offset CreateCharacterVoiceSubtitleExcel(FlatBufferBuilder builder,
StringOffset LocalizeCVGroupOffset = default(StringOffset),
long CharacterVoiceGroupId = 0,
long Duration = 0,
bool Separate = false,
StringOffset LocalizeKROffset = default(StringOffset),
StringOffset LocalizeJPOffset = default(StringOffset)) {
builder.StartTable(6);
CharacterVoiceSubtitleExcel.AddDuration(builder, Duration);
CharacterVoiceSubtitleExcel.AddCharacterVoiceGroupId(builder, CharacterVoiceGroupId);
CharacterVoiceSubtitleExcel.AddLocalizeJP(builder, LocalizeJPOffset);
CharacterVoiceSubtitleExcel.AddLocalizeKR(builder, LocalizeKROffset);
CharacterVoiceSubtitleExcel.AddLocalizeCVGroup(builder, LocalizeCVGroupOffset);
CharacterVoiceSubtitleExcel.AddSeparate(builder, Separate);
return CharacterVoiceSubtitleExcel.EndCharacterVoiceSubtitleExcel(builder);
}
public static void StartCharacterVoiceSubtitleExcel(FlatBufferBuilder builder) { builder.StartTable(6); }
public static void AddLocalizeCVGroup(FlatBufferBuilder builder, StringOffset localizeCVGroupOffset) { builder.AddOffset(0, localizeCVGroupOffset.Value, 0); }
public static void AddCharacterVoiceGroupId(FlatBufferBuilder builder, long characterVoiceGroupId) { builder.AddLong(1, characterVoiceGroupId, 0); }
public static void AddDuration(FlatBufferBuilder builder, long duration) { builder.AddLong(2, duration, 0); }
public static void AddSeparate(FlatBufferBuilder builder, bool separate) { builder.AddBool(3, separate, false); }
public static void AddLocalizeKR(FlatBufferBuilder builder, StringOffset localizeKROffset) { builder.AddOffset(4, localizeKROffset.Value, 0); }
public static void AddLocalizeJP(FlatBufferBuilder builder, StringOffset localizeJPOffset) { builder.AddOffset(5, localizeJPOffset.Value, 0); }
public static Offset EndCharacterVoiceSubtitleExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset(o);
}
public CharacterVoiceSubtitleExcelT UnPack() {
var _o = new CharacterVoiceSubtitleExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(CharacterVoiceSubtitleExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("CharacterVoiceSubtitle");
_o.LocalizeCVGroup = TableEncryptionService.Convert(this.LocalizeCVGroup, key);
_o.CharacterVoiceGroupId = TableEncryptionService.Convert(this.CharacterVoiceGroupId, key);
_o.Duration = TableEncryptionService.Convert(this.Duration, key);
_o.Separate = TableEncryptionService.Convert(this.Separate, key);
_o.LocalizeKR = TableEncryptionService.Convert(this.LocalizeKR, key);
_o.LocalizeJP = TableEncryptionService.Convert(this.LocalizeJP, key);
}
public static Offset Pack(FlatBufferBuilder builder, CharacterVoiceSubtitleExcelT _o) {
if (_o == null) return default(Offset);
var _LocalizeCVGroup = _o.LocalizeCVGroup == null ? default(StringOffset) : builder.CreateString(_o.LocalizeCVGroup);
var _LocalizeKR = _o.LocalizeKR == null ? default(StringOffset) : builder.CreateString(_o.LocalizeKR);
var _LocalizeJP = _o.LocalizeJP == null ? default(StringOffset) : builder.CreateString(_o.LocalizeJP);
return CreateCharacterVoiceSubtitleExcel(
builder,
_LocalizeCVGroup,
_o.CharacterVoiceGroupId,
_o.Duration,
_o.Separate,
_LocalizeKR,
_LocalizeJP);
}
}
public class CharacterVoiceSubtitleExcelT
{
public string LocalizeCVGroup { get; set; }
public long CharacterVoiceGroupId { get; set; }
public long Duration { get; set; }
public bool Separate { get; set; }
public string LocalizeKR { get; set; }
public string LocalizeJP { get; set; }
public CharacterVoiceSubtitleExcelT() {
this.LocalizeCVGroup = null;
this.CharacterVoiceGroupId = 0;
this.Duration = 0;
this.Separate = false;
this.LocalizeKR = null;
this.LocalizeJP = null;
}
}
static public class CharacterVoiceSubtitleExcelVerify
{
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
{
return verifier.VerifyTableStart(tablePos)
&& verifier.VerifyString(tablePos, 4 /*LocalizeCVGroup*/, false)
&& verifier.VerifyField(tablePos, 6 /*CharacterVoiceGroupId*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 8 /*Duration*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 10 /*Separate*/, 1 /*bool*/, 1, false)
&& verifier.VerifyString(tablePos, 12 /*LocalizeKR*/, false)
&& verifier.VerifyString(tablePos, 14 /*LocalizeJP*/, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}