Class BetaManagedAgentsSessionThread
-
- All Implemented Interfaces:
public final class BetaManagedAgentsSessionThreadAn execution thread within a
session. Each session has one primary thread plus zero or more child threads spawned by the coordinator.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaManagedAgentsSessionThread.BuilderA builder for BetaManagedAgentsSessionThread.
public final classBetaManagedAgentsSessionThread.Type
-
Method Summary
Modifier and Type Method Description final Stringid()Unique identifier for this thread. final BetaManagedAgentsSessionThreadAgentagent()Resolved agentdefinition for a singlesession_thread.final Optional<OffsetDateTime>archivedAt()A timestamp in RFC 3339 format final OffsetDateTimecreatedAt()A timestamp in RFC 3339 format final Optional<String>parentThreadId()Parent thread that spawned this thread. final StringsessionId()The session this thread belongs to. final Optional<BetaManagedAgentsSessionThreadStats>stats()Timing statistics for a session thread. final BetaManagedAgentsSessionThreadStatusstatus()SessionThreadStatus enum final BetaManagedAgentsSessionThread.Typetype()final OffsetDateTimeupdatedAt()A timestamp in RFC 3339 format final Optional<BetaManagedAgentsSessionThreadUsage>usage()Cumulative token usage for a session thread across all turns. final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<BetaManagedAgentsSessionThreadAgent>_agent()Returns the raw JSON value of agent. final JsonField<OffsetDateTime>_archivedAt()Returns the raw JSON value of archivedAt. final JsonField<OffsetDateTime>_createdAt()Returns the raw JSON value of createdAt. final JsonField<String>_parentThreadId()Returns the raw JSON value of parentThreadId. final JsonField<String>_sessionId()Returns the raw JSON value of sessionId. final JsonField<BetaManagedAgentsSessionThreadStats>_stats()Returns the raw JSON value of stats. final JsonField<BetaManagedAgentsSessionThreadStatus>_status()Returns the raw JSON value of status. final JsonField<BetaManagedAgentsSessionThread.Type>_type()Returns the raw JSON value of type. final JsonField<OffsetDateTime>_updatedAt()Returns the raw JSON value of updatedAt. final JsonField<BetaManagedAgentsSessionThreadUsage>_usage()Returns the raw JSON value of usage. final Map<String, JsonValue>_additionalProperties()final BetaManagedAgentsSessionThread.BuildertoBuilder()final BetaManagedAgentsSessionThreadvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaManagedAgentsSessionThread.Builderbuilder()Returns a mutable builder for constructing an instance of BetaManagedAgentsSessionThread. -
-
Method Detail
-
agent
final BetaManagedAgentsSessionThreadAgent agent()
Resolved
agentdefinition for a singlesession_thread. Snapshot of the agent at thread creation time. The multiagent roster is not repeated here; read it fromSession.agent.
-
archivedAt
final Optional<OffsetDateTime> archivedAt()
A timestamp in RFC 3339 format
-
createdAt
final OffsetDateTime createdAt()
A timestamp in RFC 3339 format
-
parentThreadId
final Optional<String> parentThreadId()
Parent thread that spawned this thread. Null for the primary thread.
-
stats
final Optional<BetaManagedAgentsSessionThreadStats> stats()
Timing statistics for a session thread.
-
status
final BetaManagedAgentsSessionThreadStatus status()
SessionThreadStatus enum
-
type
final BetaManagedAgentsSessionThread.Type type()
-
updatedAt
final OffsetDateTime updatedAt()
A timestamp in RFC 3339 format
-
usage
final Optional<BetaManagedAgentsSessionThreadUsage> usage()
Cumulative token usage for a session thread across all turns.
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
_agent
final JsonField<BetaManagedAgentsSessionThreadAgent> _agent()
Returns the raw JSON value of agent.
Unlike agent, this method doesn't throw if the JSON field has an unexpected type.
-
_archivedAt
final JsonField<OffsetDateTime> _archivedAt()
Returns the raw JSON value of archivedAt.
Unlike archivedAt, this method doesn't throw if the JSON field has an unexpected type.
-
_createdAt
final JsonField<OffsetDateTime> _createdAt()
Returns the raw JSON value of createdAt.
Unlike createdAt, this method doesn't throw if the JSON field has an unexpected type.
-
_parentThreadId
final JsonField<String> _parentThreadId()
Returns the raw JSON value of parentThreadId.
Unlike parentThreadId, this method doesn't throw if the JSON field has an unexpected type.
-
_sessionId
final JsonField<String> _sessionId()
Returns the raw JSON value of sessionId.
Unlike sessionId, this method doesn't throw if the JSON field has an unexpected type.
-
_stats
final JsonField<BetaManagedAgentsSessionThreadStats> _stats()
Returns the raw JSON value of stats.
Unlike stats, this method doesn't throw if the JSON field has an unexpected type.
-
_status
final JsonField<BetaManagedAgentsSessionThreadStatus> _status()
Returns the raw JSON value of status.
Unlike status, this method doesn't throw if the JSON field has an unexpected type.
-
_type
final JsonField<BetaManagedAgentsSessionThread.Type> _type()
Returns the raw JSON value of type.
Unlike type, this method doesn't throw if the JSON field has an unexpected type.
-
_updatedAt
final JsonField<OffsetDateTime> _updatedAt()
Returns the raw JSON value of updatedAt.
Unlike updatedAt, this method doesn't throw if the JSON field has an unexpected type.
-
_usage
final JsonField<BetaManagedAgentsSessionThreadUsage> _usage()
Returns the raw JSON value of usage.
Unlike usage, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaManagedAgentsSessionThread.Builder toBuilder()
-
validate
final BetaManagedAgentsSessionThread validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static BetaManagedAgentsSessionThread.Builder builder()
Returns a mutable builder for constructing an instance of BetaManagedAgentsSessionThread.
The following fields are required:
.id() .agent() .archivedAt() .createdAt() .parentThreadId() .sessionId() .stats() .status() .type() .updatedAt() .usage()
-
-
-
-