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

io.deephaven.barrage.flatbuf.SessionInfoResponse 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")
/**
 * Information about the current session state.
 */
public final class SessionInfoResponse extends Table {
  public static void ValidateVersion() { Constants.FLATBUFFERS_1_12_0(); }
  public static SessionInfoResponse getRootAsSessionInfoResponse(ByteBuffer _bb) { return getRootAsSessionInfoResponse(_bb, new SessionInfoResponse()); }
  public static SessionInfoResponse getRootAsSessionInfoResponse(ByteBuffer _bb, SessionInfoResponse 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 SessionInfoResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

  /**
   * this is the metadata header to identify this session with future requests; it must be lower-case and remain static for the life of the session
   */
  public byte metadataHeader(int j) { int o = __offset(4); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; }
  public int metadataHeaderLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; }
  public ByteVector metadataHeaderVector() { return metadataHeaderVector(new ByteVector()); }
  public ByteVector metadataHeaderVector(ByteVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), bb) : null; }
  public ByteBuffer metadataHeaderAsByteBuffer() { return __vector_as_bytebuffer(4, 1); }
  public ByteBuffer metadataHeaderInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); }
  /**
   * this is the session_token; note that it may rotate
   */
  public byte sessionToken(int j) { int o = __offset(6); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; }
  public int sessionTokenLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; }
  public ByteVector sessionTokenVector() { return sessionTokenVector(new ByteVector()); }
  public ByteVector sessionTokenVector(ByteVector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), bb) : null; }
  public ByteBuffer sessionTokenAsByteBuffer() { return __vector_as_bytebuffer(6, 1); }
  public ByteBuffer sessionTokenInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); }
  /**
   * a suggested time for the user to refresh the session if they do not do so earlier; value is denoted in milliseconds since epoch
   */
  public long tokenRefreshDeadlineMs() { int o = __offset(8); return o != 0 ? bb.getLong(o + bb_pos) : 0L; }

  public static int createSessionInfoResponse(FlatBufferBuilder builder,
      int metadata_headerOffset,
      int session_tokenOffset,
      long token_refresh_deadline_ms) {
    builder.startTable(3);
    SessionInfoResponse.addTokenRefreshDeadlineMs(builder, token_refresh_deadline_ms);
    SessionInfoResponse.addSessionToken(builder, session_tokenOffset);
    SessionInfoResponse.addMetadataHeader(builder, metadata_headerOffset);
    return SessionInfoResponse.endSessionInfoResponse(builder);
  }

  public static void startSessionInfoResponse(FlatBufferBuilder builder) { builder.startTable(3); }
  public static void addMetadataHeader(FlatBufferBuilder builder, int metadataHeaderOffset) { builder.addOffset(0, metadataHeaderOffset, 0); }
  public static int createMetadataHeaderVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); }
  public static int createMetadataHeaderVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); }
  public static void startMetadataHeaderVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); }
  public static void addSessionToken(FlatBufferBuilder builder, int sessionTokenOffset) { builder.addOffset(1, sessionTokenOffset, 0); }
  public static int createSessionTokenVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); }
  public static int createSessionTokenVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); }
  public static void startSessionTokenVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); }
  public static void addTokenRefreshDeadlineMs(FlatBufferBuilder builder, long tokenRefreshDeadlineMs) { builder.addLong(2, tokenRefreshDeadlineMs, 0L); }
  public static int endSessionInfoResponse(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 SessionInfoResponse get(int j) { return get(new SessionInfoResponse(), j); }
    public SessionInfoResponse get(SessionInfoResponse obj, int j) {  return obj.__assign(__indirect(__element(j), bb), bb); }
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy