Class BetaManagedAgentsSessionUsageSnapshot
-
- All Implemented Interfaces:
public final class BetaManagedAgentsSessionUsageSnapshotPoint-in-time snapshot of a session's cumulative usage.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaManagedAgentsSessionUsageSnapshot.BuilderA builder for BetaManagedAgentsSessionUsageSnapshot.
-
Method Summary
Modifier and Type Method Description final Optional<Double>activeSeconds()Cumulative time in seconds during which the session had at least one thread in running status. final Optional<BetaManagedAgentsCacheCreationUsage>cacheCreation()Tokens used to create prompt cache entries, broken down by cache TTL. final Optional<Integer>cacheReadInputTokens()Total tokens read from prompt cache. final Optional<Integer>inputTokens()Total input tokens consumed across all turns. final Optional<BetaMonetaryAmount>listCost()Cumulative list cost of the session across all turns, priced at public list rates. final Optional<Integer>outputTokens()Total output tokens generated across all turns. final Optional<BetaManagedAgentsServerToolUsage>serverToolUse()Cumulative server-executed tool usage across all turns. final JsonField<Double>_activeSeconds()Returns the raw JSON value of activeSeconds. final JsonField<BetaManagedAgentsCacheCreationUsage>_cacheCreation()Returns the raw JSON value of cacheCreation. final JsonField<Integer>_cacheReadInputTokens()Returns the raw JSON value of cacheReadInputTokens. final JsonField<Integer>_inputTokens()Returns the raw JSON value of inputTokens. final JsonField<BetaMonetaryAmount>_listCost()Returns the raw JSON value of listCost. final JsonField<Integer>_outputTokens()Returns the raw JSON value of outputTokens. final JsonField<BetaManagedAgentsServerToolUsage>_serverToolUse()Returns the raw JSON value of serverToolUse. final Map<String, JsonValue>_additionalProperties()final BetaManagedAgentsSessionUsageSnapshot.BuildertoBuilder()final BetaManagedAgentsSessionUsageSnapshotvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaManagedAgentsSessionUsageSnapshot.Builderbuilder()Returns a mutable builder for constructing an instance of BetaManagedAgentsSessionUsageSnapshot. -
-
Method Detail
-
activeSeconds
final Optional<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. This is the duration the session's runtime cost is priced on.
-
cacheCreation
final Optional<BetaManagedAgentsCacheCreationUsage> cacheCreation()
Tokens used to create prompt cache entries, broken down by cache TTL.
-
cacheReadInputTokens
final Optional<Integer> cacheReadInputTokens()
Total tokens read from prompt cache.
-
inputTokens
final Optional<Integer> inputTokens()
Total input tokens consumed across all turns.
-
listCost
final Optional<BetaMonetaryAmount> listCost()
Cumulative list cost of the session across all turns, priced at public list rates.
-
outputTokens
final Optional<Integer> outputTokens()
Total output tokens generated across all turns.
-
serverToolUse
final Optional<BetaManagedAgentsServerToolUsage> serverToolUse()
Cumulative server-executed tool usage across all turns.
-
_activeSeconds
final JsonField<Double> _activeSeconds()
Returns the raw JSON value of activeSeconds.
Unlike activeSeconds, this method doesn't throw if the JSON field has an unexpected type.
-
_cacheCreation
final JsonField<BetaManagedAgentsCacheCreationUsage> _cacheCreation()
Returns the raw JSON value of cacheCreation.
Unlike cacheCreation, this method doesn't throw if the JSON field has an unexpected type.
-
_cacheReadInputTokens
final JsonField<Integer> _cacheReadInputTokens()
Returns the raw JSON value of cacheReadInputTokens.
Unlike cacheReadInputTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_inputTokens
final JsonField<Integer> _inputTokens()
Returns the raw JSON value of inputTokens.
Unlike inputTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_listCost
final JsonField<BetaMonetaryAmount> _listCost()
Returns the raw JSON value of listCost.
Unlike listCost, this method doesn't throw if the JSON field has an unexpected type.
-
_outputTokens
final JsonField<Integer> _outputTokens()
Returns the raw JSON value of outputTokens.
Unlike outputTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_serverToolUse
final JsonField<BetaManagedAgentsServerToolUsage> _serverToolUse()
Returns the raw JSON value of serverToolUse.
Unlike serverToolUse, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaManagedAgentsSessionUsageSnapshot.Builder toBuilder()
-
validate
final BetaManagedAgentsSessionUsageSnapshot validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static BetaManagedAgentsSessionUsageSnapshot.Builder builder()
Returns a mutable builder for constructing an instance of BetaManagedAgentsSessionUsageSnapshot.
-
-
-
-