Class BetaAnalyticsCostUsersItem

    • Constructor Detail

    • Method Detail

      • amount

         final String amount()

        Amount (post-discount, pre-credit) in fractional cents (minor units).

      • 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), or dm (direct messages with Claude). Populated only when claude_tag_category is in group_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 when claude_tag_user_id is in group_by[]; null for usage that is not Claude Tag and for Claude Tag usage that is not attributed to a single user (for example monitoring, and proactive usage Claude initiated), so per-user rows can sum to less than the Claude Tag total. Cannot be combined with group_by[]=rbac_group_id or the rbac_group_ids[] filter.

      • contextWindow

         final Optional<BetaAnalyticsContextWindow> contextWindow()

        Context-window pricing tier of the usage or cost. Null unless context_window is in group_by[]; it can also be null on grouped rows with no context-window tier, such as code execution.

      • currency

         final String currency()

        Currency code for the cost amount. Currently always "USD".

      • endingAt

         final Optional<OffsetDateTime> endingAt()

        End of the row's UTC time bucket (exclusive), as an RFC 3339 timestamp; equal to starting_at plus one bucket_width. Null unless bucket_width is set.

      • listAmount

         final String listAmount()

        List-price amount (pre-discount) in fractional cents.

      • 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 unless model is in group_by[]; it can also be null on grouped rows whose usage or cost is not attributed to a specific model, such as code execution.

      • 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 include chat, claude_code, cowork, office_agent, claude_in_chrome, claude_design, claude-tag, and chat_cowork_unified. claude-tag is Claude Tag, the Claude product in Slack. chat_cowork_unified is 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 of chat or cowork. 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 an rbac_group_ids[] filter value. Populated only when rbac_group_id is in group_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 without group_by[].

      • requests

         final Optional<Long> requests()

        Number of API requests in this row's scope. Null when group_by includes cost_type or token_type (the count has no per-component attribution; read it from the ungrouped response). For sandbox / code-execution events, this counts execution spans rather than HTTP requests (these rows surface with product: null).

      • slackChannelId

         final Optional<String> slackChannelId()

        Slack channel the usage originated from. Populated only when slack_channel_id is in group_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.

      • startingAt

         final Optional<OffsetDateTime> startingAt()

        Start of the row's UTC time bucket (inclusive), as an RFC 3339 timestamp. Null unless bucket_width is set; without bucket_width, each row aggregates the full requested range.

      • _amount

         final JsonField<String> _amount()

        Returns the raw JSON value of amount.

        Unlike amount, 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.

      • _currency

         final JsonField<String> _currency()

        Returns the raw JSON value of currency.

        Unlike currency, 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.

      • _listAmount

         final JsonField<String> _listAmount()

        Returns the raw JSON value of listAmount.

        Unlike listAmount, 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.

      • _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.

      • _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.

      • _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.

      • validate

         final BetaAnalyticsCostUsersItem 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 BetaAnalyticsCostUsersItem.Builder builder()

        Returns a mutable builder for constructing an instance of BetaAnalyticsCostUsersItem.

        The following fields are required:

        .actor()
        .amount()
        .claudeTagCategory()
        .claudeTagUserId()
        .contextWindow()
        .costType()
        .currency()
        .endingAt()
        .inferenceGeo()
        .listAmount()
        .model()
        .product()
        .rbacGroupId()
        .requests()
        .slackChannelId()
        .speed()
        .startingAt()
        .tokenType()