Class BetaManagedAgentsSessionUsage
-
- All Implemented Interfaces:
public final class BetaManagedAgentsSessionUsageCumulative token usage for a session across all turns.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaManagedAgentsSessionUsage.BuilderA builder for BetaManagedAgentsSessionUsage.
-
Method Summary
Modifier and Type Method Description final Optional<BetaManagedAgentsCacheCreationUsage>cacheCreation()Prompt-cache creation token usage broken down by cache lifetime. final Optional<Integer>cacheReadInputTokens()Total tokens read from prompt cache. final Optional<Integer>inputTokens()Total input tokens consumed across all turns. final Optional<Integer>outputTokens()Total output tokens generated across all turns. 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<Integer>_outputTokens()Returns the raw JSON value of outputTokens. final Map<String, JsonValue>_additionalProperties()final BetaManagedAgentsSessionUsage.BuildertoBuilder()final BetaManagedAgentsSessionUsagevalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaManagedAgentsSessionUsage.Builderbuilder()Returns a mutable builder for constructing an instance of BetaManagedAgentsSessionUsage. -
-
Method Detail
-
cacheCreation
final Optional<BetaManagedAgentsCacheCreationUsage> cacheCreation()
Prompt-cache creation token usage broken down by cache lifetime.
-
cacheReadInputTokens
final Optional<Integer> cacheReadInputTokens()
Total tokens read from prompt cache.
-
inputTokens
final Optional<Integer> inputTokens()
Total input tokens consumed across all turns.
-
outputTokens
final Optional<Integer> outputTokens()
Total output tokens generated across all turns.
-
_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.
-
_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.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaManagedAgentsSessionUsage.Builder toBuilder()
-
validate
final BetaManagedAgentsSessionUsage 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 BetaManagedAgentsSessionUsage.Builder builder()
Returns a mutable builder for constructing an instance of BetaManagedAgentsSessionUsage.
-
-
-
-