Package io.modelcontextprotocol.spec
Record Class McpSchema.PromptReference
java.lang.Object
java.lang.Record
io.modelcontextprotocol.spec.McpSchema.PromptReference
- Record Components:
type- The reference type identifier (typically "ref/prompt")name- The name of the prompttitle- An optional title for the prompt
- All Implemented Interfaces:
McpSchema.BaseMetadata,McpSchema.CompleteReference
- Enclosing class:
- McpSchema
public static record McpSchema.PromptReference(String type, String name, String title)
extends Record
implements McpSchema.CompleteReference, McpSchema.BaseMetadata
Identifies a prompt for completion requests.
-
Constructor Summary
ConstructorsConstructorDescriptionPromptReference(String name) PromptReference(String type, String name) PromptReference(String type, String name, String title) Creates an instance of aPromptReferencerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
Method Details
-
identifier
- Specified by:
identifierin interfaceMcpSchema.CompleteReference
-
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). -
type
Returns the value of thetyperecord component.- Specified by:
typein interfaceMcpSchema.CompleteReference- Returns:
- the value of the
typerecord component
-
name
Returns the value of thenamerecord component.- Specified by:
namein interfaceMcpSchema.BaseMetadata- Returns:
- the value of the
namerecord component
-
title
Returns the value of thetitlerecord component.- Specified by:
titlein interfaceMcpSchema.BaseMetadata- Returns:
- the value of the
titlerecord component
-