Package com.github.copilot.sdk.events
Record Class AssistantUsageEvent.AssistantUsageData
java.lang.Object
java.lang.Record
com.github.copilot.sdk.events.AssistantUsageEvent.AssistantUsageData
- Enclosing class:
- AssistantUsageEvent
public static record AssistantUsageEvent.AssistantUsageData(String model, Double inputTokens, Double outputTokens, Double cacheReadTokens, Double cacheWriteTokens, Double cost, Double duration, String initiator, String apiCallId, String providerCallId, String parentToolCallId, Map<String,Object> quotaSnapshots)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionAssistantUsageData(String model, Double inputTokens, Double outputTokens, Double cacheReadTokens, Double cacheWriteTokens, Double cost, Double duration, String initiator, String apiCallId, String providerCallId, String parentToolCallId, Map<String, Object> quotaSnapshots) Creates an instance of aAssistantUsageDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theapiCallIdrecord component.Returns the value of thecacheReadTokensrecord component.Returns the value of thecacheWriteTokensrecord component.cost()Returns the value of thecostrecord component.duration()Returns the value of thedurationrecord 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 theinitiatorrecord component.Returns the value of theinputTokensrecord component.model()Returns the value of themodelrecord component.Returns the value of theoutputTokensrecord component.Returns the value of theparentToolCallIdrecord component.Returns the value of theproviderCallIdrecord component.Returns a defensive copy of the quota snapshots map.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AssistantUsageData
public AssistantUsageData(String model, Double inputTokens, Double outputTokens, Double cacheReadTokens, Double cacheWriteTokens, Double cost, Double duration, String initiator, String apiCallId, String providerCallId, String parentToolCallId, Map<String, Object> quotaSnapshots) Creates an instance of aAssistantUsageDatarecord class.- Parameters:
model- the value for themodelrecord componentinputTokens- the value for theinputTokensrecord componentoutputTokens- the value for theoutputTokensrecord componentcacheReadTokens- the value for thecacheReadTokensrecord componentcacheWriteTokens- the value for thecacheWriteTokensrecord componentcost- the value for thecostrecord componentduration- the value for thedurationrecord componentinitiator- the value for theinitiatorrecord componentapiCallId- the value for theapiCallIdrecord componentproviderCallId- the value for theproviderCallIdrecord componentparentToolCallId- the value for theparentToolCallIdrecord componentquotaSnapshots- the value for thequotaSnapshotsrecord component
-
-
Method Details
-
quotaSnapshots
Returns a defensive copy of the quota snapshots map. -
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). -
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
inputTokens
Returns the value of theinputTokensrecord component.- Returns:
- the value of the
inputTokensrecord component
-
outputTokens
Returns the value of theoutputTokensrecord component.- Returns:
- the value of the
outputTokensrecord component
-
cacheReadTokens
Returns the value of thecacheReadTokensrecord component.- Returns:
- the value of the
cacheReadTokensrecord component
-
cacheWriteTokens
Returns the value of thecacheWriteTokensrecord component.- Returns:
- the value of the
cacheWriteTokensrecord component
-
cost
Returns the value of thecostrecord component.- Returns:
- the value of the
costrecord component
-
duration
Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
initiator
Returns the value of theinitiatorrecord component.- Returns:
- the value of the
initiatorrecord component
-
apiCallId
Returns the value of theapiCallIdrecord component.- Returns:
- the value of the
apiCallIdrecord component
-
providerCallId
Returns the value of theproviderCallIdrecord component.- Returns:
- the value of the
providerCallIdrecord component
-
parentToolCallId
Returns the value of theparentToolCallIdrecord component.- Returns:
- the value of the
parentToolCallIdrecord component
-