Class: OpenAI::Models::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request::Option

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

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 ⇒ Option

Returns a new instance of Option.

Parameters:

  • id —

    The option ID to submit as selected_option.

  • field_ids —

    IDs from the registered fields that this method accepts.

  • label —

    The method label to display.

  • id: (String)
  • field_ids: (::Array[String])
  • label: (String)


391
392
393
394
395
# File 'sig/openai/models/beta/agent_session_item.rbs', line 391

def initialize: (
  id: String,
  field_ids: ::Array[String],
  label: String
) -> void

Instance Attribute Details

#field_ids ⇒ ::Array[String]

IDs from the registered fields that this method accepts.

Returns:

  • (::Array[String])


439
# File 'lib/openai/models/beta/agent_session_item.rb', line 439

required :field_ids, OpenAI::Internal::Type::ArrayOf[String]

#id ⇒ String

The option ID to submit as selected_option.

Returns:

  • (String)


433
# File 'lib/openai/models/beta/agent_session_item.rb', line 433

required :id, String

#label ⇒ String

The method label to display.

Returns:

  • (String)


445
# File 'lib/openai/models/beta/agent_session_item.rb', line 445

required :label, String

Instance Method Details

#to_hash ⇒ { id: String, field_ids: ::Array[String], label: String }

Returns:

  • ({ id: String, field_ids: ::Array[String], label: String })


397
398
399
400
401
# File 'sig/openai/models/beta/agent_session_item.rbs', line 397

def to_hash: -> {
  id: String,
  field_ids: ::Array[String],
  label: String
}