Class: Anthropic::Models::ToolSearchToolResultErrorParam

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/tool_search_tool_result_error_param.rb,
sig/anthropic/models/tool_search_tool_result_error_param.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(error_code:, error_message: nil, type: :tool_search_tool_result_error) ⇒ ToolSearchToolResultErrorParam

Returns a new instance of ToolSearchToolResultErrorParam.

Parameters:

  • error_code (Symbol, Anthropic::Models::ToolSearchToolResultErrorCode)
  • error_message (String, nil) (defaults to: nil)
  • type (Symbol, :tool_search_tool_result_error) (defaults to: :tool_search_tool_result_error)
  • error_code: (Anthropic::Models::tool_search_tool_result_error_code)
  • error_message: (String, nil) (defaults to: nil)
  • type: (:tool_search_tool_result_error) (defaults to: :tool_search_tool_result_error)


# File 'lib/anthropic/models/tool_search_tool_result_error_param.rb', line 21

Instance Attribute Details

#error_code ⇒ Symbol, Anthropic::Models::ToolSearchToolResultErrorCode

Parameters:

  • value (Anthropic::Models::tool_search_tool_result_error_code)

Returns:



9
# File 'lib/anthropic/models/tool_search_tool_result_error_param.rb', line 9

required :error_code, enum: -> { Anthropic::ToolSearchToolResultErrorCode }

#error_message ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


19
# File 'lib/anthropic/models/tool_search_tool_result_error_param.rb', line 19

optional :error_message, String, nil?: true

#type ⇒ Symbol, :tool_search_tool_result_error

Parameters:

  • value (:tool_search_tool_result_error)

Returns:

  • (Symbol, :tool_search_tool_result_error)


14
# File 'lib/anthropic/models/tool_search_tool_result_error_param.rb', line 14

required :type, const: :tool_search_tool_result_error

Instance Method Details

#to_hash ⇒ { error_code: Anthropic::Models::tool_search_tool_result_error_code, type: :tool_search_tool_result_error, error_message: String? }

Returns:

  • ({ error_code: Anthropic::Models::tool_search_tool_result_error_code, type: :tool_search_tool_result_error, error_message: String? })


23
24
25
26
27
# File 'sig/anthropic/models/tool_search_tool_result_error_param.rbs', line 23

def to_hash: -> {
  error_code: Anthropic::Models::tool_search_tool_result_error_code,
  type: :tool_search_tool_result_error,
  error_message: String?
}