Class: Anthropic::Models::Beta::BetaManagedAgentsSessionUpdatedEvent

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

Returns a new instance of BetaManagedAgentsSessionUpdatedEvent.

Parameters:

  • id: (String)
  • processed_at: (Time)
  • agent: (Anthropic::Beta::BetaManagedAgentsSessionAgent, nil)
  • budget: (Anthropic::Beta::BetaManagedAgentsBudgetLimit, nil)
  • metadata: (::Hash[Symbol, String])
  • title: (String, nil)
  • type: (:"session.updated")


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

def initialize: (
  id: String,
  processed_at: Time,
  ?agent: Anthropic::Beta::BetaManagedAgentsSessionAgent?,
  ?budget: Anthropic::Beta::BetaManagedAgentsBudgetLimit?,
  ?metadata: ::Hash[Symbol, String],
  ?title: String?,
  ?type: :"session.updated"
) -> void

Instance Attribute Details

#agent ⇒ Anthropic::Models::Beta::BetaManagedAgentsSessionAgent?

The session's effective agent configuration after the update. Present only when the update changed agent (tools or mcp_servers); when present it is the full materialised snapshot, not a diff.

Parameters:

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

Returns:



30
# File 'lib/anthropic/models/beta/beta_managed_agents_session_updated_event.rb', line 30

optional :agent, -> { Anthropic::Beta::BetaManagedAgentsSessionAgent }, nil?: true

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

The session's budget after the update: the new budget when set or replaced, or null when the update removed it. Present only when the update changed the budget.

Parameters:

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

Returns:



38
# File 'lib/anthropic/models/beta/beta_managed_agents_session_updated_event.rb', line 38

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_updated_event.rb', line 11

required :id, String

#metadata ⇒ Hash{Symbol=>String}?

The session's full metadata bag after the update. Present when the update set non-empty metadata; absent when metadata was unchanged or cleared to empty.

Parameters:

  • (::Hash[Symbol, String])

Returns:

  • (Hash{Symbol=>String}, nil)


45
# File 'lib/anthropic/models/beta/beta_managed_agents_session_updated_event.rb', line 45

optional :metadata, Anthropic::Internal::Type::HashOf[String]

#processed_at ⇒ Time

Timestamp when the update was applied.

Parameters:

  • value (Time)

Returns:

  • (Time)


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

required :processed_at, Time

#title ⇒ String?

The session's new title. Present only when the update changed it.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


51
# File 'lib/anthropic/models/beta/beta_managed_agents_session_updated_event.rb', line 51

optional :title, String, nil?: true

#type ⇒ Symbol, :"session.updated"

Parameters:

  • value (:"session.updated")

Returns:

  • (Symbol, :"session.updated")


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

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

Instance Method Details

#to_hash ⇒ { id: String, processed_at: Time, type: :"session.updated", agent: Anthropic::Beta::BetaManagedAgentsSessionAgent?, budget: Anthropic::Beta::BetaManagedAgentsBudgetLimit?, metadata: ::Hash[Symbol, String], title: String? }

Returns:

  • ({ id: String, processed_at: Time, type: :"session.updated", agent: Anthropic::Beta::BetaManagedAgentsSessionAgent?, budget: Anthropic::Beta::BetaManagedAgentsBudgetLimit?, metadata: ::Hash[Symbol, String], title: String? })


44
45
46
47
48
49
50
51
52
# File 'sig/anthropic/models/beta/beta_managed_agents_session_updated_event.rbs', line 44

def to_hash: -> {
  id: String,
  processed_at: Time,
  type: :"session.updated",
  agent: Anthropic::Beta::BetaManagedAgentsSessionAgent?,
  budget: Anthropic::Beta::BetaManagedAgentsBudgetLimit?,
  metadata: ::Hash[Symbol, String],
  title: String?
}