Class BetaAnalyticsUserActivity.Builder
-
- All Implemented Interfaces:
public final class BetaAnalyticsUserActivity.BuilderA builder for BetaAnalyticsUserActivity.
-
-
Method Summary
-
-
Method Detail
-
chatMetrics
final BetaAnalyticsUserActivity.Builder chatMetrics(BetaAnalyticsChatMetrics chatMetrics)
Claude.ai activity metrics for a single user on a given day.
-
chatMetrics
final BetaAnalyticsUserActivity.Builder chatMetrics(JsonField<BetaAnalyticsChatMetrics> chatMetrics)
Sets Builder.chatMetrics to an arbitrary JSON value.
You should usually call Builder.chatMetrics with a well-typed BetaAnalyticsChatMetrics value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
claudeCodeMetrics
final BetaAnalyticsUserActivity.Builder claudeCodeMetrics(BetaAnalyticsClaudeCodeMetrics claudeCodeMetrics)
Claude Code activity metrics for a single user on a given day.
-
claudeCodeMetrics
final BetaAnalyticsUserActivity.Builder claudeCodeMetrics(JsonField<BetaAnalyticsClaudeCodeMetrics> claudeCodeMetrics)
Sets Builder.claudeCodeMetrics to an arbitrary JSON value.
You should usually call Builder.claudeCodeMetrics with a well-typed BetaAnalyticsClaudeCodeMetrics value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
coworkMetrics
final BetaAnalyticsUserActivity.Builder coworkMetrics(BetaAnalyticsCoworkMetrics coworkMetrics)
Cowork activity metrics for a single user on a given day.
-
coworkMetrics
final BetaAnalyticsUserActivity.Builder coworkMetrics(JsonField<BetaAnalyticsCoworkMetrics> coworkMetrics)
Sets Builder.coworkMetrics to an arbitrary JSON value.
You should usually call Builder.coworkMetrics with a well-typed BetaAnalyticsCoworkMetrics value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
designMetrics
final BetaAnalyticsUserActivity.Builder designMetrics(BetaAnalyticsDesignMetrics designMetrics)
Claude Design activity metrics for a single user on a given day.
-
designMetrics
final BetaAnalyticsUserActivity.Builder designMetrics(JsonField<BetaAnalyticsDesignMetrics> designMetrics)
Sets Builder.designMetrics to an arbitrary JSON value.
You should usually call Builder.designMetrics with a well-typed BetaAnalyticsDesignMetrics value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
distinctUserCount
final BetaAnalyticsUserActivity.Builder distinctUserCount(Long distinctUserCount)
Number of distinct active users represented by this row. Only set for grouped rollups (
group_by[]); null for per-user rows. In date-range mode, recomputed as an exact distinct count of the group's active members over the requested window, never a sum of per-day values.
-
distinctUserCount
final BetaAnalyticsUserActivity.Builder distinctUserCount(Long distinctUserCount)
Alias for Builder.distinctUserCount.
This unboxed primitive overload exists for backwards compatibility.
-
distinctUserCount
final BetaAnalyticsUserActivity.Builder distinctUserCount(Optional<Long> distinctUserCount)
Alias for calling Builder.distinctUserCount with
distinctUserCount.orElse(null).
-
distinctUserCount
final BetaAnalyticsUserActivity.Builder distinctUserCount(JsonField<Long> distinctUserCount)
Sets Builder.distinctUserCount to an arbitrary JSON value.
You should usually call Builder.distinctUserCount with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
officeMetrics
final BetaAnalyticsUserActivity.Builder officeMetrics(BetaAnalyticsOfficeMetrics officeMetrics)
Office Agent activity metrics for a single user on a given day, broken out by Office product.
-
officeMetrics
final BetaAnalyticsUserActivity.Builder officeMetrics(JsonField<BetaAnalyticsOfficeMetrics> officeMetrics)
Sets Builder.officeMetrics to an arbitrary JSON value.
You should usually call Builder.officeMetrics with a well-typed BetaAnalyticsOfficeMetrics value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
scienceMetrics
final BetaAnalyticsUserActivity.Builder scienceMetrics(BetaAnalyticsScienceMetrics scienceMetrics)
Claude Science activity metrics for a single user on a given day.
-
scienceMetrics
final BetaAnalyticsUserActivity.Builder scienceMetrics(JsonField<BetaAnalyticsScienceMetrics> scienceMetrics)
Sets Builder.scienceMetrics to an arbitrary JSON value.
You should usually call Builder.scienceMetrics with a well-typed BetaAnalyticsScienceMetrics value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
user
final BetaAnalyticsUserActivity.Builder user(BetaAnalyticsUser user)
The user this row describes. Null on rows aggregated across users.
-
user
final BetaAnalyticsUserActivity.Builder user(Optional<BetaAnalyticsUser> user)
Alias for calling Builder.user with
user.orElse(null).
-
user
final BetaAnalyticsUserActivity.Builder user(JsonField<BetaAnalyticsUser> user)
Sets Builder.user to an arbitrary JSON value.
You should usually call Builder.user with a well-typed BetaAnalyticsUser value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
webSearchCount
final BetaAnalyticsUserActivity.Builder webSearchCount(Long webSearchCount)
Number of web searches performed
-
webSearchCount
final BetaAnalyticsUserActivity.Builder webSearchCount(JsonField<Long> webSearchCount)
Sets Builder.webSearchCount to an arbitrary JSON value.
You should usually call Builder.webSearchCount with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
chatCoworkUnifiedMetrics
final BetaAnalyticsUserActivity.Builder chatCoworkUnifiedMetrics(BetaAnalyticsChatCoworkUnifiedMetrics chatCoworkUnifiedMetrics)
Activity recorded while the member had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on, split into
chat(chat activity) andsessions(Cowork activity). Omitted from the response where Chat and Cowork unified is not available.
-
chatCoworkUnifiedMetrics
final BetaAnalyticsUserActivity.Builder chatCoworkUnifiedMetrics(Optional<BetaAnalyticsChatCoworkUnifiedMetrics> chatCoworkUnifiedMetrics)
Alias for calling Builder.chatCoworkUnifiedMetrics with
chatCoworkUnifiedMetrics.orElse(null).
-
chatCoworkUnifiedMetrics
final BetaAnalyticsUserActivity.Builder chatCoworkUnifiedMetrics(JsonField<BetaAnalyticsChatCoworkUnifiedMetrics> chatCoworkUnifiedMetrics)
Sets Builder.chatCoworkUnifiedMetrics to an arbitrary JSON value.
You should usually call Builder.chatCoworkUnifiedMetrics with a well-typed BetaAnalyticsChatCoworkUnifiedMetrics value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
claudeTagMetrics
final BetaAnalyticsUserActivity.Builder claudeTagMetrics(BetaAnalyticsClaudeTagMetrics claudeTagMetrics)
Claude Tag activity in Slack by a user who has linked a Claude account. Activity by Slack users who have not linked an account appears only in the
/summariesClaude Tag counts, so these rows do not add up to those counts. Omitted from the response on deployments that do not offer Claude Tag reporting.
-
claudeTagMetrics
final BetaAnalyticsUserActivity.Builder claudeTagMetrics(Optional<BetaAnalyticsClaudeTagMetrics> claudeTagMetrics)
Alias for calling Builder.claudeTagMetrics with
claudeTagMetrics.orElse(null).
-
claudeTagMetrics
final BetaAnalyticsUserActivity.Builder claudeTagMetrics(JsonField<BetaAnalyticsClaudeTagMetrics> claudeTagMetrics)
Sets Builder.claudeTagMetrics to an arbitrary JSON value.
You should usually call Builder.claudeTagMetrics with a well-typed BetaAnalyticsClaudeTagMetrics value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
lastActivityDate
final BetaAnalyticsUserActivity.Builder lastActivityDate(LocalDate lastActivityDate)
Most recent UTC day (YYYY-MM-DD) on which the user had any counted activity, within the requested window: equal to the requested
datein single-day mode, and to the latest active day fromstarting_date(inclusive) toending_date(exclusive) in date-range rollup mode — never a day earlier than the window start. On filtered requests (filter[]) only days matching the filter count: withfilter[]=rbac_group_id:{id}it is the last day the user was active while a member of that group, consistent with the row's other metrics. On grouped (group_by[]) rows it is the latest day any member of the group was active (the requesteddatein single-day mode). Omitted from the response while last-activity reporting is not enabled for this organization.
-
lastActivityDate
final BetaAnalyticsUserActivity.Builder lastActivityDate(Optional<LocalDate> lastActivityDate)
Alias for calling Builder.lastActivityDate with
lastActivityDate.orElse(null).
-
lastActivityDate
final BetaAnalyticsUserActivity.Builder lastActivityDate(JsonField<LocalDate> lastActivityDate)
Sets Builder.lastActivityDate to an arbitrary JSON value.
You should usually call Builder.lastActivityDate with a well-typed LocalDate value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
rbacGroupId
final BetaAnalyticsUserActivity.Builder rbacGroupId(String rbacGroupId)
Tagged RBAC group identifier (
rbac_group_...), matching the spend-limits API spelling. Present only when the request grouped byrbac_group_id.
-
rbacGroupId
final BetaAnalyticsUserActivity.Builder rbacGroupId(Optional<String> rbacGroupId)
Alias for calling Builder.rbacGroupId with
rbacGroupId.orElse(null).
-
rbacGroupId
final BetaAnalyticsUserActivity.Builder rbacGroupId(JsonField<String> rbacGroupId)
Sets Builder.rbacGroupId to an arbitrary JSON value.
You should usually call Builder.rbacGroupId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
rbacGroupName
final BetaAnalyticsUserActivity.Builder rbacGroupName(String rbacGroupName)
Resolved RBAC group display name, alongside
rbac_group_idwhen name resolution is available. Null if the group has been deleted or its name could not be resolved;rbac_group_idremains the stable key.
-
rbacGroupName
final BetaAnalyticsUserActivity.Builder rbacGroupName(Optional<String> rbacGroupName)
Alias for calling Builder.rbacGroupName with
rbacGroupName.orElse(null).
-
rbacGroupName
final BetaAnalyticsUserActivity.Builder rbacGroupName(JsonField<String> rbacGroupName)
Sets Builder.rbacGroupName to an arbitrary JSON value.
You should usually call Builder.rbacGroupName with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final BetaAnalyticsUserActivity.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final BetaAnalyticsUserActivity.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaAnalyticsUserActivity.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaAnalyticsUserActivity.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaAnalyticsUserActivity.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaAnalyticsUserActivity build()
Returns an immutable instance of BetaAnalyticsUserActivity.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.chatMetrics() .claudeCodeMetrics() .coworkMetrics() .designMetrics() .distinctUserCount() .officeMetrics() .scienceMetrics() .user() .webSearchCount()
-
-
-
-