Class: OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication

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

Defined Under Namespace

Classes: Field, Option

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(id:, label:, required:, type:) ⇒ BrowserAuthentication

Returns a new instance of BrowserAuthentication.

Parameters:

  • credential_origin —

    The registered form or frame origin where values will be entered.

  • fields —

    Controls to render. All submitted values are sensitive.

  • options —

    Sign-in methods. Empty for a plain form.

  • reason —

    Why the agent needs the user to sign in.

  • type —

    The type of the object. Always browser_authentication.

  • credential_origin: (String, nil)
  • fields: (::Array[OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Field])
  • options: (::Array[OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Option])
  • reason: (String, nil)
  • type: (:browser_authentication)


# File 'lib/openai/models/beta/agent_session.rb', line 571

Instance Attribute Details

#credential_origin ⇒ String?

The registered form or frame origin where values will be entered.

Returns:

  • (String, nil)


489
# File 'lib/openai/models/beta/agent_session.rb', line 489

required :credential_origin, String, nil?: true

#fields ⇒ ::Array[OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Field]

Controls to render. All submitted values are sensitive.

Returns:

  • (::Array[OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Field])


495
496
497
498
499
500
501
502
# File 'lib/openai/models/beta/agent_session.rb', line 495

required(
  :fields,
  -> do
    OpenAI::Internal::Type::ArrayOf[
      OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Field
    ]
  end
)

#options ⇒ ::Array[OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Option]

Sign-in methods. Empty for a plain form.

Returns:

  • (::Array[OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Option])


508
509
510
511
512
513
514
515
# File 'lib/openai/models/beta/agent_session.rb', line 508

required(
  :options,
  -> do
    OpenAI::Internal::Type::ArrayOf[
      OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Option
    ]
  end
)

#reason ⇒ String?

Why the agent needs the user to sign in.

Returns:

  • (String, nil)


521
# File 'lib/openai/models/beta/agent_session.rb', line 521

required :reason, String, nil?: true

#type ⇒ :browser_authentication

The type of the object. Always browser_authentication.

Returns:

  • (:browser_authentication)


527
# File 'lib/openai/models/beta/agent_session.rb', line 527

required :type, const: :browser_authentication

Instance Method Details

#to_hash ⇒ { credential_origin: String?, fields: ::Array[OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Field], options: ::Array[OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Option], reason: String?, ?type: :browser_authentication }

Returns:

  • ({ credential_origin: String?, fields: ::Array[OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Field], options: ::Array[OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Option], reason: String?, ?type: :browser_authentication })


493
494
495
496
497
498
499
# File 'sig/openai/models/beta/agent_session.rbs', line 493

def to_hash: -> {
  credential_origin: String?,
  fields: ::Array[OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Field],
  options: ::Array[OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Option],
  reason: String?,
  ?type: :browser_authentication
}