Class: Vellum::MergeNodeResultData

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

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(paused_node_data: OMIT, additional_properties: nil) ⇒ Vellum::MergeNodeResultData

Parameters:

  • paused_node_data (Hash{String => Object}) (defaults to: OMIT)
  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



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

def initialize(paused_node_data: OMIT, additional_properties: nil)
  @paused_node_data = paused_node_data if paused_node_data != OMIT
  @additional_properties = additional_properties
  @_field_set = { "paused_node_data": paused_node_data }.reject do | _k, v |
  v == OMIT
end
end

Instance Attribute Details

#additional_propertiesOpenStruct (readonly)

Returns Additional properties unmapped to the current class definition.

Returns:

  • (OpenStruct)

    Additional properties unmapped to the current class definition



10
11
12
# File 'lib/vellum_ai/types/merge_node_result_data.rb', line 10

def additional_properties
  @additional_properties
end

#paused_node_dataHash{String => Object} (readonly)

Returns:

  • (Hash{String => Object})


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

def paused_node_data
  @paused_node_data
end

Class Method Details

.from_json(json_object:) ⇒ Vellum::MergeNodeResultData

Parameters:

  • json_object (String)

Returns:



31
32
33
34
35
36
# File 'lib/vellum_ai/types/merge_node_result_data.rb', line 31

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  paused_node_data = parsed_json["paused_node_data"]
  new(paused_node_data: paused_node_data, additional_properties: struct)
end

.validate_raw(obj:) ⇒ Void

Parameters:

  • obj (Object)

Returns:

  • (Void)


49
50
51
# File 'lib/vellum_ai/types/merge_node_result_data.rb', line 49

def self.validate_raw(obj:)
  obj.paused_node_data&.is_a?(Hash) != false || raise("Passed value for field obj.paused_node_data is not the expected type, validation failed.")
end

Instance Method Details

#to_jsonString

Returns:

  • (String)


40
41
42
# File 'lib/vellum_ai/types/merge_node_result_data.rb', line 40

def to_json
  @_field_set&.to_json
end