Class RealtimeMcpApprovalResponse
-
- All Implemented Interfaces:
public final class RealtimeMcpApprovalResponse
A Realtime item responding to an MCP approval request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
RealtimeMcpApprovalResponse.Builder
A builder for RealtimeMcpApprovalResponse.
-
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 RealtimeMcpApprovalResponse.Builder
toBuilder()
final RealtimeMcpApprovalResponse
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static RealtimeMcpApprovalResponse.Builder
builder()
Returns a mutable builder for constructing an instance of RealtimeMcpApprovalResponse. -
-
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 RealtimeMcpApprovalResponse.Builder toBuilder()
-
validate
final RealtimeMcpApprovalResponse validate()
-
builder
final static RealtimeMcpApprovalResponse.Builder builder()
Returns a mutable builder for constructing an instance of RealtimeMcpApprovalResponse.
The following fields are required:
.id() .approvalRequestId() .approve()
-
-
-
-