class Vellum::GenerateErrorResponse

def self.from_json(json_object:)

Returns:
  • (GenerateErrorResponse) -

Parameters:
  • json_object (JSON) --
def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  JSON.parse(json_object)
  detail = struct.detail
  new(detail: detail, additional_properties: struct)
end

def self.validate_raw(obj:)

Returns:
  • (Void) -

Parameters:
  • obj (Object) --
def self.validate_raw(obj:)
  obj.detail.is_a?(String) != false || raise("Passed value for field obj.detail is not the expected type, validation failed.")
end

def initialize(detail:, additional_properties: nil)

Returns:
  • (GenerateErrorResponse) -

Parameters:
  • additional_properties (OpenStruct) -- Additional properties unmapped to the current class definition
  • detail (String) -- Details about why the request failed.
def initialize(detail:, additional_properties: nil)
  # @type [String] Details about why the request failed.
  @detail = detail
  # @type [OpenStruct] Additional properties unmapped to the current class definition
  @additional_properties = additional_properties
end

def to_json(*_args)

Returns:
  • (JSON) -
def to_json(*_args)
  { "detail": @detail }.to_json
end