Class: Anthropic::Models::BrowserScrollInput

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/browser_scroll_input.rb,
sig/anthropic/models/browser_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_direction:, target:, scroll_amount: nil, tab_id: nil) ⇒ BrowserScrollInput

Scroll at a viewport position. target must be a coordinate target.

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

Parameters:

  • scroll_direction (Symbol, Anthropic::Models::BrowserScrollDirection)
  • target (Anthropic::Models::BrowserCoordinateTarget) —

    A point in the browser viewport, in viewport pixels (the same frame as a

  • scroll_amount (Integer, nil) (defaults to: nil) —

    Scroll-wheel notches (1–10). Default 3.

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

    Tab to act on. Defaults to the active tab when omitted.

  • scroll_direction: (Anthropic::Models::browser_scroll_direction)
  • target: (Anthropic::BrowserCoordinateTarget)
  • scroll_amount: (Integer, nil) (defaults to: nil)
  • tab_id: (String, nil) (defaults to: nil)


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

Instance Attribute Details

#scroll_amount ⇒ Integer?

Scroll-wheel notches (1–10). Default 3.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


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

optional :scroll_amount, Integer, nil?: true

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

Parameters:

  • value (Anthropic::Models::browser_scroll_direction)

Returns:



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

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

#tab_id ⇒ String?

Tab to act on. Defaults to the active tab when omitted.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :tab_id, String, nil?: true

#target ⇒ Anthropic::Models::BrowserCoordinateTarget

A point in the browser viewport, in viewport pixels (the same frame as a full-viewport screenshot).



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

required :target, -> { Anthropic::BrowserCoordinateTarget }

Instance Method Details

#to_hash ⇒ { scroll_direction: Anthropic::Models::browser_scroll_direction, target: Anthropic::BrowserCoordinateTarget, scroll_amount: Integer?, tab_id: String? }

Returns:



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

def to_hash: -> {
  scroll_direction: Anthropic::Models::browser_scroll_direction,
  target: Anthropic::BrowserCoordinateTarget,
  scroll_amount: Integer?,
  tab_id: String?
}