class Vellum::TerminalNodeJsonResult
def self.from_json(json_object:)
-
(TerminalNodeJsonResult)-
Parameters:
-
json_object(JSON) --
def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) JSON.parse(json_object) id = struct.id name = struct.name value = struct.value new(id: id, name: name, value: value, additional_properties: struct) end
def self.validate_raw(obj:)
-
(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.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.") obj.value&.is_a?(Hash) != false || raise("Passed value for field obj.value is not the expected type, validation failed.") end
def initialize(name:, id: nil, value: nil, additional_properties: nil)
-
(TerminalNodeJsonResult)-
Parameters:
-
additional_properties(OpenStruct) -- Additional properties unmapped to the current class definition -
value(Hash{String => String}) -- -
name(String) -- The unique name given to the terminal node that produced this output. -
id(String) --
def initialize(name:, id: nil, value: nil, additional_properties: nil) # @type [String] @id = id # @type [String] The unique name given to the terminal node that produced this output. @name = name # @type [Hash{String => String}] @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) { "id": @id, "name": @name, "value": @value }.to_json end