//
// 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 LoadingImageExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static LoadingImageExcel GetRootAsLoadingImageExcel(ByteBuffer _bb) { return GetRootAsLoadingImageExcel(_bb, new LoadingImageExcel()); }
public static LoadingImageExcel GetRootAsLoadingImageExcel(ByteBuffer _bb, LoadingImageExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public LoadingImageExcel __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 string ImagePathKr { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span GetImagePathKrBytes() { return __p.__vector_as_span(6, 1); }
#else
public ArraySegment? GetImagePathKrBytes() { return __p.__vector_as_arraysegment(6); }
#endif
public byte[] GetImagePathKrArray() { return __p.__vector_as_array(6); }
public string ImagePathJp { get { int o = __p.__offset(8); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span GetImagePathJpBytes() { return __p.__vector_as_span(8, 1); }
#else
public ArraySegment? GetImagePathJpBytes() { return __p.__vector_as_arraysegment(8); }
#endif
public byte[] GetImagePathJpArray() { return __p.__vector_as_array(8); }
public int DisplayWeight { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
public static Offset CreateLoadingImageExcel(FlatBufferBuilder builder,
long ID = 0,
StringOffset ImagePathKrOffset = default(StringOffset),
StringOffset ImagePathJpOffset = default(StringOffset),
int DisplayWeight = 0) {
builder.StartTable(4);
LoadingImageExcel.AddID(builder, ID);
LoadingImageExcel.AddDisplayWeight(builder, DisplayWeight);
LoadingImageExcel.AddImagePathJp(builder, ImagePathJpOffset);
LoadingImageExcel.AddImagePathKr(builder, ImagePathKrOffset);
return LoadingImageExcel.EndLoadingImageExcel(builder);
}
public static void StartLoadingImageExcel(FlatBufferBuilder builder) { builder.StartTable(4); }
public static void AddID(FlatBufferBuilder builder, long iD) { builder.AddLong(0, iD, 0); }
public static void AddImagePathKr(FlatBufferBuilder builder, StringOffset imagePathKrOffset) { builder.AddOffset(1, imagePathKrOffset.Value, 0); }
public static void AddImagePathJp(FlatBufferBuilder builder, StringOffset imagePathJpOffset) { builder.AddOffset(2, imagePathJpOffset.Value, 0); }
public static void AddDisplayWeight(FlatBufferBuilder builder, int displayWeight) { builder.AddInt(3, displayWeight, 0); }
public static Offset EndLoadingImageExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset(o);
}
public LoadingImageExcelT UnPack() {
var _o = new LoadingImageExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(LoadingImageExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("LoadingImage");
_o.ID = TableEncryptionService.Convert(this.ID, key);
_o.ImagePathKr = TableEncryptionService.Convert(this.ImagePathKr, key);
_o.ImagePathJp = TableEncryptionService.Convert(this.ImagePathJp, key);
_o.DisplayWeight = TableEncryptionService.Convert(this.DisplayWeight, key);
}
public static Offset Pack(FlatBufferBuilder builder, LoadingImageExcelT _o) {
if (_o == null) return default(Offset);
var _ImagePathKr = _o.ImagePathKr == null ? default(StringOffset) : builder.CreateString(_o.ImagePathKr);
var _ImagePathJp = _o.ImagePathJp == null ? default(StringOffset) : builder.CreateString(_o.ImagePathJp);
return CreateLoadingImageExcel(
builder,
_o.ID,
_ImagePathKr,
_ImagePathJp,
_o.DisplayWeight);
}
}
public class LoadingImageExcelT
{
public long ID { get; set; }
public string ImagePathKr { get; set; }
public string ImagePathJp { get; set; }
public int DisplayWeight { get; set; }
public LoadingImageExcelT() {
this.ID = 0;
this.ImagePathKr = null;
this.ImagePathJp = null;
this.DisplayWeight = 0;
}
}
static public class LoadingImageExcelVerify
{
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
{
return verifier.VerifyTableStart(tablePos)
&& verifier.VerifyField(tablePos, 4 /*ID*/, 8 /*long*/, 8, false)
&& verifier.VerifyString(tablePos, 6 /*ImagePathKr*/, false)
&& verifier.VerifyString(tablePos, 8 /*ImagePathJp*/, false)
&& verifier.VerifyField(tablePos, 10 /*DisplayWeight*/, 4 /*int*/, 4, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}