Record Class MessagePage
java.lang.Object
java.lang.Record
io.agentscope.extensions.aistio.model.MessagePage
public record MessagePage(String sessionId, List<MessagePage.MessageItem> messages, int offset, int limit, int total)
extends Record
A page of Level-3 full history, served by
GET /agentscope/sessions/{id}/messages.
Unlike the Level-4 context, this includes messages already compacted away, so operators can audit what the agent originally saw.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOne full-content history entry. -
Constructor Summary
ConstructorsConstructorDescriptionMessagePage(String sessionId, List<MessagePage.MessageItem> messages, int offset, int limit, int total) Creates an instance of aMessagePagerecord 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.intlimit()Returns the value of thelimitrecord component.messages()Returns the value of themessagesrecord component.static MessagePageof(String sessionId, List<MessagePage.MessageItem> all, int offset, int limit) Slicesallinto a page and reports the untruncated total.intoffset()Returns the value of theoffsetrecord component.Returns the value of thesessionIdrecord component.final StringtoString()Returns a string representation of this record class.inttotal()Returns the value of thetotalrecord component.
-
Constructor Details
-
MessagePage
public MessagePage(String sessionId, List<MessagePage.MessageItem> messages, int offset, int limit, int total) Creates an instance of aMessagePagerecord class.- Parameters:
sessionId- the value for thesessionIdrecord componentmessages- the value for themessagesrecord componentoffset- the value for theoffsetrecord componentlimit- the value for thelimitrecord componenttotal- the value for thetotalrecord component
-
-
Method Details
-
of
public static MessagePage of(String sessionId, List<MessagePage.MessageItem> all, int offset, int limit) Slicesallinto a page and reports the untruncated total. -
toJsonMap
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
sessionId
Returns the value of thesessionIdrecord component.- Returns:
- the value of the
sessionIdrecord component
-
messages
Returns the value of themessagesrecord component.- Returns:
- the value of the
messagesrecord component
-
offset
public int offset()Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-
limit
public int limit()Returns the value of thelimitrecord component.- Returns:
- the value of the
limitrecord component
-
total
public int total()Returns the value of thetotalrecord component.- Returns:
- the value of the
totalrecord component
-