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

  public string SettingName { get { int o = __p.__offset(4); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
  public Span<byte> GetSettingNameBytes() { return __p.__vector_as_span<byte>(4, 1); }
#else
  public ArraySegment<byte>? GetSettingNameBytes() { return __p.__vector_as_arraysegment(4); }
#endif
  public byte[] GetSettingNameArray() { 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 string Description { get { int o = __p.__offset(8); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
  public Span<byte> GetDescriptionBytes() { return __p.__vector_as_span<byte>(8, 1); }
#else
  public ArraySegment<byte>? GetDescriptionBytes() { return __p.__vector_as_arraysegment(8); }
#endif
  public byte[] GetDescriptionArray() { return __p.__vector_as_array<byte>(8); }

  public static Offset<NymaTypes.NSwitchPosition> CreateNSwitchPosition(FlatBufferBuilder builder,
      StringOffset SettingNameOffset = default(StringOffset),
      StringOffset NameOffset = default(StringOffset),
      StringOffset DescriptionOffset = default(StringOffset)) {
    builder.StartTable(3);
    NSwitchPosition.AddDescription(builder, DescriptionOffset);
    NSwitchPosition.AddName(builder, NameOffset);
    NSwitchPosition.AddSettingName(builder, SettingNameOffset);
    return NSwitchPosition.EndNSwitchPosition(builder);
  }

  public static void StartNSwitchPosition(FlatBufferBuilder builder) { builder.StartTable(3); }
  public static void AddSettingName(FlatBufferBuilder builder, StringOffset SettingNameOffset) { builder.AddOffset(0, SettingNameOffset.Value, 0); }
  public static void AddName(FlatBufferBuilder builder, StringOffset NameOffset) { builder.AddOffset(1, NameOffset.Value, 0); }
  public static void AddDescription(FlatBufferBuilder builder, StringOffset DescriptionOffset) { builder.AddOffset(2, DescriptionOffset.Value, 0); }
  public static Offset<NymaTypes.NSwitchPosition> EndNSwitchPosition(FlatBufferBuilder builder) {
    int o = builder.EndTable();
    return new Offset<NymaTypes.NSwitchPosition>(o);
  }
  public NSwitchPositionT UnPack() {
    var _o = new NSwitchPositionT();
    this.UnPackTo(_o);
    return _o;
  }
  public void UnPackTo(NSwitchPositionT _o) {
    _o.SettingName = this.SettingName;
    _o.Name = this.Name;
    _o.Description = this.Description;
  }
  public static Offset<NymaTypes.NSwitchPosition> Pack(FlatBufferBuilder builder, NSwitchPositionT _o) {
    if (_o == null) return default(Offset<NymaTypes.NSwitchPosition>);
    var _SettingName = _o.SettingName == null ? default(StringOffset) : builder.CreateString(_o.SettingName);
    var _Name = _o.Name == null ? default(StringOffset) : builder.CreateString(_o.Name);
    var _Description = _o.Description == null ? default(StringOffset) : builder.CreateString(_o.Description);
    return CreateNSwitchPosition(
      builder,
      _SettingName,
      _Name,
      _Description);
  }
};

public class NSwitchPositionT
{
  public string SettingName { get; set; }
  public string Name { get; set; }
  public string Description { get; set; }

  public NSwitchPositionT() {
    this.SettingName = null;
    this.Name = null;
    this.Description = null;
  }
}


}
