Class: Anthropic::Models::Beta::BetaComputerScrollInput

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

Returns a new instance of BetaComputerScrollInput.

Parameters:

  • scroll_amount: (Integer)
  • scroll_direction: (Anthropic::Models::Beta::beta_computer_scroll_direction)
  • coordinate: (::Array[Integer], nil)
  • text: (String, nil)


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

def initialize: (
  scroll_amount: Integer,
  scroll_direction: Anthropic::Models::Beta::beta_computer_scroll_direction,
  ?coordinate: ::Array[Integer]?,
  ?text: String?
) -> void

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)


22
# File 'lib/anthropic/models/beta/beta_computer_scroll_input.rb', line 22

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

#scroll_amount ⇒ Integer

Number of 'clicks' of the scroll wheel.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


11
# File 'lib/anthropic/models/beta/beta_computer_scroll_input.rb', line 11

required :scroll_amount, Integer

#scroll_direction ⇒ Symbol, Anthropic::Models::Beta::BetaComputerScrollDirection

Parameters:

  • value (Anthropic::Models::Beta::beta_computer_scroll_direction)

Returns:



16
# File 'lib/anthropic/models/beta/beta_computer_scroll_input.rb', line 16

required :scroll_direction, enum: -> { Anthropic::Beta::BetaComputerScrollDirection }

#text ⇒ String?

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

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :text, String, nil?: true

Instance Method Details

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

Returns:

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


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

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