Class BetaManagedAgentsUserToolConfirmationEvent
-
- All Implemented Interfaces:
public final class BetaManagedAgentsUserToolConfirmationEventA tool confirmation event that approves or denies a pending tool execution.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaManagedAgentsUserToolConfirmationEvent.BuilderA builder for BetaManagedAgentsUserToolConfirmationEvent.
public final classBetaManagedAgentsUserToolConfirmationEvent.ResultThe confirmation result: 'allow' or 'deny'.
-
Method Summary
Modifier and Type Method Description final Stringid()Unique identifier for this event. final BetaManagedAgentsUserToolConfirmationEvent.Resultresult()The confirmation result: 'allow' or 'deny'. final StringtoolUseId()The id of the agent.tool_useoragent.mcp_tool_useevent this result corresponds to, which can be found in the lastsession.status_idleevent'sstop_reason.event_idsfield.final Optional<String>denyMessage()Optional message providing context for a 'deny' decision. final Optional<OffsetDateTime>processedAt()Timestamp when the confirmation was processed. final Optional<String>sessionThreadId()Set by the server to the subagent thread this confirmation was routed to. 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_confirmation")final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<BetaManagedAgentsUserToolConfirmationEvent.Result>_result()Returns the raw JSON value of result. final JsonField<String>_toolUseId()Returns the raw JSON value of toolUseId. final JsonField<String>_denyMessage()Returns the raw JSON value of denyMessage. 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 BetaManagedAgentsUserToolConfirmationEvent.BuildertoBuilder()final BetaManagedAgentsUserToolConfirmationEventvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaManagedAgentsUserToolConfirmationEvent.Builderbuilder()Returns a mutable builder for constructing an instance of BetaManagedAgentsUserToolConfirmationEvent. -
-
Method Detail
-
result
final BetaManagedAgentsUserToolConfirmationEvent.Result result()
The confirmation result: 'allow' or 'deny'.
-
toolUseId
final String toolUseId()
The id of the
agent.tool_useoragent.mcp_tool_useevent this result corresponds to, which can be found in the lastsession.status_idleevent'sstop_reason.event_idsfield.
-
denyMessage
final Optional<String> denyMessage()
Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'.
-
processedAt
final Optional<OffsetDateTime> processedAt()
Timestamp when the confirmation was processed.
-
sessionThreadId
final Optional<String> sessionThreadId()
Set by the server to the subagent thread this confirmation was routed to. Omitted when it was routed to the primary thread.
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("user.tool_confirmation")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_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.
-
_result
final JsonField<BetaManagedAgentsUserToolConfirmationEvent.Result> _result()
Returns the raw JSON value of result.
Unlike result, this method doesn't throw if the JSON field has an unexpected type.
-
_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.
-
_denyMessage
final JsonField<String> _denyMessage()
Returns the raw JSON value of denyMessage.
Unlike denyMessage, 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 BetaManagedAgentsUserToolConfirmationEvent.Builder toBuilder()
-
validate
final BetaManagedAgentsUserToolConfirmationEvent 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 BetaManagedAgentsUserToolConfirmationEvent.Builder builder()
Returns a mutable builder for constructing an instance of BetaManagedAgentsUserToolConfirmationEvent.
The following fields are required:
.id() .result() .toolUseId()
-
-
-
-