Class BetaAnalyticsUsageGroup
-
- All Implemented Interfaces:
public final class BetaAnalyticsUsageGroupThe dimension values one usage row is broken out by; each is null unless its dimension is in
group_by[].
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaAnalyticsUsageGroup.BuilderA builder for BetaAnalyticsUsageGroup.
-
Method Summary
Modifier and Type Method Description final Optional<BetaAnalyticsActor>actor()The identity the usage is attributed to: the user if one is attributed, else the service account, else the federated (cloud-platform) identity, else the API key. final Optional<BetaAnalyticsActorType>actorType()Kind of identity the usage is attributed to; matches actor.typewhenactoris set.final Optional<String>agentId()Claude Managed Agents agent whose session incurred the usage. final Optional<String>apiKeyId()API key that authenticated the requests, as a tagged API key ID, whichever identity actorresolves to.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<String>deploymentId()Deployment that started the Claude Managed Agents session. final Optional<String>environmentId()Claude Managed Agents environment the session ran in. final Optional<BetaAnalyticsUsageCostInferenceGeo>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 Optional<String>organizationId()UUID of the child organization the usage belongs to, on a parent organization's report across its children. 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<BetaAnalyticsServiceTier>serviceTier()Service tier the usage was served at. final Optional<String>sessionId()Claude Managed Agents session that incurred the usage. final Optional<String>slackChannelId()Slack channel the usage originated from. final Optional<BetaAnalyticsSpeed>speed()Inference speed mode of the usage or cost: fastorstandard.final Optional<String>userProfileId()User profile the usage was attributed to, as a tagged uprof_ID.final Optional<String>workspaceId()Workspace the usage occurred in, as a tagged workspace ID, including the organization's default workspace. final JsonField<BetaAnalyticsActor>_actor()Returns the raw JSON value of actor. final JsonField<BetaAnalyticsActorType>_actorType()Returns the raw JSON value of actorType. final JsonField<String>_agentId()Returns the raw JSON value of agentId. final JsonField<String>_apiKeyId()Returns the raw JSON value of apiKeyId. 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<String>_deploymentId()Returns the raw JSON value of deploymentId. final JsonField<String>_environmentId()Returns the raw JSON value of environmentId. final JsonField<BetaAnalyticsUsageCostInferenceGeo>_inferenceGeo()Returns the raw JSON value of inferenceGeo. final JsonField<String>_model()Returns the raw JSON value of model. final JsonField<String>_organizationId()Returns the raw JSON value of organizationId. final JsonField<String>_product()Returns the raw JSON value of product. final JsonField<String>_rbacGroupId()Returns the raw JSON value of rbacGroupId. final JsonField<BetaAnalyticsServiceTier>_serviceTier()Returns the raw JSON value of serviceTier. final JsonField<String>_sessionId()Returns the raw JSON value of sessionId. final JsonField<String>_slackChannelId()Returns the raw JSON value of slackChannelId. final JsonField<BetaAnalyticsSpeed>_speed()Returns the raw JSON value of speed. final JsonField<String>_userProfileId()Returns the raw JSON value of userProfileId. final JsonField<String>_workspaceId()Returns the raw JSON value of workspaceId. final Map<String, JsonValue>_additionalProperties()final BetaAnalyticsUsageGroup.BuildertoBuilder()final BetaAnalyticsUsageGroupvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaAnalyticsUsageGroup.Builderbuilder()Returns a mutable builder for constructing an instance of BetaAnalyticsUsageGroup. -
-
Method Detail
-
actor
final Optional<BetaAnalyticsActor> actor()
The identity the usage is attributed to: the user if one is attributed, else the service account, else the federated (cloud-platform) identity, else the API key. Populated only when
actoris ingroup_by[]; null for usage with no attributable identity, and for users' and federated identities' usage when the reader is a member who can see only some workspaces. Distinct identities the server cannot render also read null, each as its own row.
-
actorType
final Optional<BetaAnalyticsActorType> actorType()
Kind of identity the usage is attributed to; matches
actor.typewhenactoris set. Populated only whenactor_typeis ingroup_by[].
-
agentId
final Optional<String> agentId()
Claude Managed Agents agent whose session incurred the usage. Populated only when
agent_idis ingroup_by[]; null for usage outside a managed session.
-
apiKeyId
final Optional<String> apiKeyId()
API key that authenticated the requests, as a tagged API key ID, whichever identity
actorresolves to. Populated only whenapi_key_idis ingroup_by[]; null for usage not authenticated by an API key.
-
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.
-
deploymentId
final Optional<String> deploymentId()
Deployment that started the Claude Managed Agents session. Populated only when
deployment_idis ingroup_by[]; null for usage outside a managed session and for sessions no deployment started.
-
environmentId
final Optional<String> environmentId()
Claude Managed Agents environment the session ran in. Populated only when
environment_idis ingroup_by[]; null for usage outside a managed session.
-
inferenceGeo
final Optional<BetaAnalyticsUsageCostInferenceGeo> 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.
-
organizationId
final Optional<String> organizationId()
UUID of the child organization the usage belongs to, on a parent organization's report across its children. Null unless
organization_idis ingroup_by[].
-
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[].
-
serviceTier
final Optional<BetaAnalyticsServiceTier> serviceTier()
Service tier the usage was served at. Populated only when
service_tieris ingroup_by[]; null for usage with no service tier (for example, code execution) and for Claude Enterprise usage.
-
sessionId
final Optional<String> sessionId()
Claude Managed Agents session that incurred the usage. Populated only when
session_idis ingroup_by[]; null for usage outside a managed session.
-
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<BetaAnalyticsSpeed> speed()
Inference speed mode of the usage or cost:
fastorstandard. Null unlessspeedis ingroup_by[].
-
userProfileId
final Optional<String> userProfileId()
User profile the usage was attributed to, as a tagged
uprof_ID. Populated only whenuser_profile_idis ingroup_by[]; null for usage that named no profile and for Claude Enterprise usage.
-
workspaceId
final Optional<String> workspaceId()
Workspace the usage occurred in, as a tagged workspace ID, including the organization's default workspace. Populated only when
workspace_idis ingroup_by[]; null for Claude Enterprise usage.
-
_actor
final JsonField<BetaAnalyticsActor> _actor()
Returns the raw JSON value of actor.
Unlike actor, this method doesn't throw if the JSON field has an unexpected type.
-
_actorType
final JsonField<BetaAnalyticsActorType> _actorType()
Returns the raw JSON value of actorType.
Unlike actorType, this method doesn't throw if the JSON field has an unexpected type.
-
_agentId
final JsonField<String> _agentId()
Returns the raw JSON value of agentId.
Unlike agentId, this method doesn't throw if the JSON field has an unexpected type.
-
_apiKeyId
final JsonField<String> _apiKeyId()
Returns the raw JSON value of apiKeyId.
Unlike apiKeyId, 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.
-
_deploymentId
final JsonField<String> _deploymentId()
Returns the raw JSON value of deploymentId.
Unlike deploymentId, this method doesn't throw if the JSON field has an unexpected type.
-
_environmentId
final JsonField<String> _environmentId()
Returns the raw JSON value of environmentId.
Unlike environmentId, this method doesn't throw if the JSON field has an unexpected type.
-
_inferenceGeo
final JsonField<BetaAnalyticsUsageCostInferenceGeo> _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.
-
_organizationId
final JsonField<String> _organizationId()
Returns the raw JSON value of organizationId.
Unlike organizationId, 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.
-
_serviceTier
final JsonField<BetaAnalyticsServiceTier> _serviceTier()
Returns the raw JSON value of serviceTier.
Unlike serviceTier, this method doesn't throw if the JSON field has an unexpected type.
-
_sessionId
final JsonField<String> _sessionId()
Returns the raw JSON value of sessionId.
Unlike sessionId, 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<BetaAnalyticsSpeed> _speed()
Returns the raw JSON value of speed.
Unlike speed, this method doesn't throw if the JSON field has an unexpected type.
-
_userProfileId
final JsonField<String> _userProfileId()
Returns the raw JSON value of userProfileId.
Unlike userProfileId, this method doesn't throw if the JSON field has an unexpected type.
-
_workspaceId
final JsonField<String> _workspaceId()
Returns the raw JSON value of workspaceId.
Unlike workspaceId, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaAnalyticsUsageGroup.Builder toBuilder()
-
validate
final BetaAnalyticsUsageGroup 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 BetaAnalyticsUsageGroup.Builder builder()
Returns a mutable builder for constructing an instance of BetaAnalyticsUsageGroup.
The following fields are required:
.actor() .actorType() .agentId() .apiKeyId() .claudeTagCategory() .claudeTagUserId() .contextWindow() .deploymentId() .environmentId() .inferenceGeo() .model() .organizationId() .product() .rbacGroupId() .serviceTier() .sessionId() .slackChannelId() .speed() .userProfileId() .workspaceId()
-
-
-
-