Class BetaManagedAgentsUserCustomToolResultEventParams
-
- All Implemented Interfaces:
public final class BetaManagedAgentsUserCustomToolResultEventParamsParameters for providing the result of a custom tool execution.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaManagedAgentsUserCustomToolResultEventParams.BuilderA builder for BetaManagedAgentsUserCustomToolResultEventParams.
public final classBetaManagedAgentsUserCustomToolResultEventParams.ContentContent block in a tool result. Can be
text,image,document, orsearch_result.
-
Method Summary
Modifier and Type Method Description final StringcustomToolUseId()The id of the agent.custom_tool_useevent this result corresponds to.final Optional<List<BetaManagedAgentsUserCustomToolResultEventParams.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.custom_tool_result")final JsonField<String>_customToolUseId()Returns the raw JSON value of customToolUseId. final JsonField<List<BetaManagedAgentsUserCustomToolResultEventParams.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 BetaManagedAgentsUserCustomToolResultEventParams.BuildertoBuilder()final BetaManagedAgentsUserCustomToolResultEventParamsvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaManagedAgentsUserCustomToolResultEventParams.Builderbuilder()Returns a mutable builder for constructing an instance of BetaManagedAgentsUserCustomToolResultEventParams. final static BetaManagedAgentsUserCustomToolResultEventParamsof(String customToolUseId)Returns an immutable instance of BetaManagedAgentsUserCustomToolResultEventParams with the required customToolUseId set to the given value. -
-
Method Detail
-
customToolUseId
final String customToolUseId()
The id of the
agent.custom_tool_useevent this result corresponds to. It is also listed in the lastsession.status_idleevent'sstop_reason.event_idsfield.
-
content
final Optional<List<BetaManagedAgentsUserCustomToolResultEventParams.Content>> content()
The result content returned by the tool.
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("user.custom_tool_result")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_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.
-
_content
final JsonField<List<BetaManagedAgentsUserCustomToolResultEventParams.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 BetaManagedAgentsUserCustomToolResultEventParams.Builder toBuilder()
-
validate
final BetaManagedAgentsUserCustomToolResultEventParams 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 BetaManagedAgentsUserCustomToolResultEventParams.Builder builder()
Returns a mutable builder for constructing an instance of BetaManagedAgentsUserCustomToolResultEventParams.
The following fields are required:
.customToolUseId()
-
of
final static BetaManagedAgentsUserCustomToolResultEventParams of(String customToolUseId)
Returns an immutable instance of BetaManagedAgentsUserCustomToolResultEventParams with the required customToolUseId set to the given value.
-
-
-
-