Class ResponseInputItem.McpApprovalResponse
-
- All Implemented Interfaces:
public final class ResponseInputItem.McpApprovalResponse
A response to an MCP approval request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ResponseInputItem.McpApprovalResponse.Builder
A builder for McpApprovalResponse.
-
Method Summary
Modifier and Type Method Description 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>
id()
The unique ID of the approval response final Optional<String>
reason()
Optional reason for the decision. 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>
_id()
Returns the raw JSON value of id. final JsonField<String>
_reason()
Returns the raw JSON value of reason. final Map<String, JsonValue>
_additionalProperties()
final ResponseInputItem.McpApprovalResponse.Builder
toBuilder()
final ResponseInputItem.McpApprovalResponse
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ResponseInputItem.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).
-
_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.
-
_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.
-
_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 ResponseInputItem.McpApprovalResponse.Builder toBuilder()
-
validate
final ResponseInputItem.McpApprovalResponse validate()
-
builder
final static ResponseInputItem.McpApprovalResponse.Builder builder()
Returns a mutable builder for constructing an instance of McpApprovalResponse.
The following fields are required:
.approvalRequestId() .approve()
-
-
-
-