Class Event
java.lang.Object
com.google.adk.JsonBaseModel
com.google.adk.events.Event
Represents an event in a session.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionactions()
author()
The author of the event, it could be the name of the agent or "user" literal.branch()
The branch of the event.void
void
static Event.Builder
builder()
Optional
<com.google.genai.types.Content> content()
boolean
Optional
<com.google.genai.types.FinishReason> final boolean
static Event
final com.google.common.collect.ImmutableList
<com.google.genai.types.FunctionCall> final com.google.common.collect.ImmutableList
<com.google.genai.types.FunctionResponse> static String
Optional
<com.google.genai.types.GroundingMetadata> The grounding metadata of the event.int
hashCode()
id()
The event id.Id of the invocation that this event belongs to.Set of ids of the long running function calls.partial()
partial is true for incomplete chunks from the LLM streaming response.void
setActions
(EventActions actions) void
void
setContent
(Optional<com.google.genai.types.Content> content) void
setErrorCode
(Optional<com.google.genai.types.FinishReason> errorCode) void
setErrorMessage
(Optional<String> errorMessage) void
setGroundingMetadata
(Optional<com.google.genai.types.GroundingMetadata> groundingMetadata) void
void
setInterrupted
(Optional<Boolean> interrupted) void
setInvocationId
(String invocationId) void
setLongRunningToolIds
(Optional<Set<String>> longRunningToolIds) void
setPartial
(Optional<Boolean> partial) void
setTimestamp
(long timestamp) void
setTurnComplete
(Optional<Boolean> turnComplete) final String
long
The timestamp of the event.Methods inherited from class com.google.adk.JsonBaseModel
fromJsonNode, fromJsonString, getMapper, toJson, toJsonNode, toJsonString
-
Method Details
-
generateEventId
-
id
The event id. -
setId
-
invocationId
Id of the invocation that this event belongs to. -
setInvocationId
-
author
The author of the event, it could be the name of the agent or "user" literal. -
setAuthor
-
content
-
setContent
-
actions
-
setActions
-
longRunningToolIds
-
setLongRunningToolIds
-
partial
-
setPartial
-
turnComplete
-
setTurnComplete
-
errorCode
-
setErrorCode
-
errorMessage
-
setErrorMessage
-
interrupted
-
setInterrupted
-
branch
-
branch
-
branch
-
groundingMetadata
The grounding metadata of the event. -
setGroundingMetadata
public void setGroundingMetadata(Optional<com.google.genai.types.GroundingMetadata> groundingMetadata) -
timestamp
public long timestamp()The timestamp of the event. -
setTimestamp
public void setTimestamp(long timestamp) -
functionCalls
public final com.google.common.collect.ImmutableList<com.google.genai.types.FunctionCall> functionCalls() -
functionResponses
public final com.google.common.collect.ImmutableList<com.google.genai.types.FunctionResponse> functionResponses() -
finalResponse
public final boolean finalResponse() -
stringifyContent
-
builder
-
fromJson
-
toBuilder
-
equals
-
hashCode
-