Class: Anthropic::Models::Beta::BetaTextEditorCodeExecutionStrReplaceResultBlockParam

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

Returns a new instance of BetaTextEditorCodeExecutionStrReplaceResultBlockParam.

Parameters:

  • lines: (::Array[String], nil)
  • new_lines: (Integer, nil)
  • new_start: (Integer, nil)
  • old_lines: (Integer, nil)
  • old_start: (Integer, nil)
  • type: (:text_editor_code_execution_str_replace_result)


29
30
31
32
33
34
35
36
# File 'sig/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block_param.rbs', line 29

def initialize: (
  ?lines: ::Array[String]?,
  ?new_lines: Integer?,
  ?new_start: Integer?,
  ?old_lines: Integer?,
  ?old_start: Integer?,
  ?type: :text_editor_code_execution_str_replace_result
) -> void

Instance Attribute Details

#lines ⇒ Array<String>?

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


15
# File 'lib/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block_param.rb', line 15

optional :lines, Anthropic::Internal::Type::ArrayOf[String], nil?: true

#new_lines ⇒ Integer?

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


20
# File 'lib/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block_param.rb', line 20

optional :new_lines, Integer, nil?: true

#new_start ⇒ Integer?

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


25
# File 'lib/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block_param.rb', line 25

optional :new_start, Integer, nil?: true

#old_lines ⇒ Integer?

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


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

optional :old_lines, Integer, nil?: true

#old_start ⇒ Integer?

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


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

optional :old_start, Integer, nil?: true

#type ⇒ Symbol, :text_editor_code_execution_str_replace_result

Parameters:

  • value (:text_editor_code_execution_str_replace_result)

Returns:

  • (Symbol, :text_editor_code_execution_str_replace_result)


10
# File 'lib/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block_param.rb', line 10

required :type, const: :text_editor_code_execution_str_replace_result

Instance Method Details

#to_hash ⇒ { type: :text_editor_code_execution_str_replace_result, lines: ::Array[String]?, new_lines: Integer?, new_start: Integer?, old_lines: Integer?, old_start: Integer? }

Returns:

  • ({ type: :text_editor_code_execution_str_replace_result, lines: ::Array[String]?, new_lines: Integer?, new_start: Integer?, old_lines: Integer?, old_start: Integer? })


38
39
40
41
42
43
44
45
# File 'sig/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block_param.rbs', line 38

def to_hash: -> {
  type: :text_editor_code_execution_str_replace_result,
  lines: ::Array[String]?,
  new_lines: Integer?,
  new_start: Integer?,
  old_lines: Integer?,
  old_start: Integer?
}