// <auto-generated>
//  automatically generated by the FlatBuffers compiler, do not modify
// </auto-generated>

namespace NymaTypes
{

using global::System;
using global::System.Collections.Generic;
using global::FlatBuffers;

public struct NStatusState : IFlatbufferObject
{
  private Table __p;
  public ByteBuffer ByteBuffer { get { return __p.bb; } }
  public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_1_12_0(); }
  public static NStatusState GetRootAsNStatusState(ByteBuffer _bb) { return GetRootAsNStatusState(_bb, new NStatusState()); }
  public static NStatusState GetRootAsNStatusState(ByteBuffer _bb, NStatusState obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
  public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
  public NStatusState __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

  public string ShortName { get { int o = __p.__offset(4); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
  public Span<byte> GetShortNameBytes() { return __p.__vector_as_span<byte>(4, 1); }
#else
  public ArraySegment<byte>? GetShortNameBytes() { return __p.__vector_as_arraysegment(4); }
#endif
  public byte[] GetShortNameArray() { return __p.__vector_as_array<byte>(4); }
  public string Name { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
  public Span<byte> GetNameBytes() { return __p.__vector_as_span<byte>(6, 1); }
#else
  public ArraySegment<byte>? GetNameBytes() { return __p.__vector_as_arraysegment(6); }
#endif
  public byte[] GetNameArray() { return __p.__vector_as_array<byte>(6); }
  public int Color { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }

  public static Offset<NymaTypes.NStatusState> CreateNStatusState(FlatBufferBuilder builder,
      StringOffset ShortNameOffset = default(StringOffset),
      StringOffset NameOffset = default(StringOffset),
      int Color = 0) {
    builder.StartTable(3);
    NStatusState.AddColor(builder, Color);
    NStatusState.AddName(builder, NameOffset);
    NStatusState.AddShortName(builder, ShortNameOffset);
    return NStatusState.EndNStatusState(builder);
  }

  public static void StartNStatusState(FlatBufferBuilder builder) { builder.StartTable(3); }
  public static void AddShortName(FlatBufferBuilder builder, StringOffset ShortNameOffset) { builder.AddOffset(0, ShortNameOffset.Value, 0); }
  public static void AddName(FlatBufferBuilder builder, StringOffset NameOffset) { builder.AddOffset(1, NameOffset.Value, 0); }
  public static void AddColor(FlatBufferBuilder builder, int Color) { builder.AddInt(2, Color, 0); }
  public static Offset<NymaTypes.NStatusState> EndNStatusState(FlatBufferBuilder builder) {
    int o = builder.EndTable();
    return new Offset<NymaTypes.NStatusState>(o);
  }
  public NStatusStateT UnPack() {
    var _o = new NStatusStateT();
    this.UnPackTo(_o);
    return _o;
  }
  public void UnPackTo(NStatusStateT _o) {
    _o.ShortName = this.ShortName;
    _o.Name = this.Name;
    _o.Color = this.Color;
  }
  public static Offset<NymaTypes.NStatusState> Pack(FlatBufferBuilder builder, NStatusStateT _o) {
    if (_o == null) return default(Offset<NymaTypes.NStatusState>);
    var _ShortName = _o.ShortName == null ? default(StringOffset) : builder.CreateString(_o.ShortName);
    var _Name = _o.Name == null ? default(StringOffset) : builder.CreateString(_o.Name);
    return CreateNStatusState(
      builder,
      _ShortName,
      _Name,
      _o.Color);
  }
};

public class NStatusStateT
{
  public string ShortName { get; set; }
  public string Name { get; set; }
  public int Color { get; set; }

  public NStatusStateT() {
    this.ShortName = null;
    this.Name = null;
    this.Color = 0;
  }
}


}
