Class: Anthropic::Models::Beta::Organization::BetaAnalyticsProjectActivity

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/organization/beta_analytics_project_activity.rb,
sig/anthropic/models/beta/organization/beta_analytics_project_activity.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(created_at:, created_by:, distinct_conversation_count:, distinct_user_count:, message_count:, project_id:, project_name:, rbac_group_id: nil, rbac_group_name: nil, user_id: nil) ⇒ BetaAnalyticsProjectActivity

Per-project activity data for a given day.

Some parameter documentations has been truncated, see Anthropic::Models::Beta::Organization::BetaAnalyticsProjectActivity for more details.

Parameters:

  • created_at (Time, nil) —

    Project creation timestamp in RFC 3339 format. Null if the project was deleted b

  • created_by (Anthropic::Models::Beta::Organization::BetaAnalyticsUser, nil) —

    User who created the project. Null if the project was deleted before attribution

  • distinct_conversation_count (Integer, nil) —

    Number of distinct conversations in the project. Null on aggregated rows where a

  • distinct_user_count (Integer) —

    Number of distinct users who used the project on the requested day, or, in date-

  • message_count (Integer) —

    Number of messages sent in the project on the requested day

  • project_id (String) —

    Tagged project identifier (e.g. claude_proj_...)

  • project_name (String) —

    Name of the project

  • rbac_group_id (String, nil) (defaults to: nil) —

    Tagged RBAC group identifier (rbac_group_...), matching the spend-limits API s

  • rbac_group_name (String, nil) (defaults to: nil) —

    Resolved RBAC group display name, alongside rbac_group_id when name resolution

  • user_id (String, nil) (defaults to: nil) —

    Tagged user identifier (e.g. user_...). Present only when the request grouped

  • created_at: (Time, nil)
  • created_by: (Anthropic::Beta::Organization::BetaAnalyticsUser, nil)
  • distinct_conversation_count: (Integer, nil)
  • distinct_user_count: (Integer)
  • message_count: (Integer)
  • project_id: (String)
  • project_name: (String)
  • rbac_group_id: (String, nil) (defaults to: nil)
  • rbac_group_name: (String, nil) (defaults to: nil)
  • user_id: (String, nil) (defaults to: nil)


# File 'lib/anthropic/models/beta/organization/beta_analytics_project_activity.rb', line 77

Instance Attribute Details

#created_at ⇒ Time?

Project creation timestamp in RFC 3339 format. Null if the project was deleted before attribution was recorded.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


13
# File 'lib/anthropic/models/beta/organization/beta_analytics_project_activity.rb', line 13

required :created_at, Time, nil?: true

#created_by ⇒ Anthropic::Models::Beta::Organization::BetaAnalyticsUser?

User who created the project. Null if the project was deleted before attribution was recorded, or if the creator's account no longer exists.

Parameters:

  • value (Anthropic::Beta::Organization::BetaAnalyticsUser, nil)

Returns:



20
# File 'lib/anthropic/models/beta/organization/beta_analytics_project_activity.rb', line 20

required :created_by, -> { Anthropic::Beta::Organization::BetaAnalyticsUser }, nil?: true

#distinct_conversation_count ⇒ Integer?

Number of distinct conversations in the project. Null on aggregated rows where a distinct count cannot be computed.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


27
# File 'lib/anthropic/models/beta/organization/beta_analytics_project_activity.rb', line 27

required :distinct_conversation_count, Integer, nil?: true

#distinct_user_count ⇒ Integer

Number of distinct users who used the project on the requested day, or, in date-range mode, over the requested window — recomputed as an exact distinct count over the window's per-member daily rows, never a sum of per-day values.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


35
# File 'lib/anthropic/models/beta/organization/beta_analytics_project_activity.rb', line 35

required :distinct_user_count, Integer

#message_count ⇒ Integer

Number of messages sent in the project on the requested day

Parameters:

  • value (Integer)

Returns:

  • (Integer)


41
# File 'lib/anthropic/models/beta/organization/beta_analytics_project_activity.rb', line 41

required :message_count, Integer

#project_id ⇒ String

Tagged project identifier (e.g. claude_proj_...)

Parameters:

  • value (String)

Returns:

  • (String)


47
# File 'lib/anthropic/models/beta/organization/beta_analytics_project_activity.rb', line 47

required :project_id, String

#project_name ⇒ String

Name of the project

Parameters:

  • value (String)

Returns:

  • (String)


53
# File 'lib/anthropic/models/beta/organization/beta_analytics_project_activity.rb', line 53

required :project_name, String

#rbac_group_id ⇒ String?

Tagged RBAC group identifier (rbac_group_...), matching the spend-limits API spelling. Present only when the request grouped by rbac_group_id.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


60
# File 'lib/anthropic/models/beta/organization/beta_analytics_project_activity.rb', line 60

optional :rbac_group_id, String, nil?: true

#rbac_group_name ⇒ String?

Resolved RBAC group display name, alongside rbac_group_id when name resolution is available. Null if the group has been deleted or its name could not be resolved; rbac_group_id remains the stable key.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


68
# File 'lib/anthropic/models/beta/organization/beta_analytics_project_activity.rb', line 68

optional :rbac_group_name, String, nil?: true

#user_id ⇒ String?

Tagged user identifier (e.g. user_...). Present only when the request grouped by user_id.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


75
# File 'lib/anthropic/models/beta/organization/beta_analytics_project_activity.rb', line 75

optional :user_id, String, nil?: true

Instance Method Details

#to_hash ⇒ { created_at: Time?, created_by: Anthropic::Beta::Organization::BetaAnalyticsUser?, distinct_conversation_count: Integer?, distinct_user_count: Integer, message_count: Integer, project_id: String, project_name: String, rbac_group_id: String?, rbac_group_name: String?, user_id: String? }

Returns:

  • ({ created_at: Time?, created_by: Anthropic::Beta::Organization::BetaAnalyticsUser?, distinct_conversation_count: Integer?, distinct_user_count: Integer, message_count: Integer, project_id: String, project_name: String, rbac_group_id: String?, rbac_group_name: String?, user_id: String? })


53
54
55
56
57
58
59
60
61
62
63
64
# File 'sig/anthropic/models/beta/organization/beta_analytics_project_activity.rbs', line 53

def to_hash: -> {
  created_at: Time?,
  created_by: Anthropic::Beta::Organization::BetaAnalyticsUser?,
  distinct_conversation_count: Integer?,
  distinct_user_count: Integer,
  message_count: Integer,
  project_id: String,
  project_name: String,
  rbac_group_id: String?,
  rbac_group_name: String?,
  user_id: String?
}