class Vellum::CodeExecutionNodeSearchResultsResult

def self.from_json(json_object:)

Returns:
  • (CodeExecutionNodeSearchResultsResult) -

Parameters:
  • json_object (JSON) --
def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  id = struct.id
  value = parsed_json["value"].map do |v|
    v = v.to_json
    SearchResult.from_json(json_object: v)
  end
  new(id: id, value: value, additional_properties: struct)
end

def self.validate_raw(obj:)

Returns:
  • (Void) -

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

def initialize(id:, value: nil, additional_properties: nil)

Returns:
  • (CodeExecutionNodeSearchResultsResult) -

Parameters:
  • additional_properties (OpenStruct) -- Additional properties unmapped to the current class definition
  • value (Array) --
  • id (String) --
def initialize(id:, value: nil, additional_properties: nil)
  # @type [String]
  @id = id
  # @type [Array<SearchResult>]
  @value = value
  # @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)
  { "id": @id, "value": @value }.to_json
end