Record Class PromptRequest
java.lang.Object
java.lang.Record
dev.tachyonmcp.api.server.features.prompts.PromptRequest
- Record Components:
arguments- the prompt arguments, or empty if none were providedinputResponses- client's input responses for input-required prompts, or nullrequestState- opaque state token for input-required prompts, or nullmeta- protocol extension metadata, or null
- All Implemented Interfaces:
HasMeta,ServerFeature.Request
public record PromptRequest(Args arguments, @Nullable Map<String,Object> inputResponses, @Nullable String requestState, @Nullable Map<String,Object> meta)
extends Record
implements ServerFeature.Request
Request parameters for a prompt invocation.
-
Constructor Summary
ConstructorsConstructorDescriptionPromptRequest(Args arguments, @Nullable Map<String, Object> inputResponses, @Nullable String requestState) Compatibility constructor for callers that predatemeta(); sets it tonull.PromptRequest(Args arguments, @Nullable Map<String, Object> inputResponses, @Nullable String requestState, @Nullable Map<String, Object> meta) Creates an instance of aPromptRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargumentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinputResponsesrecord component.meta()Returns the value of themetarecord component.@Nullable StringReturns the value of therequestStaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PromptRequest
public PromptRequest(Args arguments, @Nullable Map<String, Object> inputResponses, @Nullable String requestState, @Nullable Map<String, Object> meta) Creates an instance of aPromptRequestrecord class.- Parameters:
arguments- the value for theargumentsrecord componentinputResponses- the value for theinputResponsesrecord componentrequestState- the value for therequestStaterecord componentmeta- the value for themetarecord component
-
PromptRequest
public PromptRequest(Args arguments, @Nullable Map<String, Object> inputResponses, @Nullable String requestState) Compatibility constructor for callers that predatemeta(); sets it tonull.- Parameters:
arguments- the prompt arguments, or empty if none were providedinputResponses- client's input responses for input-required prompts, or nullrequestState- opaque state token for input-required prompts, or null
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
arguments
Returns the value of theargumentsrecord component.- Returns:
- the value of the
argumentsrecord component
-
inputResponses
Returns the value of theinputResponsesrecord component.- Returns:
- the value of the
inputResponsesrecord component
-
requestState
Returns the value of therequestStaterecord component.- Returns:
- the value of the
requestStaterecord component
-
meta
Returns the value of themetarecord component.
-