Class BetaAnalyticsUsageMetrics.Builder
-
- All Implemented Interfaces:
public final class BetaAnalyticsUsageMetrics.BuilderA builder for BetaAnalyticsUsageMetrics.
-
-
Method Summary
-
-
Method Detail
-
cacheCreation
final BetaAnalyticsUsageMetrics.Builder cacheCreation(BetaCacheCreation cacheCreation)
The number of input tokens for cache creation.
-
cacheCreation
final BetaAnalyticsUsageMetrics.Builder cacheCreation(JsonField<BetaCacheCreation> cacheCreation)
Sets Builder.cacheCreation to an arbitrary JSON value.
You should usually call Builder.cacheCreation with a well-typed BetaCacheCreation value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
cacheReadInputTokens
final BetaAnalyticsUsageMetrics.Builder cacheReadInputTokens(Long cacheReadInputTokens)
The number of input tokens read from the cache.
-
cacheReadInputTokens
final BetaAnalyticsUsageMetrics.Builder cacheReadInputTokens(JsonField<Long> cacheReadInputTokens)
Sets Builder.cacheReadInputTokens to an arbitrary JSON value.
You should usually call Builder.cacheReadInputTokens with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
outputTokens
final BetaAnalyticsUsageMetrics.Builder outputTokens(Long outputTokens)
The number of output tokens generated.
-
outputTokens
final BetaAnalyticsUsageMetrics.Builder outputTokens(JsonField<Long> outputTokens)
Sets Builder.outputTokens to an arbitrary JSON value.
You should usually call Builder.outputTokens with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
requests
final BetaAnalyticsUsageMetrics.Builder requests(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).
-
requests
final BetaAnalyticsUsageMetrics.Builder requests(Long requests)
Alias for Builder.requests.
This unboxed primitive overload exists for backwards compatibility.
-
requests
final BetaAnalyticsUsageMetrics.Builder requests(Optional<Long> requests)
Alias for calling Builder.requests with
requests.orElse(null).
-
requests
final BetaAnalyticsUsageMetrics.Builder requests(JsonField<Long> requests)
Sets Builder.requests to an arbitrary JSON value.
You should usually call Builder.requests with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
serverToolUse
final BetaAnalyticsUsageMetrics.Builder serverToolUse(BetaAnalyticsServerToolUse serverToolUse)
Server-side tool usage metrics.
-
serverToolUse
final BetaAnalyticsUsageMetrics.Builder serverToolUse(JsonField<BetaAnalyticsServerToolUse> serverToolUse)
Sets Builder.serverToolUse to an arbitrary JSON value.
You should usually call Builder.serverToolUse with a well-typed BetaAnalyticsServerToolUse value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
totalTokens
final BetaAnalyticsUsageMetrics.Builder totalTokens(Long totalTokens)
Total token count across all token types. This is the value the default
order_by(total_tokens) sorts on.
-
totalTokens
final BetaAnalyticsUsageMetrics.Builder totalTokens(JsonField<Long> totalTokens)
Sets Builder.totalTokens to an arbitrary JSON value.
You should usually call Builder.totalTokens with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
uncachedInputTokens
final BetaAnalyticsUsageMetrics.Builder uncachedInputTokens(Long uncachedInputTokens)
The number of uncached input tokens processed.
-
uncachedInputTokens
final BetaAnalyticsUsageMetrics.Builder uncachedInputTokens(JsonField<Long> uncachedInputTokens)
Sets Builder.uncachedInputTokens to an arbitrary JSON value.
You should usually call Builder.uncachedInputTokens with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final BetaAnalyticsUsageMetrics.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final BetaAnalyticsUsageMetrics.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaAnalyticsUsageMetrics.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaAnalyticsUsageMetrics.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaAnalyticsUsageMetrics.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaAnalyticsUsageMetrics build()
Returns an immutable instance of BetaAnalyticsUsageMetrics.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.cacheCreation() .cacheReadInputTokens() .outputTokens() .requests() .serverToolUse() .totalTokens() .uncachedInputTokens()
-
-
-
-