// automatically generated by the FlatBuffers compiler, do not modify

package AllWatchSerialize;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

@SuppressWarnings("unused")
public final class SimpleListEntry extends Table {
  public static SimpleListEntry getRootAsSimpleListEntry(ByteBuffer _bb) { return getRootAsSimpleListEntry(_bb, new SimpleListEntry()); }
  public static SimpleListEntry getRootAsSimpleListEntry(ByteBuffer _bb, SimpleListEntry obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
  public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
  public SimpleListEntry __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

  public short layout() { int o = __offset(4); return o != 0 ? bb.getShort(o + bb_pos) : 0; }
  public Action mainAction() { return mainAction(new Action()); }
  public Action mainAction(Action obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; }
  public Action sideActions(int j) { return sideActions(new Action(), j); }
  public Action sideActions(Action obj, int j) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; }
  public int sideActionsLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; }
  public String lines(int j) { int o = __offset(10); return o != 0 ? __string(__vector(o) + j * 4) : null; }
  public int linesLength() { int o = __offset(10); return o != 0 ? __vector_len(o) : 0; }
  public int icon(int j) { int o = __offset(12); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; }
  public int iconLength() { int o = __offset(12); return o != 0 ? __vector_len(o) : 0; }
  public ByteBuffer iconAsByteBuffer() { return __vector_as_bytebuffer(12, 1); }
  public ByteBuffer iconInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 12, 1); }

  public static int createSimpleListEntry(FlatBufferBuilder builder,
      short layout,
      int mainActionOffset,
      int sideActionsOffset,
      int linesOffset,
      int iconOffset) {
    builder.startObject(5);
    SimpleListEntry.addIcon(builder, iconOffset);
    SimpleListEntry.addLines(builder, linesOffset);
    SimpleListEntry.addSideActions(builder, sideActionsOffset);
    SimpleListEntry.addMainAction(builder, mainActionOffset);
    SimpleListEntry.addLayout(builder, layout);
    return SimpleListEntry.endSimpleListEntry(builder);
  }

  public static void startSimpleListEntry(FlatBufferBuilder builder) { builder.startObject(5); }
  public static void addLayout(FlatBufferBuilder builder, short layout) { builder.addShort(0, layout, 0); }
  public static void addMainAction(FlatBufferBuilder builder, int mainActionOffset) { builder.addOffset(1, mainActionOffset, 0); }
  public static void addSideActions(FlatBufferBuilder builder, int sideActionsOffset) { builder.addOffset(2, sideActionsOffset, 0); }
  public static int createSideActionsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); }
  public static void startSideActionsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); }
  public static void addLines(FlatBufferBuilder builder, int linesOffset) { builder.addOffset(3, linesOffset, 0); }
  public static int createLinesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); }
  public static void startLinesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); }
  public static void addIcon(FlatBufferBuilder builder, int iconOffset) { builder.addOffset(4, iconOffset, 0); }
  public static int createIconVector(FlatBufferBuilder builder, byte[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addByte(data[i]); return builder.endVector(); }
  public static void startIconVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); }
  public static int endSimpleListEntry(FlatBufferBuilder builder) {
    int o = builder.endObject();
    return o;
  }
}

