torc 0.21.0

Workflow management system
# This file was generated by the Julia OpenAPI Code Generator
# Do not modify this file directly. Modify the OpenAPI specification instead.


@doc raw"""event_model
Data model for events.

    EventModel(;
        id=nothing,
        workflow_id=nothing,
        timestamp=nothing,
        data=nothing,
    )

    - id::Int64 : Database ID of the event.
    - workflow_id::Int64 : Database ID of the workflow this record is associated with.
    - timestamp::Int64 : Timestamp of the event
    - data::Any : User-defined data associated with the event
"""
Base.@kwdef mutable struct EventModel <: OpenAPI.APIModel
    id::Union{Nothing, Int64} = nothing
    workflow_id::Union{Nothing, Int64} = nothing
    timestamp::Union{Nothing, Int64} = nothing
    data::Union{Nothing, Any} = nothing

    function EventModel(id, workflow_id, timestamp, data, )
        o = new(id, workflow_id, timestamp, data, )
        OpenAPI.validate_properties(o)
        return o
    end
end # type EventModel

const _property_types_EventModel = Dict{Symbol,String}(Symbol("id")=>"Int64", Symbol("workflow_id")=>"Int64", Symbol("timestamp")=>"Int64", Symbol("data")=>"Any", )
OpenAPI.property_type(::Type{ EventModel }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_EventModel[name]))}

function OpenAPI.check_required(o::EventModel)
    o.workflow_id === nothing && (return false)
    o.timestamp === nothing && (return false)
    o.data === nothing && (return false)
    true
end

function OpenAPI.validate_properties(o::EventModel)
    OpenAPI.validate_property(EventModel, Symbol("id"), o.id)
    OpenAPI.validate_property(EventModel, Symbol("workflow_id"), o.workflow_id)
    OpenAPI.validate_property(EventModel, Symbol("timestamp"), o.timestamp)
    OpenAPI.validate_property(EventModel, Symbol("data"), o.data)
end

function OpenAPI.validate_property(::Type{ EventModel }, name::Symbol, val)




end