Record Class McpToolGrantChoice
java.lang.Object
java.lang.Record
io.meeds.mcp.server.model.McpToolGrantChoice
- Record Components:
scope- this agent only, or any agentdays- the validity in days, one of the offered durationsconstrained- whether the grant is limited by the argument constraint the card offered (the constraint itself is derived on the server from the pending call)
public record McpToolGrantChoice(McpToolGrantScope scope, int days, boolean constrained)
extends Record
What the user picked with "Always allow" on an approval card: the only part
of a grant the client chooses, each value from a closed list checked by the
server.
-
Constructor Summary
ConstructorsConstructorDescriptionMcpToolGrantChoice(McpToolGrantScope scope, int days, boolean constrained) Creates an instance of aMcpToolGrantChoicerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theconstrainedrecord component.intdays()Returns the value of thedaysrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.scope()Returns the value of thescoperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
McpToolGrantChoice
Creates an instance of aMcpToolGrantChoicerecord class.- Parameters:
scope- the value for thescoperecord componentdays- the value for thedaysrecord componentconstrained- the value for theconstrainedrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
scope
-
days
-
constrained
public boolean constrained()Returns the value of theconstrainedrecord component.- Returns:
- the value of the
constrainedrecord component
-