Class: OpenAI::Models::Beta::BetaComputerAction::Drag::Path

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/beta_computer_action.rb

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(path:, keys: nil, type: :drag) ⇒ Object

A drag action.

Parameters:

  • path (Array<OpenAI::Models::Beta::BetaComputerAction::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 }
    ]
    
  • keys (Array<String>, nil) (defaults to: nil)

    The keys being held while dragging the mouse.

  • type (Symbol, :drag) (defaults to: :drag)

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



199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# File 'lib/openai/models/beta/beta_computer_action.rb', line 199

class Path < OpenAI::Internal::Type::BaseModel
  # @!attribute x
  #   The x-coordinate.
  #
  #   @return [Integer]
  required :x, Integer

  # @!attribute y_
  #   The y-coordinate.
  #
  #   @return [Integer]
  required :y_, Integer, api_name: :y

  # @!method initialize(x:, y_:)
  #   An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`.
  #
  #   @param x [Integer]
  #     The x-coordinate.
  #
  #   @param y_ [Integer]
  #     The y-coordinate.
end

Instance Attribute Details

#xInteger

The x-coordinate.

Returns:

  • (Integer)


204
# File 'lib/openai/models/beta/beta_computer_action.rb', line 204

required :x, Integer

#y_Integer

The y-coordinate.

Returns:

  • (Integer)


210
# File 'lib/openai/models/beta/beta_computer_action.rb', line 210

required :y_, Integer, api_name: :y