Class BetaManagedAgentsSessionThreadUsage
-
- All Implemented Interfaces:
public final class BetaManagedAgentsSessionThreadUsageCumulative token usage for a session thread across all turns.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaManagedAgentsSessionThreadUsage.BuilderA builder for BetaManagedAgentsSessionThreadUsage.
-
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 BetaManagedAgentsSessionThreadUsage.BuildertoBuilder()final BetaManagedAgentsSessionThreadUsagevalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaManagedAgentsSessionThreadUsage.Builderbuilder()Returns a mutable builder for constructing an instance of BetaManagedAgentsSessionThreadUsage. -
-
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 BetaManagedAgentsSessionThreadUsage.Builder toBuilder()
-
validate
final BetaManagedAgentsSessionThreadUsage 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 BetaManagedAgentsSessionThreadUsage.Builder builder()
Returns a mutable builder for constructing an instance of BetaManagedAgentsSessionThreadUsage.
-
-
-
-