Class BetaAnalyticsUsageUsersItem
-
- All Implemented Interfaces:
public final class BetaAnalyticsUsageUsersItem
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaAnalyticsUsageUsersItem.BuilderA builder for BetaAnalyticsUsageUsersItem.
public final classBetaAnalyticsUsageUsersItem.ActorThe user this row's usage or cost is attributed to. Always a
user_actor.public final classBetaAnalyticsUsageUsersItem.InferenceGeoInference region of the usage or cost. Null unless
inference_geois ingroup_by[]; it can also be null on grouped rows where the region is not set (the rows thatinference_geos[]=not_availablematches).public final classBetaAnalyticsUsageUsersItem.SpeedInference speed mode of the usage or cost:
fastorstandard. Null unlessspeedis ingroup_by[].
-
Method Summary
Modifier and Type Method Description final BetaAnalyticsUsageUsersItem.Actoractor()The user this row's usage or cost is attributed to. final BetaCacheCreationcacheCreation()The number of input tokens for cache creation. final LongcacheReadInputTokens()The number of input tokens read from the cache. final Optional<BetaAnalyticsClaudeTagCategory>claudeTagCategory()Claude Tag (Claude in Slack) spend category: engaged(a person addressed Claude in a channel or thread),proactive(Claude responded without being addressed),scheduled(a scheduled routine ran),monitoring(Claude watching a channel it was asked to monitor), ordm(direct messages with Claude).final Optional<String>claudeTagUserId()Slack user ID (for example U0123ABCDEF) of the member the Claude Tag (Claude in Slack) usage is attributed to, not a claude.ai user ID.final Optional<BetaAnalyticsContextWindow>contextWindow()Context-window pricing tier of the usage or cost. final Optional<OffsetDateTime>endingAt()End of the row's UTC time bucket (exclusive), as an RFC 3339 timestamp; equal to starting_atplus onebucket_width.final Optional<BetaAnalyticsUsageUsersItem.InferenceGeo>inferenceGeo()Inference region of the usage or cost. final Optional<String>model()Model that produced the usage or cost, as a model name in the form the models[]filter accepts (for example,claude-opus-5-5).final LongoutputTokens()The number of output tokens generated. final Optional<String>product()Product surface that produced the usage or cost. final Optional<String>rbacGroupId()RBAC group (team) the usage is attributed to, in the public tagged rbac_group_...spelling — the same spelling the activity resources use for this key, so the same team has one id across resources and it round-trips as anrbac_group_ids[]filter value.final Optional<Long>requests()Number of API requests in this row's scope. final BetaAnalyticsServerToolUseserverToolUse()Server-side tool usage metrics. final Optional<String>slackChannelId()Slack channel the usage originated from. final Optional<BetaAnalyticsUsageUsersItem.Speed>speed()Inference speed mode of the usage or cost: fastorstandard.final Optional<OffsetDateTime>startingAt()Start of the row's UTC time bucket (inclusive), as an RFC 3339 timestamp. final LongtotalTokens()Total token count across all token types. final LonguncachedInputTokens()The number of uncached input tokens processed. final JsonField<BetaAnalyticsUsageUsersItem.Actor>_actor()Returns the raw JSON value of actor. final JsonField<BetaCacheCreation>_cacheCreation()Returns the raw JSON value of cacheCreation. final JsonField<Long>_cacheReadInputTokens()Returns the raw JSON value of cacheReadInputTokens. final JsonField<BetaAnalyticsClaudeTagCategory>_claudeTagCategory()Returns the raw JSON value of claudeTagCategory. final JsonField<String>_claudeTagUserId()Returns the raw JSON value of claudeTagUserId. final JsonField<BetaAnalyticsContextWindow>_contextWindow()Returns the raw JSON value of contextWindow. final JsonField<OffsetDateTime>_endingAt()Returns the raw JSON value of endingAt. final JsonField<BetaAnalyticsUsageUsersItem.InferenceGeo>_inferenceGeo()Returns the raw JSON value of inferenceGeo. final JsonField<String>_model()Returns the raw JSON value of model. final JsonField<Long>_outputTokens()Returns the raw JSON value of outputTokens. final JsonField<String>_product()Returns the raw JSON value of product. final JsonField<String>_rbacGroupId()Returns the raw JSON value of rbacGroupId. final JsonField<Long>_requests()Returns the raw JSON value of requests. final JsonField<BetaAnalyticsServerToolUse>_serverToolUse()Returns the raw JSON value of serverToolUse. final JsonField<String>_slackChannelId()Returns the raw JSON value of slackChannelId. final JsonField<BetaAnalyticsUsageUsersItem.Speed>_speed()Returns the raw JSON value of speed. final JsonField<OffsetDateTime>_startingAt()Returns the raw JSON value of startingAt. 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 BetaAnalyticsUsageUsersItem.BuildertoBuilder()final BetaAnalyticsUsageUsersItemvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaAnalyticsUsageUsersItem.Builderbuilder()Returns a mutable builder for constructing an instance of BetaAnalyticsUsageUsersItem. -
-
Method Detail
-
actor
final BetaAnalyticsUsageUsersItem.Actor actor()
The user this row's usage or cost is attributed to. Always a
user_actor.
-
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.
-
claudeTagCategory
final Optional<BetaAnalyticsClaudeTagCategory> claudeTagCategory()
Claude Tag (Claude in Slack) spend category:
engaged(a person addressed Claude in a channel or thread),proactive(Claude responded without being addressed),scheduled(a scheduled routine ran),monitoring(Claude watching a channel it was asked to monitor), ordm(direct messages with Claude). Populated only whenclaude_tag_categoryis ingroup_by[]; null for usage that is not Claude Tag. New categories may be added over time.
-
claudeTagUserId
final Optional<String> claudeTagUserId()
Slack user ID (for example
U0123ABCDEF) of the member the Claude Tag (Claude in Slack) usage is attributed to, not a claude.ai user ID. Populated only whenclaude_tag_user_idis ingroup_by[]; null for usage that is not Claude Tag and for Claude Tag usage that is not attributed to a single user (for examplemonitoring, andproactiveusage Claude initiated), so per-user rows can sum to less than the Claude Tag total. Cannot be combined withgroup_by[]=rbac_group_idor therbac_group_ids[]filter.
-
contextWindow
final Optional<BetaAnalyticsContextWindow> contextWindow()
Context-window pricing tier of the usage or cost. Null unless
context_windowis ingroup_by[]; it can also be null on grouped rows with no context-window tier, such as code execution.
-
endingAt
final Optional<OffsetDateTime> endingAt()
End of the row's UTC time bucket (exclusive), as an RFC 3339 timestamp; equal to
starting_atplus onebucket_width. Null unlessbucket_widthis set.
-
inferenceGeo
final Optional<BetaAnalyticsUsageUsersItem.InferenceGeo> inferenceGeo()
Inference region of the usage or cost. Null unless
inference_geois ingroup_by[]; it can also be null on grouped rows where the region is not set (the rows thatinference_geos[]=not_availablematches).
-
model
final Optional<String> model()
Model that produced the usage or cost, as a model name in the form the
models[]filter accepts (for example,claude-opus-5-5). Null unlessmodelis ingroup_by[]; it can also be null on grouped rows whose usage or cost is not attributed to a specific model, such as code execution.
-
outputTokens
final Long outputTokens()
The number of output tokens generated.
-
product
final Optional<String> product()
Product surface that produced the usage or cost. Null unless product is in
group_by[]; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values includechat,claude_code,cowork,office_agent,claude_in_chrome,claude_design,claude-tag, andchat_cowork_unified.claude-tagis Claude Tag, the Claude product in Slack.chat_cowork_unifiedis Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead ofchatorcowork. It is accepted as a filter only where Chat and Cowork unified is available. Some unattributed usage is reported as "other".
-
rbacGroupId
final Optional<String> rbacGroupId()
RBAC group (team) the usage is attributed to, in the public tagged
rbac_group_...spelling — the same spelling the activity resources use for this key, so the same team has one id across resources and it round-trips as anrbac_group_ids[]filter value. Populated only whenrbac_group_idis ingroup_by[]. Any-membership semantics: a user in several groups contributes their full usage to each of those groups' rows, so the named-group rows overlap and their sum can exceed the org total. A null value is the single unassigned row: users in no group on that (UTC) day. For the true org total, run the same query withoutgroup_by[].
-
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.
-
slackChannelId
final Optional<String> slackChannelId()
Slack channel the usage originated from. Populated only when
slack_channel_idis ingroup_by[]; null for usage outside Slack, for some Claude Tag usage that has no channel recorded, and for usage recorded before channel attribution was enabled.
-
speed
final Optional<BetaAnalyticsUsageUsersItem.Speed> speed()
Inference speed mode of the usage or cost:
fastorstandard. Null unlessspeedis ingroup_by[].
-
startingAt
final Optional<OffsetDateTime> startingAt()
Start of the row's UTC time bucket (inclusive), as an RFC 3339 timestamp. Null unless
bucket_widthis set; withoutbucket_width, each row aggregates the full requested range.
-
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.
-
_actor
final JsonField<BetaAnalyticsUsageUsersItem.Actor> _actor()
Returns the raw JSON value of actor.
Unlike actor, this method doesn't throw if the JSON field has an unexpected type.
-
_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.
-
_claudeTagCategory
final JsonField<BetaAnalyticsClaudeTagCategory> _claudeTagCategory()
Returns the raw JSON value of claudeTagCategory.
Unlike claudeTagCategory, this method doesn't throw if the JSON field has an unexpected type.
-
_claudeTagUserId
final JsonField<String> _claudeTagUserId()
Returns the raw JSON value of claudeTagUserId.
Unlike claudeTagUserId, this method doesn't throw if the JSON field has an unexpected type.
-
_contextWindow
final JsonField<BetaAnalyticsContextWindow> _contextWindow()
Returns the raw JSON value of contextWindow.
Unlike contextWindow, this method doesn't throw if the JSON field has an unexpected type.
-
_endingAt
final JsonField<OffsetDateTime> _endingAt()
Returns the raw JSON value of endingAt.
Unlike endingAt, this method doesn't throw if the JSON field has an unexpected type.
-
_inferenceGeo
final JsonField<BetaAnalyticsUsageUsersItem.InferenceGeo> _inferenceGeo()
Returns the raw JSON value of inferenceGeo.
Unlike inferenceGeo, this method doesn't throw if the JSON field has an unexpected type.
-
_model
final JsonField<String> _model()
Returns the raw JSON value of model.
Unlike model, 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.
-
_product
final JsonField<String> _product()
Returns the raw JSON value of product.
Unlike product, this method doesn't throw if the JSON field has an unexpected type.
-
_rbacGroupId
final JsonField<String> _rbacGroupId()
Returns the raw JSON value of rbacGroupId.
Unlike rbacGroupId, 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.
-
_slackChannelId
final JsonField<String> _slackChannelId()
Returns the raw JSON value of slackChannelId.
Unlike slackChannelId, this method doesn't throw if the JSON field has an unexpected type.
-
_speed
final JsonField<BetaAnalyticsUsageUsersItem.Speed> _speed()
Returns the raw JSON value of speed.
Unlike speed, this method doesn't throw if the JSON field has an unexpected type.
-
_startingAt
final JsonField<OffsetDateTime> _startingAt()
Returns the raw JSON value of startingAt.
Unlike startingAt, 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 BetaAnalyticsUsageUsersItem.Builder toBuilder()
-
validate
final BetaAnalyticsUsageUsersItem 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 BetaAnalyticsUsageUsersItem.Builder builder()
Returns a mutable builder for constructing an instance of BetaAnalyticsUsageUsersItem.
The following fields are required:
.actor() .cacheCreation() .cacheReadInputTokens() .claudeTagCategory() .claudeTagUserId() .contextWindow() .endingAt() .inferenceGeo() .model() .outputTokens() .product() .rbacGroupId() .requests() .serverToolUse() .slackChannelId() .speed() .startingAt() .totalTokens() .uncachedInputTokens()
-
-
-
-