Record Class SessionHistoryCompactResult
java.lang.Object
java.lang.Record
com.github.copilot.sdk.generated.rpc.SessionHistoryCompactResult
@Generated("copilot-sdk-codegen")
public record SessionHistoryCompactResult(Boolean success, Double tokensRemoved, Double messagesRemoved, SessionHistoryCompactResult.SessionHistoryCompactResultContextWindow contextWindow)
extends Record
Result for the
session.history.compact RPC method.- Since:
- 1.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordPost-compaction context window usage breakdown -
Constructor Summary
ConstructorsConstructorDescriptionSessionHistoryCompactResult(Boolean success, Double tokensRemoved, Double messagesRemoved, SessionHistoryCompactResult.SessionHistoryCompactResultContextWindow contextWindow) Creates an instance of aSessionHistoryCompactResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecontextWindowrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themessagesRemovedrecord component.success()Returns the value of thesuccessrecord component.Returns the value of thetokensRemovedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SessionHistoryCompactResult
public SessionHistoryCompactResult(Boolean success, Double tokensRemoved, Double messagesRemoved, SessionHistoryCompactResult.SessionHistoryCompactResultContextWindow contextWindow) Creates an instance of aSessionHistoryCompactResultrecord class.- Parameters:
success- the value for thesuccessrecord componenttokensRemoved- the value for thetokensRemovedrecord componentmessagesRemoved- the value for themessagesRemovedrecord componentcontextWindow- the value for thecontextWindowrecord component
-
-
Method Details
-
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). -
success
Returns the value of thesuccessrecord component.- Returns:
- the value of the
successrecord component
-
tokensRemoved
Returns the value of thetokensRemovedrecord component.- Returns:
- the value of the
tokensRemovedrecord component
-
messagesRemoved
Returns the value of themessagesRemovedrecord component.- Returns:
- the value of the
messagesRemovedrecord component
-
contextWindow
Returns the value of thecontextWindowrecord component.- Returns:
- the value of the
contextWindowrecord component
-