Class ResponseItem.McpApprovalResponse
-
- All Implemented Interfaces:
public final class ResponseItem.McpApprovalResponse
A response to an MCP approval request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ResponseItem.McpApprovalResponse.Builder
A builder for McpApprovalResponse.
-
Method Summary
Modifier and Type Method Description final String
id()
The unique ID of the approval response final String
approvalRequestId()
The ID of the approval request being answered. final Boolean
approve()
Whether the request was approved. final JsonValue
_type()
The type of the item. final Optional<String>
reason()
Optional reason for the decision. final JsonField<String>
_id()
Returns the raw JSON value of id. final JsonField<String>
_approvalRequestId()
Returns the raw JSON value of approvalRequestId. final JsonField<Boolean>
_approve()
Returns the raw JSON value of approve. final JsonField<String>
_reason()
Returns the raw JSON value of reason. final Map<String, JsonValue>
_additionalProperties()
final ResponseItem.McpApprovalResponse.Builder
toBuilder()
final ResponseItem.McpApprovalResponse
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ResponseItem.McpApprovalResponse.Builder
builder()
Returns a mutable builder for constructing an instance of McpApprovalResponse. -
-
Method Detail
-
approvalRequestId
final String approvalRequestId()
The ID of the approval request being answered.
-
_type
final JsonValue _type()
The type of the item. Always
mcp_approval_response
.Expected to always return the following:
JsonValue.from("mcp_approval_response")
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.
-
_approvalRequestId
final JsonField<String> _approvalRequestId()
Returns the raw JSON value of approvalRequestId.
Unlike approvalRequestId, this method doesn't throw if the JSON field has an unexpected type.
-
_approve
final JsonField<Boolean> _approve()
Returns the raw JSON value of approve.
Unlike approve, this method doesn't throw if the JSON field has an unexpected type.
-
_reason
final JsonField<String> _reason()
Returns the raw JSON value of reason.
Unlike reason, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ResponseItem.McpApprovalResponse.Builder toBuilder()
-
validate
final ResponseItem.McpApprovalResponse validate()
-
builder
final static ResponseItem.McpApprovalResponse.Builder builder()
Returns a mutable builder for constructing an instance of McpApprovalResponse.
The following fields are required:
.id() .approvalRequestId() .approve()
-
-
-
-