Class: OpenAI::Models::Responses::ComputerAction::Drag

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/responses/computer_action.rb,
sig/openai/models/responses/computer_action.rbs

Defined Under Namespace

Classes: Path

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_with_error, 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 ⇒ Object

Parameters:

  • path —

    An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg

    [
      { x: 100, y: 200 },
      { x: 200, y: 300 }
    ]
    
  • keys —

    The keys being held while dragging the mouse.

  • type —

    Specifies the event type. For a drag action, this property is always set to drag.



173
# File 'sig/openai/models/responses/computer_action.rbs', line 173

def initialize: (

Instance Attribute Details

#keys ⇒ ::Array[String]?

The keys being held while dragging the mouse.

Returns:

  • (::Array[String], nil)


177
# File 'lib/openai/models/responses/computer_action.rb', line 177

optional :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true

#path ⇒ ::Array[OpenAI::Responses::ComputerAction::Drag::Path]

An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg

[
  { x: 100, y: 200 },
  { x: 200, y: 300 }
]

Returns:

  • (::Array[OpenAI::Responses::ComputerAction::Drag::Path])


164
# File 'lib/openai/models/responses/computer_action.rb', line 164

required :path, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Responses::ComputerAction::Drag::Path] }

#type ⇒ :drag

Specifies the event type. For a drag action, this property is always set to drag.

Returns:

  • (:drag)


171
# File 'lib/openai/models/responses/computer_action.rb', line 171

required :type, const: :drag

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


179
# File 'sig/openai/models/responses/computer_action.rbs', line 179

def to_hash: -> {