Package com.google.genai.types
Class SessionResumptionConfig
-
- All Implemented Interfaces:
public abstract class SessionResumptionConfig extends JsonSerializable
Configuration of session resumption mechanism.
Included in `LiveConnectConfig.session_resumption`. If included server will send `LiveServerSessionResumptionUpdate` messages.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classSessionResumptionConfig.BuilderBuilder for SessionResumptionConfig.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description SessionResumptionConfig()
-
Method Summary
Modifier and Type Method Description abstract Optional<String>handle()Session resumption handle of previous session (session to restore). abstract Optional<Boolean>transparent()If set the server will send `last_consumed_client_message_index` in the `session_resumption_update` messages to allow for transparent reconnections. static SessionResumptionConfig.Builderbuilder()Instantiates a builder for SessionResumptionConfig. abstract SessionResumptionConfig.BuildertoBuilder()Creates a builder with the same values as this instance. static SessionResumptionConfigfromJson(String jsonString)Deserializes a JSON string to a SessionResumptionConfig object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
handle
abstract Optional<String> handle()
Session resumption handle of previous session (session to restore).
If not present new session will be started.
-
transparent
abstract Optional<Boolean> transparent()
If set the server will send `last_consumed_client_message_index` in the `session_resumption_update` messages to allow for transparent reconnections.
-
builder
static SessionResumptionConfig.Builder builder()
Instantiates a builder for SessionResumptionConfig.
-
toBuilder
abstract SessionResumptionConfig.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static SessionResumptionConfig fromJson(String jsonString)
Deserializes a JSON string to a SessionResumptionConfig object.
-
-
-
-