Package com.github.copilot.sdk.events
Record Class AssistantUsageEvent.TokenDetails
java.lang.Object
java.lang.Record
com.github.copilot.sdk.events.AssistantUsageEvent.TokenDetails
- Enclosing class:
- AssistantUsageEvent
public static record AssistantUsageEvent.TokenDetails(double batchSize, double costPerBatch, double tokenCount, String tokenType)
extends Record
Token details for a specific token type.
-
Constructor Summary
ConstructorsConstructorDescriptionTokenDetails(double batchSize, double costPerBatch, double tokenCount, String tokenType) Creates an instance of aTokenDetailsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thebatchSizerecord component.doubleReturns the value of thecostPerBatchrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thetokenCountrecord component.Returns the value of thetokenTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TokenDetails
Creates an instance of aTokenDetailsrecord class.- Parameters:
batchSize- the value for thebatchSizerecord componentcostPerBatch- the value for thecostPerBatchrecord componenttokenCount- the value for thetokenCountrecord componenttokenType- the value for thetokenTyperecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
batchSize
public double batchSize()Returns the value of thebatchSizerecord component.- Returns:
- the value of the
batchSizerecord component
-
costPerBatch
public double costPerBatch()Returns the value of thecostPerBatchrecord component.- Returns:
- the value of the
costPerBatchrecord component
-
tokenCount
public double tokenCount()Returns the value of thetokenCountrecord component.- Returns:
- the value of the
tokenCountrecord component
-
tokenType
Returns the value of thetokenTyperecord component.- Returns:
- the value of the
tokenTyperecord component
-