class Vellum::InitiatedWorkflowNodeResultEvent
An event that indicates that the node has initiated its execution.
def self.from_json(json_object:)
-
(InitiatedWorkflowNodeResultEvent)-
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 node_id = struct.node_id node_result_id = struct.node_result_id ts = DateTime.parse(parsed_json["ts"]) if parsed_json["data"].nil? data = nil else data = parsed_json["data"].to_json data = WorkflowNodeResultData.from_json(json_object: data) end source_execution_id = struct.source_execution_id input_values = parsed_json["input_values"].map do |v| v = v.to_json NodeInputVariableCompiledValue.from_json(json_object: v) end new(id: id, node_id: node_id, node_result_id: node_result_id, ts: ts, data: data, source_execution_id: source_execution_id, input_values: input_values, 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.node_id.is_a?(String) != false || raise("Passed value for field obj.node_id is not the expected type, validation failed.") obj.node_result_id.is_a?(String) != false || raise("Passed value for field obj.node_result_id is not the expected type, validation failed.") obj.ts&.is_a?(DateTime) != false || raise("Passed value for field obj.ts is not the expected type, validation failed.") obj.data.nil? || WorkflowNodeResultData.validate_raw(obj: obj.data) obj.source_execution_id&.is_a?(String) != false || raise("Passed value for field obj.source_execution_id is not the expected type, validation failed.") obj.input_values&.is_a?(Array) != false || raise("Passed value for field obj.input_values is not the expected type, validation failed.") end
def initialize(id:, node_id:, node_result_id:, ts: nil, data: nil, source_execution_id: nil, input_values: nil,
-
(InitiatedWorkflowNodeResultEvent)-
Parameters:
-
additional_properties(OpenStruct) -- Additional properties unmapped to the current class definition -
input_values(Array) -- -
source_execution_id(String) -- -
data(WorkflowNodeResultData) -- -
ts(DateTime) -- -
node_result_id(String) -- -
node_id(String) -- -
id(String) --
def initialize(id:, node_id:, node_result_id:, ts: nil, data: nil, source_execution_id: nil, input_values: nil, additional_properties: nil) # @type [String] @id = id # @type [String] @node_id = node_id # @type [String] @node_result_id = node_result_id # @type [DateTime] @ts = ts # @type [WorkflowNodeResultData] @data = data # @type [String] @source_execution_id = source_execution_id # @type [Array<NodeInputVariableCompiledValue>] @input_values = input_values # @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, "node_id": @node_id, "node_result_id": @node_result_id, "ts": @ts, "data": @data, "source_execution_id": @source_execution_id, "input_values": @input_values }.to_json end