Class BetaAnalyticsUsageMetrics
-
- All Implemented Interfaces:
public final class BetaAnalyticsUsageMetricsThe token usage of one row.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaAnalyticsUsageMetrics.BuilderA builder for BetaAnalyticsUsageMetrics.
-
Method Summary
Modifier and Type Method Description final BetaCacheCreationcacheCreation()The number of input tokens for cache creation. final LongcacheReadInputTokens()The number of input tokens read from the cache. final LongoutputTokens()The number of output tokens generated. final Optional<Long>requests()Number of API requests in this row's scope. final BetaAnalyticsServerToolUseserverToolUse()Server-side tool usage metrics. final LongtotalTokens()Total token count across all token types. final LonguncachedInputTokens()The number of uncached input tokens processed. final JsonField<BetaCacheCreation>_cacheCreation()Returns the raw JSON value of cacheCreation. final JsonField<Long>_cacheReadInputTokens()Returns the raw JSON value of cacheReadInputTokens. final JsonField<Long>_outputTokens()Returns the raw JSON value of outputTokens. final JsonField<Long>_requests()Returns the raw JSON value of requests. final JsonField<BetaAnalyticsServerToolUse>_serverToolUse()Returns the raw JSON value of serverToolUse. final JsonField<Long>_totalTokens()Returns the raw JSON value of totalTokens. final JsonField<Long>_uncachedInputTokens()Returns the raw JSON value of uncachedInputTokens. final Map<String, JsonValue>_additionalProperties()final BetaAnalyticsUsageMetrics.BuildertoBuilder()final BetaAnalyticsUsageMetricsvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaAnalyticsUsageMetrics.Builderbuilder()Returns a mutable builder for constructing an instance of BetaAnalyticsUsageMetrics. -
-
Method Detail
-
cacheCreation
final BetaCacheCreation cacheCreation()
The number of input tokens for cache creation.
-
cacheReadInputTokens
final Long cacheReadInputTokens()
The number of input tokens read from the cache.
-
outputTokens
final Long outputTokens()
The number of output tokens generated.
-
requests
final Optional<Long> requests()
Number of API requests in this row's scope. For sandbox / code-execution events, this counts execution spans rather than HTTP requests (these rows surface with
product: null).
-
serverToolUse
final BetaAnalyticsServerToolUse serverToolUse()
Server-side tool usage metrics.
-
totalTokens
final Long totalTokens()
Total token count across all token types. This is the value the default
order_by(total_tokens) sorts on.
-
uncachedInputTokens
final Long uncachedInputTokens()
The number of uncached input tokens processed.
-
_cacheCreation
final JsonField<BetaCacheCreation> _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<Long> _cacheReadInputTokens()
Returns the raw JSON value of cacheReadInputTokens.
Unlike cacheReadInputTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_outputTokens
final JsonField<Long> _outputTokens()
Returns the raw JSON value of outputTokens.
Unlike outputTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_requests
final JsonField<Long> _requests()
Returns the raw JSON value of requests.
Unlike requests, this method doesn't throw if the JSON field has an unexpected type.
-
_serverToolUse
final JsonField<BetaAnalyticsServerToolUse> _serverToolUse()
Returns the raw JSON value of serverToolUse.
Unlike serverToolUse, this method doesn't throw if the JSON field has an unexpected type.
-
_totalTokens
final JsonField<Long> _totalTokens()
Returns the raw JSON value of totalTokens.
Unlike totalTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_uncachedInputTokens
final JsonField<Long> _uncachedInputTokens()
Returns the raw JSON value of uncachedInputTokens.
Unlike uncachedInputTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaAnalyticsUsageMetrics.Builder toBuilder()
-
validate
final BetaAnalyticsUsageMetrics 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 BetaAnalyticsUsageMetrics.Builder builder()
Returns a mutable builder for constructing an instance of BetaAnalyticsUsageMetrics.
The following fields are required:
.cacheCreation() .cacheReadInputTokens() .outputTokens() .requests() .serverToolUse() .totalTokens() .uncachedInputTokens()
-
-
-
-