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

namespace sd.graph
{

using global::System;
using global::FlatBuffers;

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

  public string Frame { get { int o = __p.__offset(4); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
  public Span<byte> GetFrameBytes() { return __p.__vector_as_span(4); }
#else
  public ArraySegment<byte>? GetFrameBytes() { return __p.__vector_as_arraysegment(4); }
#endif
  public byte[] GetFrameArray() { return __p.__vector_as_array<byte>(4); }
  public ushort Iteration { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetUshort(o + __p.bb_pos) : (ushort)0; } }

  public static Offset<FrameIteration> CreateFrameIteration(FlatBufferBuilder builder,
      StringOffset frameOffset = default(StringOffset),
      ushort iteration = 0) {
    builder.StartObject(2);
    FrameIteration.AddFrame(builder, frameOffset);
    FrameIteration.AddIteration(builder, iteration);
    return FrameIteration.EndFrameIteration(builder);
  }

  public static void StartFrameIteration(FlatBufferBuilder builder) { builder.StartObject(2); }
  public static void AddFrame(FlatBufferBuilder builder, StringOffset frameOffset) { builder.AddOffset(0, frameOffset.Value, 0); }
  public static void AddIteration(FlatBufferBuilder builder, ushort iteration) { builder.AddUshort(1, iteration, 0); }
  public static Offset<FrameIteration> EndFrameIteration(FlatBufferBuilder builder) {
    int o = builder.EndObject();
    return new Offset<FrameIteration>(o);
  }
};


}
