Record Class MessageView
java.lang.Object
java.lang.Record
io.agentscope.spring.boot.admin.dto.MessageView
public record MessageView(String id, String role, String name, String timestamp, String text)
extends Record
Slim projection of a
Msg for admin listings. Avoids leaking
internal content-block hierarchies through the admin surface.-
Constructor Summary
Constructors -
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.id()Returns the value of theidrecord component.name()Returns the value of thenamerecord component.static MessageViewof(io.agentscope.core.message.Msg msg) role()Returns the value of therolerecord component.text()Returns the value of thetextrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MessageView
Creates an instance of aMessageViewrecord class.- Parameters:
id- the value for theidrecord componentrole- the value for therolerecord componentname- the value for thenamerecord componenttimestamp- the value for thetimestamprecord componenttext- the value for thetextrecord component
-
-
Method Details
-
of
-
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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
role
Returns the value of therolerecord component.- Returns:
- the value of the
rolerecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-