class Vellum::FulfilledExecuteWorkflowWorkflowResultEvent
The successful response from the Workflow execution containing the produced outputs.
def self.from_json(json_object:)
-
(FulfilledExecuteWorkflowWorkflowResultEvent)-
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 ts = DateTime.parse(parsed_json["ts"]) outputs = parsed_json["outputs"].map do |v| v = v.to_json WorkflowOutput.from_json(json_object: v) end new(id: id, ts: ts, outputs: outputs, 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.ts.is_a?(DateTime) != false || raise("Passed value for field obj.ts is not the expected type, validation failed.") obj.outputs.is_a?(Array) != false || raise("Passed value for field obj.outputs is not the expected type, validation failed.") end
def initialize(id:, ts:, outputs:, additional_properties: nil)
-
(FulfilledExecuteWorkflowWorkflowResultEvent)-
Parameters:
-
additional_properties(OpenStruct) -- Additional properties unmapped to the current class definition -
outputs(Array) -- -
ts(DateTime) -- -
id(String) --
def initialize(id:, ts:, outputs:, additional_properties: nil) # @type [String] @id = id # @type [DateTime] @ts = ts # @type [Array<WorkflowOutput>] @outputs = outputs # @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, "ts": @ts, "outputs": @outputs }.to_json end