Record Class ToolExecutionUsage
java.lang.Object
java.lang.Record
com.github.copilot.generated.ToolExecutionUsage
@CopilotExperimental
@Generated("copilot-sdk-codegen")
public record ToolExecutionUsage(String requestId, String model, ModelProviderRef provider, UsageAccountingIdentity accounting, Long inputTokens, Long outputTokens, Long totalTokens, ToolExecutionUsageTokenDetails inputTokensDetails, ToolExecutionUsageTokenDetails outputTokensDetails, AssistantUsageCopilotUsage copilotUsage, Map<String,Object> quotaSnapshots)
extends Record
Authoritative usage reported by a separately metered runtime-owned tool operation. May be present on a failed tool when the service reported usage before local result processing failed. Missing token counts or billing mean unavailable, not zero.
- Since:
- 1.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionToolExecutionUsage(String requestId, String model, ModelProviderRef provider, UsageAccountingIdentity accounting, Long inputTokens, Long outputTokens, Long totalTokens, ToolExecutionUsageTokenDetails inputTokensDetails, ToolExecutionUsageTokenDetails outputTokensDetails, AssistantUsageCopilotUsage copilotUsage, Map<String, Object> quotaSnapshots) Creates an instance of aToolExecutionUsagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccountingrecord component.Returns the value of thecopilotUsagerecord 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 theinputTokensrecord component.Returns the value of theinputTokensDetailsrecord component.model()Returns the value of themodelrecord component.Returns the value of theoutputTokensrecord component.Returns the value of theoutputTokensDetailsrecord component.provider()Returns the value of theproviderrecord component.Returns the value of thequotaSnapshotsrecord component.Returns the value of therequestIdrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetotalTokensrecord component.
-
Constructor Details
-
ToolExecutionUsage
public ToolExecutionUsage(String requestId, String model, ModelProviderRef provider, UsageAccountingIdentity accounting, Long inputTokens, Long outputTokens, Long totalTokens, ToolExecutionUsageTokenDetails inputTokensDetails, ToolExecutionUsageTokenDetails outputTokensDetails, AssistantUsageCopilotUsage copilotUsage, Map<String, Object> quotaSnapshots) Creates an instance of aToolExecutionUsagerecord class.- Parameters:
requestId- the value for therequestIdrecord componentmodel- the value for themodelrecord componentprovider- the value for theproviderrecord componentaccounting- the value for theaccountingrecord componentinputTokens- the value for theinputTokensrecord componentoutputTokens- the value for theoutputTokensrecord componenttotalTokens- the value for thetotalTokensrecord componentinputTokensDetails- the value for theinputTokensDetailsrecord componentoutputTokensDetails- the value for theoutputTokensDetailsrecord componentcopilotUsage- the value for thecopilotUsagerecord componentquotaSnapshots- the value for thequotaSnapshotsrecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
requestId
Returns the value of therequestIdrecord component.- Returns:
- the value of the
requestIdrecord component
-
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
provider
Returns the value of theproviderrecord component.- Returns:
- the value of the
providerrecord component
-
accounting
Returns the value of theaccountingrecord component.- Returns:
- the value of the
accountingrecord 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
-
totalTokens
Returns the value of thetotalTokensrecord component.- Returns:
- the value of the
totalTokensrecord component
-
inputTokensDetails
Returns the value of theinputTokensDetailsrecord component.- Returns:
- the value of the
inputTokensDetailsrecord component
-
outputTokensDetails
Returns the value of theoutputTokensDetailsrecord component.- Returns:
- the value of the
outputTokensDetailsrecord component
-
copilotUsage
Returns the value of thecopilotUsagerecord component.- Returns:
- the value of the
copilotUsagerecord component
-
quotaSnapshots
-