Package com.github.copilot.sdk.generated
Record Class AssistantUsageEvent.AssistantUsageEventData
java.lang.Object
java.lang.Record
com.github.copilot.sdk.generated.AssistantUsageEvent.AssistantUsageEventData
- Enclosing class:
- AssistantUsageEvent
public static record AssistantUsageEvent.AssistantUsageEventData(String model, Double inputTokens, Double outputTokens, Double cacheReadTokens, Double cacheWriteTokens, Double reasoningTokens, Double cost, Double duration, Double ttftMs, Double interTokenLatencyMs, String initiator, String apiCallId, String providerCallId, String parentToolCallId, Map<String,AssistantUsageEvent.AssistantUsageEventData.AssistantUsageEventDataQuotaSnapshotsValue> quotaSnapshots, AssistantUsageEvent.AssistantUsageEventData.AssistantUsageEventDataCopilotUsage copilotUsage, String reasoningEffort)
extends Record
Data payload for
AssistantUsageEvent.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordPer-request cost and usage data from the CAPI copilot_usage response fieldstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionAssistantUsageEventData(String model, Double inputTokens, Double outputTokens, Double cacheReadTokens, Double cacheWriteTokens, Double reasoningTokens, Double cost, Double duration, Double ttftMs, Double interTokenLatencyMs, String initiator, String apiCallId, String providerCallId, String parentToolCallId, Map<String, AssistantUsageEvent.AssistantUsageEventData.AssistantUsageEventDataQuotaSnapshotsValue> quotaSnapshots, AssistantUsageEvent.AssistantUsageEventData.AssistantUsageEventDataCopilotUsage copilotUsage, String reasoningEffort) Creates an instance of aAssistantUsageEventDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theapiCallIdrecord component.Returns the value of thecacheReadTokensrecord component.Returns the value of thecacheWriteTokensrecord component.Returns the value of thecopilotUsagerecord 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.Returns the value of theinterTokenLatencyMsrecord 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 the value of thequotaSnapshotsrecord component.Returns the value of thereasoningEffortrecord component.Returns the value of thereasoningTokensrecord component.final StringtoString()Returns a string representation of this record class.ttftMs()Returns the value of thettftMsrecord component.
-
Constructor Details
-
AssistantUsageEventData
public AssistantUsageEventData(String model, Double inputTokens, Double outputTokens, Double cacheReadTokens, Double cacheWriteTokens, Double reasoningTokens, Double cost, Double duration, Double ttftMs, Double interTokenLatencyMs, String initiator, String apiCallId, String providerCallId, String parentToolCallId, Map<String, AssistantUsageEvent.AssistantUsageEventData.AssistantUsageEventDataQuotaSnapshotsValue> quotaSnapshots, AssistantUsageEvent.AssistantUsageEventData.AssistantUsageEventDataCopilotUsage copilotUsage, String reasoningEffort) Creates an instance of aAssistantUsageEventDatarecord 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 componentreasoningTokens- the value for thereasoningTokensrecord componentcost- the value for thecostrecord componentduration- the value for thedurationrecord componentttftMs- the value for thettftMsrecord componentinterTokenLatencyMs- the value for theinterTokenLatencyMsrecord 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 componentcopilotUsage- the value for thecopilotUsagerecord componentreasoningEffort- the value for thereasoningEffortrecord 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). -
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
-
reasoningTokens
Returns the value of thereasoningTokensrecord component.- Returns:
- the value of the
reasoningTokensrecord 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
-
ttftMs
Returns the value of thettftMsrecord component.- Returns:
- the value of the
ttftMsrecord component
-
interTokenLatencyMs
Returns the value of theinterTokenLatencyMsrecord component.- Returns:
- the value of the
interTokenLatencyMsrecord 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
-
quotaSnapshots
public Map<String,AssistantUsageEvent.AssistantUsageEventData.AssistantUsageEventDataQuotaSnapshotsValue> quotaSnapshots()Returns the value of thequotaSnapshotsrecord component.- Returns:
- the value of the
quotaSnapshotsrecord component
-
copilotUsage
public AssistantUsageEvent.AssistantUsageEventData.AssistantUsageEventDataCopilotUsage copilotUsage()Returns the value of thecopilotUsagerecord component.- Returns:
- the value of the
copilotUsagerecord component
-
reasoningEffort
Returns the value of thereasoningEffortrecord component.- Returns:
- the value of the
reasoningEffortrecord component
-