Class: Anthropic::Models::Beta::BetaManagedAgentsSessionUsageEvent

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/beta_managed_agents_session_usage_event.rb,
sig/anthropic/models/beta/beta_managed_agents_session_usage_event.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 ⇒ BetaManagedAgentsSessionUsageEvent

Returns a new instance of BetaManagedAgentsSessionUsageEvent.

Parameters:

  • id: (String)
  • processed_at: (Time)
  • usage: (Anthropic::Beta::Sessions::BetaManagedAgentsSessionUsageSnapshot)
  • budget: (Anthropic::Beta::BetaManagedAgentsBudgetLimit, nil)
  • type: (:"session.usage")


26
27
28
29
30
31
32
# File 'sig/anthropic/models/beta/beta_managed_agents_session_usage_event.rbs', line 26

def initialize: (
  id: String,
  processed_at: Time,
  usage: Anthropic::Beta::Sessions::BetaManagedAgentsSessionUsageSnapshot,
  ?budget: Anthropic::Beta::BetaManagedAgentsBudgetLimit?,
  ?type: :"session.usage"
) -> void

Instance Attribute Details

#budget ⇒ Anthropic::Models::Beta::BetaManagedAgentsBudgetLimit?

The session's configured budget at the snapshot time, or null when the session has no budget.

Parameters:

  • value (Anthropic::Beta::BetaManagedAgentsBudgetLimit, nil)

Returns:



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

optional :budget, -> { Anthropic::Beta::BetaManagedAgentsBudgetLimit }, nil?: true

#id ⇒ String

Unique identifier for this event.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/anthropic/models/beta/beta_managed_agents_session_usage_event.rb', line 11

required :id, String

#processed_at ⇒ Time

Timestamp when the snapshot was taken.

Parameters:

  • value (Time)

Returns:

  • (Time)


17
# File 'lib/anthropic/models/beta/beta_managed_agents_session_usage_event.rb', line 17

required :processed_at, Time

#type ⇒ Symbol, :"session.usage"

Parameters:

  • value (:"session.usage")

Returns:

  • (Symbol, :"session.usage")


22
# File 'lib/anthropic/models/beta/beta_managed_agents_session_usage_event.rb', line 22

required :type, const: :"session.usage"

#usage ⇒ Anthropic::Models::Beta::Sessions::BetaManagedAgentsSessionUsageSnapshot

The session's cumulative usage at the snapshot time.

Parameters:

  • value (Anthropic::Beta::Sessions::BetaManagedAgentsSessionUsageSnapshot)

Returns:



28
# File 'lib/anthropic/models/beta/beta_managed_agents_session_usage_event.rb', line 28

required :usage, -> { Anthropic::Beta::Sessions::BetaManagedAgentsSessionUsageSnapshot }

Instance Method Details

#to_hash ⇒ { id: String, processed_at: Time, type: :"session.usage", usage: Anthropic::Beta::Sessions::BetaManagedAgentsSessionUsageSnapshot, budget: Anthropic::Beta::BetaManagedAgentsBudgetLimit? }

Returns:

  • ({ id: String, processed_at: Time, type: :"session.usage", usage: Anthropic::Beta::Sessions::BetaManagedAgentsSessionUsageSnapshot, budget: Anthropic::Beta::BetaManagedAgentsBudgetLimit? })


34
35
36
37
38
39
40
# File 'sig/anthropic/models/beta/beta_managed_agents_session_usage_event.rbs', line 34

def to_hash: -> {
  id: String,
  processed_at: Time,
  type: :"session.usage",
  usage: Anthropic::Beta::Sessions::BetaManagedAgentsSessionUsageSnapshot,
  budget: Anthropic::Beta::BetaManagedAgentsBudgetLimit?
}