Package io.modelcontextprotocol.spec
Record Class McpSchema.GetPromptResult
java.lang.Object
java.lang.Record
io.modelcontextprotocol.spec.McpSchema.GetPromptResult
- Record Components:
description- An optional description for the prompt.messages- A list of messages to display as part of the prompt.
- Enclosing class:
- McpSchema
public static record McpSchema.GetPromptResult(String description, List<McpSchema.PromptMessage> messages)
extends Record
The server's response to a prompts/get request from the client.
-
Constructor Summary
ConstructorsConstructorDescriptionGetPromptResult(String description, List<McpSchema.PromptMessage> messages) Creates an instance of aGetPromptResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.messages()Returns the value of themessagesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GetPromptResult
Creates an instance of aGetPromptResultrecord class.- Parameters:
description- the value for thedescriptionrecord componentmessages- the value for themessagesrecord component
-
-
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). -
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
messages
Returns the value of themessagesrecord component.- Returns:
- the value of the
messagesrecord component
-