Class: OpenAI::Models::Live::ServerEvent::TransportFailed::Error

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

Overview

See Also:

  • OpenAI::Models::Live::ServerEvent::TransportFailed#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:, param: nil, type: :call_error) ⇒ Error

Returns a new instance of Error.

Parameters:

  • code —

    The call setup failure code.

  • param (defaults to: nil) —

    The parameter related to the error, if any. Empty when no parameter applies.

  • code: (String)
  • message: (String)
  • param: (String) (defaults to: nil)
  • type: (:call_error) (defaults to: :call_error)


# File 'lib/openai/models/live/server_event.rb', line 417

Instance Attribute Details

#code ⇒ String

The call setup failure code.

Returns:

  • (String)


399
# File 'lib/openai/models/live/server_event.rb', line 399

required :code, String

#message ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


404
# File 'lib/openai/models/live/server_event.rb', line 404

required :message, String

#param ⇒ String?

The parameter related to the error, if any. Empty when no parameter applies.

Returns:

  • (String, nil)


415
# File 'lib/openai/models/live/server_event.rb', line 415

optional :param, String

#type ⇒ Symbol, :call_error

Parameters:

  • value (:call_error)

Returns:

  • (Symbol, :call_error)


409
# File 'lib/openai/models/live/server_event.rb', line 409

required :type, const: :call_error

Instance Method Details

#to_hash ⇒ { code: String, message: String, ?type: :call_error, ?param: String }

Returns:

  • ({ code: String, message: String, ?type: :call_error, ?param: String })


364
365
366
367
368
369
# File 'sig/openai/models/live/server_event.rbs', line 364

def to_hash: -> {
  code: String,
  message: String,
  ?type: :call_error,
  ?param: String
}