Class BetaManagedAgentsSessionUsage.Builder
-
- All Implemented Interfaces:
public final class BetaManagedAgentsSessionUsage.BuilderA builder for BetaManagedAgentsSessionUsage.
-
-
Method Summary
-
-
Method Detail
-
activeSeconds
final BetaManagedAgentsSessionUsage.Builder activeSeconds(Double activeSeconds)
Cumulative time in seconds during which the session had at least one thread in running status. Overlapping activity from concurrent threads is counted once, unlike
stats.active_seconds, which sums each thread's own active time. This is the duration the session's runtime cost is priced on.
-
activeSeconds
final BetaManagedAgentsSessionUsage.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 BetaManagedAgentsSessionUsage.Builder cacheCreation(BetaManagedAgentsCacheCreationUsage cacheCreation)
Tokens used to create prompt cache entries, broken down by cache TTL.
-
cacheCreation
final BetaManagedAgentsSessionUsage.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 BetaManagedAgentsSessionUsage.Builder cacheReadInputTokens(Integer cacheReadInputTokens)
Total tokens read from prompt cache.
-
cacheReadInputTokens
final BetaManagedAgentsSessionUsage.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 BetaManagedAgentsSessionUsage.Builder inputTokens(Integer inputTokens)
Total input tokens consumed across all turns.
-
inputTokens
final BetaManagedAgentsSessionUsage.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 BetaManagedAgentsSessionUsage.Builder listCost(BetaMonetaryAmount listCost)
Cumulative list cost of the session across all turns, priced at public list rates. Absent until cost tracking is available for the session.
-
listCost
final BetaManagedAgentsSessionUsage.Builder listCost(Optional<BetaMonetaryAmount> listCost)
Alias for calling Builder.listCost with
listCost.orElse(null).
-
listCost
final BetaManagedAgentsSessionUsage.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 BetaManagedAgentsSessionUsage.Builder outputTokens(Integer outputTokens)
Total output tokens generated across all turns.
-
outputTokens
final BetaManagedAgentsSessionUsage.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 BetaManagedAgentsSessionUsage.Builder serverToolUse(BetaManagedAgentsServerToolUsage serverToolUse)
Cumulative server-executed tool usage across all turns. Absent until server-tool tracking is available for the session.
-
serverToolUse
final BetaManagedAgentsSessionUsage.Builder serverToolUse(Optional<BetaManagedAgentsServerToolUsage> serverToolUse)
Alias for calling Builder.serverToolUse with
serverToolUse.orElse(null).
-
serverToolUse
final BetaManagedAgentsSessionUsage.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 BetaManagedAgentsSessionUsage.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final BetaManagedAgentsSessionUsage.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaManagedAgentsSessionUsage.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaManagedAgentsSessionUsage.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaManagedAgentsSessionUsage.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaManagedAgentsSessionUsage build()
Returns an immutable instance of BetaManagedAgentsSessionUsage.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-