Class BetaManagedAgentsUserToolResultEventParams
-
- All Implemented Interfaces:
public final class BetaManagedAgentsUserToolResultEventParamsParameters for providing the result of an agent-toolset tool execution. Only valid on
self_hostedenvironments, where sandbox-routed tools are executed by the client rather than the server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaManagedAgentsUserToolResultEventParams.BuilderA builder for BetaManagedAgentsUserToolResultEventParams.
public final classBetaManagedAgentsUserToolResultEventParams.ContentContent block in a tool result. Can be
text,image,document, orsearch_result.
-
Method Summary
Modifier and Type Method Description final StringtoolUseId()The id of the agent.tool_useevent this result corresponds to, which can be found in the lastsession.status_idleevent'sstop_reason.event_idsfield.final Optional<List<BetaManagedAgentsUserToolResultEventParams.Content>>content()The result content returned by the tool. final Optional<Boolean>isError()Whether the tool execution resulted in an error. final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("user.tool_result")final JsonField<String>_toolUseId()Returns the raw JSON value of toolUseId. final JsonField<List<BetaManagedAgentsUserToolResultEventParams.Content>>_content()Returns the raw JSON value of content. final JsonField<Boolean>_isError()Returns the raw JSON value of isError. final Map<String, JsonValue>_additionalProperties()final BetaManagedAgentsUserToolResultEventParams.BuildertoBuilder()final BetaManagedAgentsUserToolResultEventParamsvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaManagedAgentsUserToolResultEventParams.Builderbuilder()Returns a mutable builder for constructing an instance of BetaManagedAgentsUserToolResultEventParams. final static BetaManagedAgentsUserToolResultEventParamsof(String toolUseId)Returns an immutable instance of BetaManagedAgentsUserToolResultEventParams with the required toolUseId set to the given value. -
-
Method Detail
-
toolUseId
final String toolUseId()
The id of the
agent.tool_useevent this result corresponds to, which can be found in the lastsession.status_idleevent'sstop_reason.event_idsfield.
-
content
final Optional<List<BetaManagedAgentsUserToolResultEventParams.Content>> content()
The result content returned by the tool.
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("user.tool_result")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_toolUseId
final JsonField<String> _toolUseId()
Returns the raw JSON value of toolUseId.
Unlike toolUseId, this method doesn't throw if the JSON field has an unexpected type.
-
_content
final JsonField<List<BetaManagedAgentsUserToolResultEventParams.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.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaManagedAgentsUserToolResultEventParams.Builder toBuilder()
-
validate
final BetaManagedAgentsUserToolResultEventParams 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 BetaManagedAgentsUserToolResultEventParams.Builder builder()
Returns a mutable builder for constructing an instance of BetaManagedAgentsUserToolResultEventParams.
The following fields are required:
.toolUseId()
-
of
final static BetaManagedAgentsUserToolResultEventParams of(String toolUseId)
Returns an immutable instance of BetaManagedAgentsUserToolResultEventParams with the required toolUseId set to the given value.
-
-
-
-