All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.deephaven.barrage.flatbuf.NewSessionRequest Maven / Gradle / Ivy

The newest version!
// automatically generated by the FlatBuffers compiler, do not modify

package io.deephaven.barrage.flatbuf;

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

@SuppressWarnings("unused")
/**
 * Establish a new session.
 */
public final class NewSessionRequest extends Table {
  public static void ValidateVersion() { Constants.FLATBUFFERS_1_12_0(); }
  public static NewSessionRequest getRootAsNewSessionRequest(ByteBuffer _bb) { return getRootAsNewSessionRequest(_bb, new NewSessionRequest()); }
  public static NewSessionRequest getRootAsNewSessionRequest(ByteBuffer _bb, NewSessionRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
  public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
  public NewSessionRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

  /**
   * A nested protocol version (gets delegated to handshake)
   */
  public long protocolVersion() { int o = __offset(4); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; }
  /**
   * Arbitrary auth/handshake info.
   */
  public byte payload(int j) { int o = __offset(6); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; }
  public int payloadLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; }
  public ByteVector payloadVector() { return payloadVector(new ByteVector()); }
  public ByteVector payloadVector(ByteVector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), bb) : null; }
  public ByteBuffer payloadAsByteBuffer() { return __vector_as_bytebuffer(6, 1); }
  public ByteBuffer payloadInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); }

  public static int createNewSessionRequest(FlatBufferBuilder builder,
      long protocol_version,
      int payloadOffset) {
    builder.startTable(2);
    NewSessionRequest.addPayload(builder, payloadOffset);
    NewSessionRequest.addProtocolVersion(builder, protocol_version);
    return NewSessionRequest.endNewSessionRequest(builder);
  }

  public static void startNewSessionRequest(FlatBufferBuilder builder) { builder.startTable(2); }
  public static void addProtocolVersion(FlatBufferBuilder builder, long protocolVersion) { builder.addInt(0, (int)protocolVersion, (int)0L); }
  public static void addPayload(FlatBufferBuilder builder, int payloadOffset) { builder.addOffset(1, payloadOffset, 0); }
  public static int createPayloadVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); }
  public static int createPayloadVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); }
  public static void startPayloadVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); }
  public static int endNewSessionRequest(FlatBufferBuilder builder) {
    int o = builder.endTable();
    return o;
  }

  public static final class Vector extends BaseVector {
    public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }

    public NewSessionRequest get(int j) { return get(new NewSessionRequest(), j); }
    public NewSessionRequest get(NewSessionRequest obj, int j) {  return obj.__assign(__indirect(__element(j), bb), bb); }
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy