class Vellum::NodeInputCompiledSearchResultsValue
def self.from_json(json_object:)
-
(NodeInputCompiledSearchResultsValue)-
Parameters:
-
json_object(JSON) --
def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) node_input_id = struct.node_input_id key = struct.key value = parsed_json["value"].map do |v| v = v.to_json SearchResult.from_json(json_object: v) end new(node_input_id: node_input_id, key: key, value: value, additional_properties: struct) end
def self.validate_raw(obj:)
-
(Void)-
Parameters:
-
obj(Object) --
def self.validate_raw(obj:) obj.node_input_id.is_a?(String) != false || raise("Passed value for field obj.node_input_id is not the expected type, validation failed.") obj.key.is_a?(String) != false || raise("Passed value for field obj.key 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(node_input_id:, key:, value: nil, additional_properties: nil)
-
(NodeInputCompiledSearchResultsValue)-
Parameters:
-
additional_properties(OpenStruct) -- Additional properties unmapped to the current class definition -
value(Array) -- -
key(String) -- -
node_input_id(String) --
def initialize(node_input_id:, key:, value: nil, additional_properties: nil) # @type [String] @node_input_id = node_input_id # @type [String] @key = key # @type [Array<SearchResult>] @value = value # @type [OpenStruct] Additional properties unmapped to the current class definition @additional_properties = additional_properties end
def to_json(*_args)
-
(JSON)-
def to_json(*_args) { "node_input_id": @node_input_id, "key": @key, "value": @value }.to_json end