// <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 EnumValue : IFlatbufferObject
{
  private Table __p;
  public ByteBuffer ByteBuffer { get { return __p.bb; } }
  public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_1_12_0(); }
  public static EnumValue GetRootAsEnumValue(ByteBuffer _bb) { return GetRootAsEnumValue(_bb, new EnumValue()); }
  public static EnumValue GetRootAsEnumValue(ByteBuffer _bb, EnumValue obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
  public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
  public EnumValue __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

  public string Name { get { int o = __p.__offset(4); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
  public Span<byte> GetNameBytes() { return __p.__vector_as_span<byte>(4, 1); }
#else
  public ArraySegment<byte>? GetNameBytes() { return __p.__vector_as_arraysegment(4); }
#endif
  public byte[] GetNameArray() { return __p.__vector_as_array<byte>(4); }
  public string Description { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
  public Span<byte> GetDescriptionBytes() { return __p.__vector_as_span<byte>(6, 1); }
#else
  public ArraySegment<byte>? GetDescriptionBytes() { return __p.__vector_as_arraysegment(6); }
#endif
  public byte[] GetDescriptionArray() { return __p.__vector_as_array<byte>(6); }
  public string Value { get { int o = __p.__offset(8); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
  public Span<byte> GetValueBytes() { return __p.__vector_as_span<byte>(8, 1); }
#else
  public ArraySegment<byte>? GetValueBytes() { return __p.__vector_as_arraysegment(8); }
#endif
  public byte[] GetValueArray() { return __p.__vector_as_array<byte>(8); }

  public static Offset<NymaTypes.EnumValue> CreateEnumValue(FlatBufferBuilder builder,
      StringOffset NameOffset = default(StringOffset),
      StringOffset DescriptionOffset = default(StringOffset),
      StringOffset ValueOffset = default(StringOffset)) {
    builder.StartTable(3);
    EnumValue.AddValue(builder, ValueOffset);
    EnumValue.AddDescription(builder, DescriptionOffset);
    EnumValue.AddName(builder, NameOffset);
    return EnumValue.EndEnumValue(builder);
  }

  public static void StartEnumValue(FlatBufferBuilder builder) { builder.StartTable(3); }
  public static void AddName(FlatBufferBuilder builder, StringOffset NameOffset) { builder.AddOffset(0, NameOffset.Value, 0); }
  public static void AddDescription(FlatBufferBuilder builder, StringOffset DescriptionOffset) { builder.AddOffset(1, DescriptionOffset.Value, 0); }
  public static void AddValue(FlatBufferBuilder builder, StringOffset ValueOffset) { builder.AddOffset(2, ValueOffset.Value, 0); }
  public static Offset<NymaTypes.EnumValue> EndEnumValue(FlatBufferBuilder builder) {
    int o = builder.EndTable();
    return new Offset<NymaTypes.EnumValue>(o);
  }
  public EnumValueT UnPack() {
    var _o = new EnumValueT();
    this.UnPackTo(_o);
    return _o;
  }
  public void UnPackTo(EnumValueT _o) {
    _o.Name = this.Name;
    _o.Description = this.Description;
    _o.Value = this.Value;
  }
  public static Offset<NymaTypes.EnumValue> Pack(FlatBufferBuilder builder, EnumValueT _o) {
    if (_o == null) return default(Offset<NymaTypes.EnumValue>);
    var _Name = _o.Name == null ? default(StringOffset) : builder.CreateString(_o.Name);
    var _Description = _o.Description == null ? default(StringOffset) : builder.CreateString(_o.Description);
    var _Value = _o.Value == null ? default(StringOffset) : builder.CreateString(_o.Value);
    return CreateEnumValue(
      builder,
      _Name,
      _Description,
      _Value);
  }
};

public class EnumValueT
{
  public string Name { get; set; }
  public string Description { get; set; }
  public string Value { get; set; }

  public EnumValueT() {
    this.Name = null;
    this.Description = null;
    this.Value = null;
  }
}


}
