Class BetaManagedAgentsSessionThreadUsage.Builder
-
- All Implemented Interfaces:
public final class BetaManagedAgentsSessionThreadUsage.BuilderA builder for BetaManagedAgentsSessionThreadUsage.
-
-
Method Summary
-
-
Method Detail
-
activeSeconds
final BetaManagedAgentsSessionThreadUsage.Builder activeSeconds(Double activeSeconds)
Cumulative time in seconds this thread spent in running status. Equal to
stats.active_seconds; surfaced here so a thread's usage carries every quantity its cost is priced on.
-
activeSeconds
final BetaManagedAgentsSessionThreadUsage.Builder activeSeconds(JsonField<Double> activeSeconds)
Sets Builder.activeSeconds to an arbitrary JSON value.
You should usually call Builder.activeSeconds with a well-typed Double value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
cacheCreation
final BetaManagedAgentsSessionThreadUsage.Builder cacheCreation(BetaManagedAgentsCacheCreationUsage cacheCreation)
Tokens used to create prompt cache entries, broken down by cache TTL.
-
cacheCreation
final BetaManagedAgentsSessionThreadUsage.Builder cacheCreation(JsonField<BetaManagedAgentsCacheCreationUsage> cacheCreation)
Sets Builder.cacheCreation to an arbitrary JSON value.
You should usually call Builder.cacheCreation with a well-typed BetaManagedAgentsCacheCreationUsage value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
cacheReadInputTokens
final BetaManagedAgentsSessionThreadUsage.Builder cacheReadInputTokens(Integer cacheReadInputTokens)
Total tokens read from prompt cache.
-
cacheReadInputTokens
final BetaManagedAgentsSessionThreadUsage.Builder cacheReadInputTokens(JsonField<Integer> cacheReadInputTokens)
Sets Builder.cacheReadInputTokens to an arbitrary JSON value.
You should usually call Builder.cacheReadInputTokens with a well-typed Int value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
inputTokens
final BetaManagedAgentsSessionThreadUsage.Builder inputTokens(Integer inputTokens)
Total input tokens consumed across all turns.
-
inputTokens
final BetaManagedAgentsSessionThreadUsage.Builder inputTokens(JsonField<Integer> inputTokens)
Sets Builder.inputTokens to an arbitrary JSON value.
You should usually call Builder.inputTokens with a well-typed Int value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
listCost
final BetaManagedAgentsSessionThreadUsage.Builder listCost(BetaMonetaryAmount listCost)
Cumulative list cost of this thread across all turns, priced at public list rates. Absent until cost tracking is available for the thread. Each figure is rounded to the nearest cent independently and the session's aggregate
usage.list_costadditionally includes session runtime, so per-thread costs do not sum exactly to the session figure; the session figure is authoritative and is what a budget is enforced against.
-
listCost
final BetaManagedAgentsSessionThreadUsage.Builder listCost(Optional<BetaMonetaryAmount> listCost)
Alias for calling Builder.listCost with
listCost.orElse(null).
-
listCost
final BetaManagedAgentsSessionThreadUsage.Builder listCost(JsonField<BetaMonetaryAmount> listCost)
Sets Builder.listCost to an arbitrary JSON value.
You should usually call Builder.listCost with a well-typed BetaMonetaryAmount value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
outputTokens
final BetaManagedAgentsSessionThreadUsage.Builder outputTokens(Integer outputTokens)
Total output tokens generated across all turns.
-
outputTokens
final BetaManagedAgentsSessionThreadUsage.Builder outputTokens(JsonField<Integer> outputTokens)
Sets Builder.outputTokens to an arbitrary JSON value.
You should usually call Builder.outputTokens with a well-typed Int value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
serverToolUse
final BetaManagedAgentsSessionThreadUsage.Builder serverToolUse(BetaManagedAgentsServerToolUsage serverToolUse)
Cumulative server-executed tool usage across all turns of this thread. Absent until server-tool tracking is available for the thread.
-
serverToolUse
final BetaManagedAgentsSessionThreadUsage.Builder serverToolUse(Optional<BetaManagedAgentsServerToolUsage> serverToolUse)
Alias for calling Builder.serverToolUse with
serverToolUse.orElse(null).
-
serverToolUse
final BetaManagedAgentsSessionThreadUsage.Builder serverToolUse(JsonField<BetaManagedAgentsServerToolUsage> serverToolUse)
Sets Builder.serverToolUse to an arbitrary JSON value.
You should usually call Builder.serverToolUse with a well-typed BetaManagedAgentsServerToolUsage value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final BetaManagedAgentsSessionThreadUsage.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final BetaManagedAgentsSessionThreadUsage.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaManagedAgentsSessionThreadUsage.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaManagedAgentsSessionThreadUsage.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaManagedAgentsSessionThreadUsage.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaManagedAgentsSessionThreadUsage build()
Returns an immutable instance of BetaManagedAgentsSessionThreadUsage.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-