Record Class McpPromptMessage
java.lang.Object
java.lang.Record
org.infinispan.rest.resources.mcp.McpPromptMessage
- All Implemented Interfaces:
JsonSerialization
public record McpPromptMessage(String role, String text)
extends Record
implements JsonSerialization
-
Constructor Summary
ConstructorsConstructorDescriptionMcpPromptMessage(String role, String text) Creates an instance of aMcpPromptMessagerecord 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.role()Returns the value of therolerecord component.text()Returns the value of thetextrecord component.toJson()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
McpPromptMessage
-
-
Method Details
-
toJson
- Specified by:
toJsonin interfaceJsonSerialization
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
role
Returns the value of therolerecord component.- Returns:
- the value of the
rolerecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-