Class: Vellum::SubworkflowNodeResult

Inherits:
Object
  • Object
show all
Defined in:
lib/vellum_ai/types/subworkflow_node_result.rb

Overview

A Node Result Event emitted from a Subworkflow Node.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(additional_properties: nil) ⇒ SubworkflowNodeResult

Parameters:

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



12
13
14
15
# File 'lib/vellum_ai/types/subworkflow_node_result.rb', line 12

def initialize(additional_properties: nil)
  # @type [OpenStruct] Additional properties unmapped to the current class definition
  @additional_properties = additional_properties
end

Instance Attribute Details

#additional_propertiesObject (readonly)

Returns the value of attribute additional_properties.



8
9
10
# File 'lib/vellum_ai/types/subworkflow_node_result.rb', line 8

def additional_properties
  @additional_properties
end

Class Method Details

.from_json(json_object:) ⇒ SubworkflowNodeResult

Deserialize a JSON object to an instance of SubworkflowNodeResult

Parameters:

  • json_object (JSON)

Returns:



21
22
23
24
25
# File 'lib/vellum_ai/types/subworkflow_node_result.rb', line 21

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

.validate_raw(obj:) ⇒ Void

Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object’s property definitions.

Parameters:

  • obj (Object)

Returns:

  • (Void)


38
# File 'lib/vellum_ai/types/subworkflow_node_result.rb', line 38

def self.validate_raw(obj:); end

Instance Method Details

#to_json(*_args) ⇒ JSON

Serialize an instance of SubworkflowNodeResult to a JSON object

Returns:

  • (JSON)


30
31
32
# File 'lib/vellum_ai/types/subworkflow_node_result.rb', line 30

def to_json(*_args)
  {}.to_json
end