Module: Anthropic::Models::Beta::MemoryStores::BetaManagedAgentsError

Extended by:
Internal::Type::Union
Defined in:
lib/anthropic/models/beta/memory_stores/beta_managed_agents_error.rb,
sig/anthropic/models/beta/memory_stores/beta_managed_agents_error.rbs

Defined Under Namespace

Modules: Type

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::Union

==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type, variants

Methods included from Internal::Util::SorbetRuntimeSupport

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

Methods included from Internal::Type::Converter

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

Class Method Details

.new(type:, **args) ⇒ Anthropic::Models::BetaInvalidRequestError, ...

Creates a new instance of the variant class whose type matches the given value, passing the remaining arguments to its constructor.

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

Parameters:

  • type (Symbol, Anthropic::Models::Beta::MemoryStores::BetaManagedAgentsError::Type, String)
  • args (Hash{Symbol=>Object}) —

    Attributes for the chosen variant.

    @option args [String] :message A human-readable explanation of why the precondition failed.

    @option args [String] :conflicting_memory_id The ID of the memory that blocked the write (mem_...), or an empty string if t

    @option args [String] :conflicting_path The path that blocked the write: the requested path, or the path of a memory tha

Returns:

Raises:

  • (ArgumentError)


88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_error.rb', line 88

def self.new(type:, **args)
  case type.to_sym
  when :invalid_request_error
    Anthropic::BetaInvalidRequestError.new(**args)
  when :authentication_error
    Anthropic::BetaAuthenticationError.new(**args)
  when :billing_error
    Anthropic::BetaBillingError.new(**args)
  when :permission_error
    Anthropic::BetaPermissionError.new(**args)
  when :not_found_error
    Anthropic::BetaNotFoundError.new(**args)
  when :rate_limit_error
    Anthropic::BetaRateLimitError.new(**args)
  when :timeout_error
    Anthropic::BetaGatewayTimeoutError.new(**args)
  when :api_error
    Anthropic::BetaAPIError.new(**args)
  when :overloaded_error
    Anthropic::BetaOverloadedError.new(**args)
  when :memory_precondition_failed_error
    Anthropic::Beta::MemoryStores::BetaManagedAgentsMemoryPreconditionFailedError.new(**args)
  when :memory_path_conflict_error
    Anthropic::Beta::MemoryStores::BetaManagedAgentsMemoryPathConflictError.new(**args)
  when :conflict_error
    Anthropic::Beta::MemoryStores::BetaManagedAgentsConflictError.new(**args)
  else
    raise ArgumentError, "unknown type: #{type}"
  end
end

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_error.rb', line 62


.variants ⇒ Array(Anthropic::Models::BetaInvalidRequestError, Anthropic::Models::BetaAuthenticationError, Anthropic::Models::BetaBillingError, Anthropic::Models::BetaPermissionError, Anthropic::Models::BetaNotFoundError, Anthropic::Models::BetaRateLimitError, Anthropic::Models::BetaGatewayTimeoutError, Anthropic::Models::BetaAPIError, Anthropic::Models::BetaOverloadedError, Anthropic::Models::Beta::MemoryStores::BetaManagedAgentsMemoryPreconditionFailedError, Anthropic::Models::Beta::MemoryStores::BetaManagedAgentsMemoryPathConflictError, Anthropic::Models::Beta::MemoryStores::BetaManagedAgentsConflictError)



# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_error.rb', line 66


Instance Method Details

#self?.variants ⇒ ::Array[Anthropic::Models::Beta::MemoryStores::beta_managed_agents_error]

Returns:

  • (::Array[Anthropic::Models::Beta::MemoryStores::beta_managed_agents_error])


55
# File 'sig/anthropic/models/beta/memory_stores/beta_managed_agents_error.rbs', line 55

def self?.variants: -> ::Array[Anthropic::Models::Beta::MemoryStores::beta_managed_agents_error]