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

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_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(credential_origin:, fields:, options:, reason:, type: :browser_authentication) ⇒ Object

Parameters:

  • id —

    The field ID to submit as field_id in a fields entry.

  • label —

    The label to display beside the control.

  • required —

    Whether this control requires a nonempty value.

  • type (defaults to: :browser_authentication) —

    The rendering type, such as email, password, or text.



387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
# File 'lib/openai/models/beta/agent_session_item.rb', line 387

class Field < OpenAI::Internal::Type::BaseModel
  # @!attribute id
  #   The field ID to submit as field_id in a fields entry.
  #
  #   @return [String]
  required :id, String

  # @!attribute label
  #   The label to display beside the control.
  #
  #   @return [String]
  required :label, String

  # @!attribute required
  #   Whether this control requires a nonempty value.
  #
  #   @return [Boolean]
  required :required, OpenAI::Internal::Type::Boolean

  # @!attribute type
  #   The rendering type, such as email, password, or text.
  #
  #   @return [String]
  required :type, String

  # @!method initialize(id:, label:, required:, type:)
  #   A control in a registered browser-login form.
  #
  #   @param id [String]
  #     The field ID to submit as field_id in a fields entry.
  #
  #   @param label [String]
  #     The label to display beside the control.
  #
  #   @param required [Boolean]
  #     Whether this control requires a nonempty value.
  #
  #   @param type [String]
  #     The rendering type, such as email, password, or text.
end

Instance Attribute Details

#id ⇒ String

The field ID to submit as field_id in a fields entry.

Returns:

  • (String)


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

required :id, String

#label ⇒ String

The label to display beside the control.

Returns:

  • (String)


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

required :label, String

#required ⇒ Boolean

Whether this control requires a nonempty value.

Returns:



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

required :required, OpenAI::Internal::Type::Boolean

#type ⇒ String

The rendering type, such as email, password, or text.

Returns:

  • (String)


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

required :type, String

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


364
# File 'sig/openai/models/beta/agent_session_item.rbs', line 364

def to_hash: -> {