class Vellum::WorkflowOutputFunctionCall
A function call output from a Workflow execution.
def self.from_json(json_object:)
-
(WorkflowOutputFunctionCall)-
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 name = struct.name if parsed_json["value"].nil? value = nil else value = parsed_json["value"].to_json value = FunctionCall.from_json(json_object: value) end 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.nil? || FunctionCall.validate_raw(obj: obj.value) end
def initialize(id:, name:, value: nil, additional_properties: nil)
-
(WorkflowOutputFunctionCall)-
Parameters:
-
additional_properties(OpenStruct) -- Additional properties unmapped to the current class definition -
value(FunctionCall) -- -
name(String) -- The output's name, as defined in the workflow -
id(String) --
def initialize(id:, name:, value: nil, additional_properties: nil) # @type [String] @id = id # @type [String] The output's name, as defined in the workflow @name = name # @type [FunctionCall] @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