Class BetaManagedAgentsUserCustomToolResultEvent
-
- All Implemented Interfaces:
public final class BetaManagedAgentsUserCustomToolResultEventEvent sent by the client providing the result of a custom tool execution.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaManagedAgentsUserCustomToolResultEvent.BuilderA builder for BetaManagedAgentsUserCustomToolResultEvent.
public final classBetaManagedAgentsUserCustomToolResultEvent.Typepublic final classBetaManagedAgentsUserCustomToolResultEvent.ContentContent block in a tool result. Can be
text,image,document, orsearch_result.
-
Method Summary
Modifier and Type Method Description final Stringid()Unique identifier for this event. final StringcustomToolUseId()The id of the agent.custom_tool_useevent this result corresponds to, which can be found in the lastsession.status_idleevent'sstop_reason.event_idsfield.final BetaManagedAgentsUserCustomToolResultEvent.Typetype()final Optional<List<BetaManagedAgentsUserCustomToolResultEvent.Content>>content()The result content returned by the tool. final Optional<Boolean>isError()Whether the tool execution resulted in an error. final Optional<OffsetDateTime>processedAt()A timestamp in RFC 3339 format final Optional<String>sessionThreadId()Routes this result to a subagent thread. final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<String>_customToolUseId()Returns the raw JSON value of customToolUseId. final JsonField<BetaManagedAgentsUserCustomToolResultEvent.Type>_type()Returns the raw JSON value of type. final JsonField<List<BetaManagedAgentsUserCustomToolResultEvent.Content>>_content()Returns the raw JSON value of content. final JsonField<Boolean>_isError()Returns the raw JSON value of isError. final JsonField<OffsetDateTime>_processedAt()Returns the raw JSON value of processedAt. final JsonField<String>_sessionThreadId()Returns the raw JSON value of sessionThreadId. final Map<String, JsonValue>_additionalProperties()final BetaManagedAgentsUserCustomToolResultEvent.BuildertoBuilder()final BetaManagedAgentsUserCustomToolResultEventvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaManagedAgentsUserCustomToolResultEvent.Builderbuilder()Returns a mutable builder for constructing an instance of BetaManagedAgentsUserCustomToolResultEvent. -
-
Method Detail
-
customToolUseId
final String customToolUseId()
The id of the
agent.custom_tool_useevent this result corresponds to, which can be found in the lastsession.status_idleevent'sstop_reason.event_idsfield.
-
type
final BetaManagedAgentsUserCustomToolResultEvent.Type type()
-
content
final Optional<List<BetaManagedAgentsUserCustomToolResultEvent.Content>> content()
The result content returned by the tool.
-
processedAt
final Optional<OffsetDateTime> processedAt()
A timestamp in RFC 3339 format
-
sessionThreadId
final Optional<String> sessionThreadId()
Routes this result to a subagent thread. Copy from the
agent.custom_tool_useevent'ssession_thread_id.
-
_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.
-
_customToolUseId
final JsonField<String> _customToolUseId()
Returns the raw JSON value of customToolUseId.
Unlike customToolUseId, this method doesn't throw if the JSON field has an unexpected type.
-
_type
final JsonField<BetaManagedAgentsUserCustomToolResultEvent.Type> _type()
Returns the raw JSON value of type.
Unlike type, this method doesn't throw if the JSON field has an unexpected type.
-
_content
final JsonField<List<BetaManagedAgentsUserCustomToolResultEvent.Content>> _content()
Returns the raw JSON value of content.
Unlike content, this method doesn't throw if the JSON field has an unexpected type.
-
_isError
final JsonField<Boolean> _isError()
Returns the raw JSON value of isError.
Unlike isError, this method doesn't throw if the JSON field has an unexpected type.
-
_processedAt
final JsonField<OffsetDateTime> _processedAt()
Returns the raw JSON value of processedAt.
Unlike processedAt, this method doesn't throw if the JSON field has an unexpected type.
-
_sessionThreadId
final JsonField<String> _sessionThreadId()
Returns the raw JSON value of sessionThreadId.
Unlike sessionThreadId, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaManagedAgentsUserCustomToolResultEvent.Builder toBuilder()
-
validate
final BetaManagedAgentsUserCustomToolResultEvent 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 BetaManagedAgentsUserCustomToolResultEvent.Builder builder()
Returns a mutable builder for constructing an instance of BetaManagedAgentsUserCustomToolResultEvent.
The following fields are required:
.id() .customToolUseId() .type()
-
-
-
-