Class: Anthropic::Models::TextEditorCodeExecutionViewResultBlockParam

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/text_editor_code_execution_view_result_block_param.rb,
sig/anthropic/models/text_editor_code_execution_view_result_block_param.rbs

Defined Under Namespace

Modules: FileType

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(content:, file_type:, num_lines: nil, start_line: nil, total_lines: nil, type: :text_editor_code_execution_view_result) ⇒ TextEditorCodeExecutionViewResultBlockParam

Returns a new instance of TextEditorCodeExecutionViewResultBlockParam.

Parameters:

  • content (String)
  • file_type (Symbol, Anthropic::Models::TextEditorCodeExecutionViewResultBlockParam::FileType)
  • num_lines (Integer, nil) (defaults to: nil)
  • start_line (Integer, nil) (defaults to: nil)
  • total_lines (Integer, nil) (defaults to: nil)
  • type (Symbol, :text_editor_code_execution_view_result) (defaults to: :text_editor_code_execution_view_result)
  • content: (String)
  • file_type: (Anthropic::Models::TextEditorCodeExecutionViewResultBlockParam::file_type)
  • num_lines: (Integer, nil) (defaults to: nil)
  • start_line: (Integer, nil) (defaults to: nil)
  • total_lines: (Integer, nil) (defaults to: nil)
  • type: (:text_editor_code_execution_view_result) (defaults to: :text_editor_code_execution_view_result)


# File 'lib/anthropic/models/text_editor_code_execution_view_result_block_param.rb', line 36


Instance Attribute Details

#content ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


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

required :content, String

#file_type ⇒ Symbol, Anthropic::Models::TextEditorCodeExecutionViewResultBlockParam::FileType

Parameters:

  • value (Anthropic::Models::TextEditorCodeExecutionViewResultBlockParam::file_type)

Returns:



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

required :file_type, enum: -> { Anthropic::TextEditorCodeExecutionViewResultBlockParam::FileType }

#num_lines ⇒ Integer?

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


24
# File 'lib/anthropic/models/text_editor_code_execution_view_result_block_param.rb', line 24

optional :num_lines, Integer, nil?: true

#start_line ⇒ Integer?

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


29
# File 'lib/anthropic/models/text_editor_code_execution_view_result_block_param.rb', line 29

optional :start_line, Integer, nil?: true

#total_lines ⇒ Integer?

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


34
# File 'lib/anthropic/models/text_editor_code_execution_view_result_block_param.rb', line 34

optional :total_lines, Integer, nil?: true

#type ⇒ Symbol, :text_editor_code_execution_view_result

Parameters:

  • value (:text_editor_code_execution_view_result)

Returns:

  • (Symbol, :text_editor_code_execution_view_result)


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

required :type, const: :text_editor_code_execution_view_result

Instance Method Details

#to_hash ⇒ { content: String, file_type: Anthropic::Models::TextEditorCodeExecutionViewResultBlockParam::file_type, type: :text_editor_code_execution_view_result, num_lines: Integer?, start_line: Integer?, total_lines: Integer? }

Returns:

  • ({ content: String, file_type: Anthropic::Models::TextEditorCodeExecutionViewResultBlockParam::file_type, type: :text_editor_code_execution_view_result, num_lines: Integer?, start_line: Integer?, total_lines: Integer? })


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

def to_hash: -> {
  content: String,
  file_type: Anthropic::Models::TextEditorCodeExecutionViewResultBlockParam::file_type,
  type: :text_editor_code_execution_view_result,
  num_lines: Integer?,
  start_line: Integer?,
  total_lines: Integer?
}