Class LiveServerMessage
-
- All Implemented Interfaces:
public abstract class LiveServerMessage extends JsonSerializable
Response message for API call.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classLiveServerMessage.BuilderBuilder for LiveServerMessage.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description LiveServerMessage()
-
Method Summary
Modifier and Type Method Description abstract Optional<LiveServerSetupComplete>setupComplete()Sent in response to a `LiveClientSetup` message from the client. abstract Optional<LiveServerContent>serverContent()Content generated by the model in response to client messages. abstract Optional<LiveServerToolCall>toolCall()Request for the client to execute the `function_calls` and return the responses with the matching `id`s. abstract Optional<LiveServerToolCallCancellation>toolCallCancellation()Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled. abstract Optional<UsageMetadata>usageMetadata()Usage metadata about model response(s). abstract Optional<LiveServerGoAway>goAway()Server will disconnect soon. abstract Optional<LiveServerSessionResumptionUpdate>sessionResumptionUpdate()Update of the session resumption state. abstract Optional<VoiceActivityDetectionSignal>voiceActivityDetectionSignal()Voice activity detection signal. abstract Optional<VoiceActivity>voiceActivity()Voice activity signal. static LiveServerMessage.Builderbuilder()Instantiates a builder for LiveServerMessage. abstract LiveServerMessage.BuildertoBuilder()Creates a builder with the same values as this instance. static LiveServerMessagefromJson(String jsonString)Deserializes a JSON string to a LiveServerMessage 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
-
setupComplete
abstract Optional<LiveServerSetupComplete> setupComplete()
Sent in response to a `LiveClientSetup` message from the client.
-
serverContent
abstract Optional<LiveServerContent> serverContent()
Content generated by the model in response to client messages.
-
toolCall
abstract Optional<LiveServerToolCall> toolCall()
Request for the client to execute the `function_calls` and return the responses with the matching `id`s.
-
toolCallCancellation
abstract Optional<LiveServerToolCallCancellation> toolCallCancellation()
Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled.
-
usageMetadata
abstract Optional<UsageMetadata> usageMetadata()
Usage metadata about model response(s).
-
goAway
abstract Optional<LiveServerGoAway> goAway()
Server will disconnect soon.
-
sessionResumptionUpdate
abstract Optional<LiveServerSessionResumptionUpdate> sessionResumptionUpdate()
Update of the session resumption state.
-
voiceActivityDetectionSignal
abstract Optional<VoiceActivityDetectionSignal> voiceActivityDetectionSignal()
Voice activity detection signal. Allowlisted only.
-
voiceActivity
abstract Optional<VoiceActivity> voiceActivity()
Voice activity signal.
-
builder
static LiveServerMessage.Builder builder()
Instantiates a builder for LiveServerMessage.
-
toBuilder
abstract LiveServerMessage.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static LiveServerMessage fromJson(String jsonString)
Deserializes a JSON string to a LiveServerMessage object.
-
-
-
-