Class: Anthropic::Models::ComputerScrollInput

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/computer_scroll_input.rb,
sig/anthropic/models/computer_scroll_input.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(scroll_amount:, scroll_direction:, coordinate: nil, text: nil) ⇒ ComputerScrollInput

Scroll the screen at the specified (x, y) pixel coordinate, or the current cursor position if coordinate is omitted. Do NOT use PageUp/PageDown to scroll.

Some parameter documentations has been truncated, see Anthropic::Models::ComputerScrollInput for more details.

Parameters:

  • scroll_amount (Integer) —

    Number of 'clicks' of the scroll wheel.

  • scroll_direction (Symbol, Anthropic::Models::ComputerScrollDirection)
  • coordinate (Array<Integer>, nil) (defaults to: nil) —

    (x, y): x pixels from the left edge, y pixels from the top edge.

  • text (String, nil) (defaults to: nil) —

    Optional key combination to hold down during this action (e.g. "ctrl", "shift",

  • scroll_amount: (Integer)
  • scroll_direction: (Anthropic::Models::computer_scroll_direction)
  • coordinate: (::Array[Integer], nil) (defaults to: nil)
  • text: (String, nil) (defaults to: nil)


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

Instance Attribute Details

#coordinate ⇒ Array<Integer>?

(x, y): x pixels from the left edge, y pixels from the top edge.

Parameters:

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

Returns:

  • (Array<Integer>, nil)


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

optional :coordinate, Anthropic::Internal::Type::ArrayOf[Integer], nil?: true

#scroll_amount ⇒ Integer

Number of 'clicks' of the scroll wheel.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


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

required :scroll_amount, Integer

#scroll_direction ⇒ Symbol, Anthropic::Models::ComputerScrollDirection

Parameters:

  • value (Anthropic::Models::computer_scroll_direction)

Returns:



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

required :scroll_direction, enum: -> { Anthropic::ComputerScrollDirection }

#text ⇒ String?

Optional key combination to hold down during this action (e.g. "ctrl", "shift", "ctrl+shift").

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


28
# File 'lib/anthropic/models/computer_scroll_input.rb', line 28

optional :text, String, nil?: true

Instance Method Details

#to_hash ⇒ { scroll_amount: Integer, scroll_direction: Anthropic::Models::computer_scroll_direction, coordinate: ::Array[Integer]?, text: String? }

Returns:

  • ({ scroll_amount: Integer, scroll_direction: Anthropic::Models::computer_scroll_direction, coordinate: ::Array[Integer]?, text: String? })


27
28
29
30
31
32
# File 'sig/anthropic/models/computer_scroll_input.rbs', line 27

def to_hash: -> {
  scroll_amount: Integer,
  scroll_direction: Anthropic::Models::computer_scroll_direction,
  coordinate: ::Array[Integer]?,
  text: String?
}