Class BetaManagedAgentsAgentToolUseEvent.Builder
-
- All Implemented Interfaces:
public final class BetaManagedAgentsAgentToolUseEvent.BuilderA builder for BetaManagedAgentsAgentToolUseEvent.
-
-
Method Summary
-
-
Method Detail
-
id
final BetaManagedAgentsAgentToolUseEvent.Builder id(String id)
Unique identifier for this event.
-
id
final BetaManagedAgentsAgentToolUseEvent.Builder id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value.
You should usually call Builder.id with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
input
final BetaManagedAgentsAgentToolUseEvent.Builder input(BetaManagedAgentsAgentToolUseEvent.Input input)
Input parameters for the tool call.
-
input
final BetaManagedAgentsAgentToolUseEvent.Builder input(JsonField<BetaManagedAgentsAgentToolUseEvent.Input> input)
Sets Builder.input to an arbitrary JSON value.
You should usually call Builder.input with a well-typed Input value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
name
final BetaManagedAgentsAgentToolUseEvent.Builder name(String name)
Name of the agent tool being used.
-
name
final BetaManagedAgentsAgentToolUseEvent.Builder name(JsonField<String> name)
Sets Builder.name to an arbitrary JSON value.
You should usually call Builder.name with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
processedAt
final BetaManagedAgentsAgentToolUseEvent.Builder processedAt(OffsetDateTime processedAt)
Timestamp when this event was processed.
-
processedAt
final BetaManagedAgentsAgentToolUseEvent.Builder processedAt(JsonField<OffsetDateTime> processedAt)
Sets Builder.processedAt to an arbitrary JSON value.
You should usually call Builder.processedAt with a well-typed OffsetDateTime value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
type
final BetaManagedAgentsAgentToolUseEvent.Builder type(JsonValue type)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("agent.tool_use")This method is primarily for setting the field to an undocumented or not yet supported value.
-
evaluatedPermission
final BetaManagedAgentsAgentToolUseEvent.Builder evaluatedPermission(BetaManagedAgentsAgentEvaluatedPermission evaluatedPermission)
The evaluated permission policy for this tool invocation.
-
evaluatedPermission
final BetaManagedAgentsAgentToolUseEvent.Builder evaluatedPermission(JsonField<BetaManagedAgentsAgentEvaluatedPermission> evaluatedPermission)
Sets Builder.evaluatedPermission to an arbitrary JSON value.
You should usually call Builder.evaluatedPermission with a well-typed BetaManagedAgentsAgentEvaluatedPermission value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
evaluation
final BetaManagedAgentsAgentToolUseEvent.Builder evaluation(BetaManagedAgentsAgentToolEvaluation evaluation)
Which resolved permission_policy produced evaluated_permission: always_allow, always_ask, or auto (with the server's per-invocation judgement). Absent only when the server refused the call before any policy applied (for example, the named tool is not enabled in the session); such a refusal has evaluated_permission deny. An event recorded before this field existed reads as the arm its evaluated_permission implies (always_allow for allow, always_ask for ask).
-
evaluation
final BetaManagedAgentsAgentToolUseEvent.Builder evaluation(JsonField<BetaManagedAgentsAgentToolEvaluation> evaluation)
Sets Builder.evaluation to an arbitrary JSON value.
You should usually call Builder.evaluation with a well-typed BetaManagedAgentsAgentToolEvaluation value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
evaluation
final BetaManagedAgentsAgentToolUseEvent.Builder evaluation(BetaManagedAgentsAgentToolEvaluationAlwaysAllow alwaysAllow)
Alias for calling evaluation with
BetaManagedAgentsAgentToolEvaluation.ofAlwaysAllow(alwaysAllow).
-
evaluation
final BetaManagedAgentsAgentToolUseEvent.Builder evaluation(BetaManagedAgentsAgentToolEvaluationAlwaysAsk alwaysAsk)
Alias for calling evaluation with
BetaManagedAgentsAgentToolEvaluation.ofAlwaysAsk(alwaysAsk).
-
evaluation
final BetaManagedAgentsAgentToolUseEvent.Builder evaluation(BetaManagedAgentsAgentToolEvaluationAuto auto)
Alias for calling evaluation with
BetaManagedAgentsAgentToolEvaluation.ofAuto(auto).
-
sessionThreadId
final BetaManagedAgentsAgentToolUseEvent.Builder sessionThreadId(String sessionThreadId)
When set, this event was cross-posted from a subagent's thread to surface its permission request on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching
user.tool_confirmationoruser.tool_resultbytool_use_id, so clients do not send it back.
-
sessionThreadId
final BetaManagedAgentsAgentToolUseEvent.Builder sessionThreadId(Optional<String> sessionThreadId)
Alias for calling Builder.sessionThreadId with
sessionThreadId.orElse(null).
-
sessionThreadId
final BetaManagedAgentsAgentToolUseEvent.Builder sessionThreadId(JsonField<String> sessionThreadId)
Sets Builder.sessionThreadId to an arbitrary JSON value.
You should usually call Builder.sessionThreadId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final BetaManagedAgentsAgentToolUseEvent.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
autoEvaluation
final BetaManagedAgentsAgentToolUseEvent.Builder autoEvaluation(BetaManagedAgentsAgentAutoEvaluatedPermission evaluatedPermission)
Alias for calling evaluation with the following:
BetaManagedAgentsAgentToolEvaluationAuto.builder() .evaluatedPermission(evaluatedPermission) .build()
-
autoEvaluation
final BetaManagedAgentsAgentToolUseEvent.Builder autoEvaluation(BetaManagedAgentsAgentAutoEvaluatedPermissionAllow allow)
Alias for calling autoEvaluation with
BetaManagedAgentsAgentAutoEvaluatedPermission.ofAllow(allow).
-
autoEvaluation
final BetaManagedAgentsAgentToolUseEvent.Builder autoEvaluation(BetaManagedAgentsAgentAutoEvaluatedPermissionAsk ask)
Alias for calling autoEvaluation with
BetaManagedAgentsAgentAutoEvaluatedPermission.ofAsk(ask).
-
autoEvaluation
final BetaManagedAgentsAgentToolUseEvent.Builder autoEvaluation(BetaManagedAgentsAgentAutoEvaluatedPermissionDeny deny)
Alias for calling autoEvaluation with
BetaManagedAgentsAgentAutoEvaluatedPermission.ofDeny(deny).
-
askAutoEvaluation
final BetaManagedAgentsAgentToolUseEvent.Builder askAutoEvaluation(String reasonCode)
Alias for calling autoEvaluation with the following:
BetaManagedAgentsAgentAutoEvaluatedPermissionAsk.builder() .reasonCode(reasonCode) .build()
-
denyAutoEvaluation
final BetaManagedAgentsAgentToolUseEvent.Builder denyAutoEvaluation(String reasonCode)
Alias for calling autoEvaluation with the following:
BetaManagedAgentsAgentAutoEvaluatedPermissionDeny.builder() .reasonCode(reasonCode) .build()
-
putAdditionalProperty
final BetaManagedAgentsAgentToolUseEvent.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaManagedAgentsAgentToolUseEvent.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaManagedAgentsAgentToolUseEvent.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaManagedAgentsAgentToolUseEvent.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaManagedAgentsAgentToolUseEvent build()
Returns an immutable instance of BetaManagedAgentsAgentToolUseEvent.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.id() .input() .name() .processedAt()
-
-
-
-