Class: OpenAI::Models::Responses::ResponseComputerToolCall::Action::Click

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

Defined Under Namespace

Modules: Button

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_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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(button:, x:, y_:, keys: nil, type: :click) ⇒ Click

Returns a new instance of Click.

Parameters:

  • button —

    Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.

  • x —

    The x-coordinate where the click occurred.

  • y_ —

    The y-coordinate where the click occurred.

  • keys (defaults to: nil) —

    The keys being held while clicking.

  • type (defaults to: :click) —

    Specifies the event type. For a click action, this property is always click.

  • button: (OpenAI::Models::Responses::ResponseComputerToolCall::Action::Click::button)
  • x: (Integer)
  • y_: (Integer)
  • keys: (::Array[String], nil) (defaults to: nil)
  • type: (:click) (defaults to: :click)


# File 'lib/openai/models/responses/response_computer_tool_call.rb', line 207

Instance Attribute Details

#button ⇒ OpenAI::Models::Responses::ResponseComputerToolCall::Action::Click::button

Indicates which mouse button was pressed during the click. One of left, right, wheel, back, or forward.

Returns:

  • (OpenAI::Models::Responses::ResponseComputerToolCall::Action::Click::button)


181
# File 'lib/openai/models/responses/response_computer_tool_call.rb', line 181

required :button, enum: -> { OpenAI::Responses::ResponseComputerToolCall::Action::Click::Button }

#keys ⇒ ::Array[String]?

The keys being held while clicking.

Returns:

  • (::Array[String], nil)


205
# File 'lib/openai/models/responses/response_computer_tool_call.rb', line 205

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

#type ⇒ :click

Specifies the event type. For a click action, this property is always click.

Returns:

  • (:click)


187
# File 'lib/openai/models/responses/response_computer_tool_call.rb', line 187

required :type, const: :click

#x ⇒ Integer

The x-coordinate where the click occurred.

Returns:

  • (Integer)


193
# File 'lib/openai/models/responses/response_computer_tool_call.rb', line 193

required :x, Integer

#y_ ⇒ Integer

The y-coordinate where the click occurred.

Returns:

  • (Integer)


199
# File 'lib/openai/models/responses/response_computer_tool_call.rb', line 199

required :y_, Integer, api_name: :y

Instance Method Details

#to_hash ⇒ { button: OpenAI::Models::Responses::ResponseComputerToolCall::Action::Click::button, ?type: :click, x: Integer, y_: Integer, ?keys: ::Array[String]? }

Returns:

  • ({ button: OpenAI::Models::Responses::ResponseComputerToolCall::Action::Click::button, ?type: :click, x: Integer, y_: Integer, ?keys: ::Array[String]? })


195
196
197
198
199
200
201
# File 'sig/openai/models/responses/response_computer_tool_call.rbs', line 195

def to_hash: -> {
  button: OpenAI::Models::Responses::ResponseComputerToolCall::Action::Click::button,
  ?type: :click,
  x: Integer,
  y_: Integer,
  ?keys: ::Array[String]?
}