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

package motis.intermodal;

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

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

  public motis.Position position() { return position(new motis.Position()); }
  public motis.Position position(motis.Position obj) { int o = __offset(4); return o != 0 ? obj.__init(o + bb_pos, bb) : null; }
  public motis.Interval interval() { return interval(new motis.Interval()); }
  public motis.Interval interval(motis.Interval obj) { int o = __offset(6); return o != 0 ? obj.__init(o + bb_pos, bb) : null; }
  public long minConnectionCount() { int o = __offset(8); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0; }
  public boolean extendIntervalEarlier() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; }
  public boolean extendIntervalLater() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; }

  public static void startIntermodalPretripStart(FlatBufferBuilder builder) { builder.startObject(5); }
  public static void addPosition(FlatBufferBuilder builder, int positionOffset) { builder.addStruct(0, positionOffset, 0); }
  public static void addInterval(FlatBufferBuilder builder, int intervalOffset) { builder.addStruct(1, intervalOffset, 0); }
  public static void addMinConnectionCount(FlatBufferBuilder builder, long minConnectionCount) { builder.addInt(2, (int)minConnectionCount, 0); }
  public static void addExtendIntervalEarlier(FlatBufferBuilder builder, boolean extendIntervalEarlier) { builder.addBoolean(3, extendIntervalEarlier, false); }
  public static void addExtendIntervalLater(FlatBufferBuilder builder, boolean extendIntervalLater) { builder.addBoolean(4, extendIntervalLater, false); }
  public static int endIntermodalPretripStart(FlatBufferBuilder builder) {
    int o = builder.endObject();
    return o;
  }
};

