Package com.github.copilot.sdk.events
Record Class AssistantUsageEvent.CopilotUsage
java.lang.Object
java.lang.Record
com.github.copilot.sdk.events.AssistantUsageEvent.CopilotUsage
- Enclosing class:
- AssistantUsageEvent
public static record AssistantUsageEvent.CopilotUsage(List<AssistantUsageEvent.TokenDetails> tokenDetails, double totalNanoAiu)
extends Record
Copilot usage details including token cost information.
-
Constructor Summary
ConstructorsConstructorDescriptionCopilotUsage(List<AssistantUsageEvent.TokenDetails> tokenDetails, double totalNanoAiu) Creates an instance of aCopilotUsagerecord 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.Returns a defensive copy of the token details list.final StringtoString()Returns a string representation of this record class.doubleReturns the value of thetotalNanoAiurecord component.
-
Constructor Details
-
CopilotUsage
Creates an instance of aCopilotUsagerecord class.- Parameters:
tokenDetails- the value for thetokenDetailsrecord componenttotalNanoAiu- the value for thetotalNanoAiurecord component
-
-
Method Details
-
tokenDetails
Returns a defensive copy of the token details list. -
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 '=='. -
totalNanoAiu
public double totalNanoAiu()Returns the value of thetotalNanoAiurecord component.- Returns:
- the value of the
totalNanoAiurecord component
-