Module: Anthropic::Models::Beta::MemoryStores::BetaManagedAgentsErrorObject

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

Defined Under Namespace

Modules: Type

Class Method Summary collapse

Methods included from Internal::Type::Union

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

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:, message:) ⇒ Anthropic::BetaInvalidRequestErrorObject .new(type:, message:) ⇒ Anthropic::BetaAuthenticationErrorObject .new(type:, message:) ⇒ Anthropic::BetaBillingErrorObject .new(type:, message:) ⇒ Anthropic::BetaPermissionErrorObject .new(type:, message:) ⇒ Anthropic::BetaNotFoundErrorObject .new(type:, message:) ⇒ Anthropic::BetaRateLimitErrorObject .new(type:, message:) ⇒ Anthropic::BetaGatewayTimeoutErrorObject .new(type:, message:) ⇒ Anthropic::BetaAPIErrorObject .new(type:, message:) ⇒ Anthropic::BetaOverloadedErrorObject .new(type:, message:) ⇒ Anthropic::Beta::MemoryStores::BetaManagedAgentsMemoryPreconditionFailedErrorObject .new(type:, conflicting_memory_id:, conflicting_path:, message:) ⇒ Anthropic::Beta::MemoryStores::BetaManagedAgentsMemoryPathConflictErrorObject .new(type:, message:) ⇒ Anthropic::Beta::MemoryStores::BetaManagedAgentsConflictErrorObject .new(type:, message:, conflicting_memory_id:, conflicting_path:) ⇒ Anthropic::Models::Beta::MemoryStores::beta_managed_agents_error_object

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::BetaManagedAgentsErrorObject for more details.

Overloads:

Parameters:

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

    Attributes for the chosen variant.

    @option args [String] :message A human-readable explanation of the error. Its wording can change, so don't matc

    @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)


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
118
119
# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_error_object.rb', line 90

def self.new(type:, **args)
  case type.to_sym
  when :invalid_request_error
    Anthropic::BetaInvalidRequestErrorObject.new(**args)
  when :authentication_error
    Anthropic::BetaAuthenticationErrorObject.new(**args)
  when :billing_error
    Anthropic::BetaBillingErrorObject.new(**args)
  when :permission_error
    Anthropic::BetaPermissionErrorObject.new(**args)
  when :not_found_error
    Anthropic::BetaNotFoundErrorObject.new(**args)
  when :rate_limit_error
    Anthropic::BetaRateLimitErrorObject.new(**args)
  when :timeout_error
    Anthropic::BetaGatewayTimeoutErrorObject.new(**args)
  when :api_error
    Anthropic::BetaAPIErrorObject.new(**args)
  when :overloaded_error
    Anthropic::BetaOverloadedErrorObject.new(**args)
  when :memory_precondition_failed_error
    Anthropic::Beta::MemoryStores::BetaManagedAgentsMemoryPreconditionFailedErrorObject.new(**args)
  when :memory_path_conflict_error
    Anthropic::Beta::MemoryStores::BetaManagedAgentsMemoryPathConflictErrorObject.new(**args)
  when :conflict_error
    Anthropic::Beta::MemoryStores::BetaManagedAgentsConflictErrorObject.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_object.rb', line 64

.variants ⇒ Array(Anthropic::Models::BetaInvalidRequestErrorObject, Anthropic::Models::BetaAuthenticationErrorObject, Anthropic::Models::BetaBillingErrorObject, Anthropic::Models::BetaPermissionErrorObject, Anthropic::Models::BetaNotFoundErrorObject, Anthropic::Models::BetaRateLimitErrorObject, Anthropic::Models::BetaGatewayTimeoutErrorObject, Anthropic::Models::BetaAPIErrorObject, Anthropic::Models::BetaOverloadedErrorObject, Anthropic::Models::Beta::MemoryStores::BetaManagedAgentsMemoryPreconditionFailedErrorObject, Anthropic::Models::Beta::MemoryStores::BetaManagedAgentsMemoryPathConflictErrorObject, Anthropic::Models::Beta::MemoryStores::BetaManagedAgentsConflictErrorObject)



# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_error_object.rb', line 68