Class: OpenAI::Models::Beta::AgentSessionEnvironmentState

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

Defined Under Namespace

Modules: Status Classes: Error

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(code:, message:, type:) ⇒ AgentSessionEnvironmentState

Returns a new instance of AgentSessionEnvironmentState.

Parameters:

  • id —

    The public ID of the environment.

  • error —

    The error reported while preparing the environment, if any.

  • status —

    The environment's connection status.

  • type —

    The environment type.

  • id: (String)
  • error: (OpenAI::Beta::AgentSessionEnvironmentState::Error, nil)
  • status: (OpenAI::Models::Beta::AgentSessionEnvironmentState::status)
  • type: (String)


# File 'lib/openai/models/beta/agent_session_environment_state.rb', line 31

Instance Attribute Details

#error ⇒ OpenAI::Beta::AgentSessionEnvironmentState::Error?

The error reported while preparing the environment, if any.

Returns:

  • (OpenAI::Beta::AgentSessionEnvironmentState::Error, nil)


17
# File 'lib/openai/models/beta/agent_session_environment_state.rb', line 17

required :error, -> { OpenAI::Beta::AgentSessionEnvironmentState::Error }, nil?: true

#id ⇒ String

The public ID of the environment.

Returns:

  • (String)


11
# File 'lib/openai/models/beta/agent_session_environment_state.rb', line 11

required :id, String

#status ⇒ OpenAI::Models::Beta::AgentSessionEnvironmentState::status

The environment's connection status.

Returns:

  • (OpenAI::Models::Beta::AgentSessionEnvironmentState::status)


23
# File 'lib/openai/models/beta/agent_session_environment_state.rb', line 23

required :status, enum: -> { OpenAI::Beta::AgentSessionEnvironmentState::Status }

#type ⇒ String

The environment type.

Returns:

  • (String)


29
# File 'lib/openai/models/beta/agent_session_environment_state.rb', line 29

required :type, String

Instance Method Details

#to_hash ⇒ { id: String, error: OpenAI::Beta::AgentSessionEnvironmentState::Error?, status: OpenAI::Models::Beta::AgentSessionEnvironmentState::status, type: String }

Returns:

  • ({ id: String, error: OpenAI::Beta::AgentSessionEnvironmentState::Error?, status: OpenAI::Models::Beta::AgentSessionEnvironmentState::status, type: String })


40
41
42
43
44
45
# File 'sig/openai/models/beta/agent_session_environment_state.rbs', line 40

def to_hash: -> {
  id: String,
  error: OpenAI::Beta::AgentSessionEnvironmentState::Error?,
  status: OpenAI::Models::Beta::AgentSessionEnvironmentState::status,
  type: String
}