Class: Anthropic::Models::Beta::BetaBrowserScrollInput

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

Returns a new instance of BetaBrowserScrollInput.

Parameters:

  • scroll_direction: (Anthropic::Models::Beta::beta_browser_scroll_direction)
  • target: (Anthropic::Beta::BetaBrowserCoordinateTarget)
  • scroll_amount: (Integer, nil)
  • tab_id: (String, nil)


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

def initialize: (
  scroll_direction: Anthropic::Models::Beta::beta_browser_scroll_direction,
  target: Anthropic::Beta::BetaBrowserCoordinateTarget,
  ?scroll_amount: Integer?,
  ?tab_id: String?
) -> void

Instance Attribute Details

#scroll_amount ⇒ Integer?

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

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


23
# File 'lib/anthropic/models/beta/beta_browser_scroll_input.rb', line 23

optional :scroll_amount, Integer, nil?: true

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

Parameters:

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

Returns:



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

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

#tab_id ⇒ String?

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

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :tab_id, String, nil?: true

#target ⇒ Anthropic::Models::Beta::BetaBrowserCoordinateTarget

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

Parameters:

  • value (Anthropic::Beta::BetaBrowserCoordinateTarget)

Returns:



17
# File 'lib/anthropic/models/beta/beta_browser_scroll_input.rb', line 17

required :target, -> { Anthropic::Beta::BetaBrowserCoordinateTarget }

Instance Method Details

#to_hash ⇒ { scroll_direction: Anthropic::Models::Beta::beta_browser_scroll_direction, target: Anthropic::Beta::BetaBrowserCoordinateTarget, scroll_amount: Integer?, tab_id: String? }

Returns:

  • ({ scroll_direction: Anthropic::Models::Beta::beta_browser_scroll_direction, target: Anthropic::Beta::BetaBrowserCoordinateTarget, scroll_amount: Integer?, tab_id: String? })


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

def to_hash: -> {
  scroll_direction: Anthropic::Models::Beta::beta_browser_scroll_direction,
  target: Anthropic::Beta::BetaBrowserCoordinateTarget,
  scroll_amount: Integer?,
  tab_id: String?
}