Record Class McpAuthResult
java.lang.Object
java.lang.Record
com.github.copilot.rpc.McpAuthResult
Result returned by an MCP auth request handler.
- Since:
- 1.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionMcpAuthResult(boolean isCancelled, McpAuthToken token) Creates an instance of aMcpAuthResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic McpAuthResultCreates a cancellation result.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisCancelledrecord component.token()Returns the value of thetokenrecord component.static McpAuthResulttoken(McpAuthToken token) Creates a token result.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
McpAuthResult
Creates an instance of aMcpAuthResultrecord class.- Parameters:
isCancelled- the value for theisCancelledrecord componenttoken- the value for thetokenrecord component
-
-
Method Details
-
token
Creates a token result.- Parameters:
token- the host-provided OAuth token data- Returns:
- token result
-
cancelled
-
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. -
isCancelled
public boolean isCancelled()Returns the value of theisCancelledrecord component.- Returns:
- the value of the
isCancelledrecord component
-
token
Returns the value of thetokenrecord component.- Returns:
- the value of the
tokenrecord component
-