Package net.thevpc.naru.api.model
Record Class NaruSegmentContent.Messages
java.lang.Object
java.lang.Record
net.thevpc.naru.api.model.NaruSegmentContent.Messages
- All Implemented Interfaces:
NaruSegmentContent
- Enclosing interface:
- NaruSegmentContent
public static record NaruSegmentContent.Messages(List<NaruMessage> messages)
extends Record
implements NaruSegmentContent
A run of conversation messages, in the order they must be emitted.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.thevpc.naru.api.model.NaruSegmentContent
NaruSegmentContent.Messages, NaruSegmentContent.Tools -
Constructor Summary
ConstructorsConstructorDescriptionMessages(List<NaruMessage> messages) Creates an instance of aMessagesrecord 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.messages()Returns the value of themessagesrecord component.static NaruSegmentContent.Messagesof(List<NaruMessage> messages) static NaruSegmentContent.Messagesof(NaruMessage... messages) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Messages
Creates an instance of aMessagesrecord class.- Parameters:
messages- the value for themessagesrecord component
-
-
Method Details
-
of
-
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). -
messages
Returns the value of themessagesrecord component.- Returns:
- the value of the
messagesrecord component
-