# This file was generated by the Julia OpenAPI Code Generator
# Do not modify this file directly. Modify the OpenAPI specification instead.
@doc raw"""result_model
ResultModel(;
id=nothing,
job_id=nothing,
workflow_id=nothing,
run_id=nothing,
attempt_id=1,
compute_node_id=nothing,
return_code=nothing,
exec_time_minutes=nothing,
completion_time=nothing,
status=nothing,
peak_memory_bytes=nothing,
avg_memory_bytes=nothing,
peak_cpu_percent=nothing,
avg_cpu_percent=nothing,
)
- id::Int64
- job_id::Int64 : Database ID for the job tied to this result
- workflow_id::Int64 : Database ID for the workflow tied to this result
- run_id::Int64 : ID of the workflow run. Incremements on every start and restart.
- attempt_id::Int64 : Retry attempt number for this result (starts at 1, increments on each retry)
- compute_node_id::Int64 : Database ID for the compute node that ran this job
- return_code::Int64 : Code returned by the job. Zero is success; non-zero is a failure.
- exec_time_minutes::Float64 : Job execution time in minutes
- completion_time::String : Timestamp of when the job completed.
- status::JobStatus : Status of the job; managed by torc.
- peak_memory_bytes::Int64 : Peak memory usage in bytes
- avg_memory_bytes::Int64 : Average memory usage in bytes
- peak_cpu_percent::Float64 : Peak CPU usage as percentage (can exceed 100% for multi-core)
- avg_cpu_percent::Float64 : Average CPU usage as percentage (can exceed 100% for multi-core)
"""
Base.@kwdef mutable struct ResultModel <: OpenAPI.APIModel
id::Union{Nothing, Int64} = nothing
job_id::Union{Nothing, Int64} = nothing
workflow_id::Union{Nothing, Int64} = nothing
run_id::Union{Nothing, Int64} = nothing
attempt_id::Union{Nothing, Int64} = 1
compute_node_id::Union{Nothing, Int64} = nothing
return_code::Union{Nothing, Int64} = nothing
exec_time_minutes::Union{Nothing, Float64} = nothing
completion_time::Union{Nothing, String} = nothing
status = nothing # spec type: Union{ Nothing, JobStatus }
peak_memory_bytes::Union{Nothing, Int64} = nothing
avg_memory_bytes::Union{Nothing, Int64} = nothing
peak_cpu_percent::Union{Nothing, Float64} = nothing
avg_cpu_percent::Union{Nothing, Float64} = nothing
function ResultModel(id, job_id, workflow_id, run_id, attempt_id, compute_node_id, return_code, exec_time_minutes, completion_time, status, peak_memory_bytes, avg_memory_bytes, peak_cpu_percent, avg_cpu_percent, )
o = new(id, job_id, workflow_id, run_id, attempt_id, compute_node_id, return_code, exec_time_minutes, completion_time, status, peak_memory_bytes, avg_memory_bytes, peak_cpu_percent, avg_cpu_percent, )
OpenAPI.validate_properties(o)
return o
end
end # type ResultModel
const _property_types_ResultModel = Dict{Symbol,String}(Symbol("id")=>"Int64", Symbol("job_id")=>"Int64", Symbol("workflow_id")=>"Int64", Symbol("run_id")=>"Int64", Symbol("attempt_id")=>"Int64", Symbol("compute_node_id")=>"Int64", Symbol("return_code")=>"Int64", Symbol("exec_time_minutes")=>"Float64", Symbol("completion_time")=>"String", Symbol("status")=>"JobStatus", Symbol("peak_memory_bytes")=>"Int64", Symbol("avg_memory_bytes")=>"Int64", Symbol("peak_cpu_percent")=>"Float64", Symbol("avg_cpu_percent")=>"Float64", )
OpenAPI.property_type(::Type{ ResultModel }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_ResultModel[name]))}
function OpenAPI.check_required(o::ResultModel)
o.job_id === nothing && (return false)
o.workflow_id === nothing && (return false)
o.run_id === nothing && (return false)
o.compute_node_id === nothing && (return false)
o.return_code === nothing && (return false)
o.exec_time_minutes === nothing && (return false)
o.completion_time === nothing && (return false)
o.status === nothing && (return false)
true
end
function OpenAPI.validate_properties(o::ResultModel)
OpenAPI.validate_property(ResultModel, Symbol("id"), o.id)
OpenAPI.validate_property(ResultModel, Symbol("job_id"), o.job_id)
OpenAPI.validate_property(ResultModel, Symbol("workflow_id"), o.workflow_id)
OpenAPI.validate_property(ResultModel, Symbol("run_id"), o.run_id)
OpenAPI.validate_property(ResultModel, Symbol("attempt_id"), o.attempt_id)
OpenAPI.validate_property(ResultModel, Symbol("compute_node_id"), o.compute_node_id)
OpenAPI.validate_property(ResultModel, Symbol("return_code"), o.return_code)
OpenAPI.validate_property(ResultModel, Symbol("exec_time_minutes"), o.exec_time_minutes)
OpenAPI.validate_property(ResultModel, Symbol("completion_time"), o.completion_time)
OpenAPI.validate_property(ResultModel, Symbol("status"), o.status)
OpenAPI.validate_property(ResultModel, Symbol("peak_memory_bytes"), o.peak_memory_bytes)
OpenAPI.validate_property(ResultModel, Symbol("avg_memory_bytes"), o.avg_memory_bytes)
OpenAPI.validate_property(ResultModel, Symbol("peak_cpu_percent"), o.peak_cpu_percent)
OpenAPI.validate_property(ResultModel, Symbol("avg_cpu_percent"), o.avg_cpu_percent)
end
function OpenAPI.validate_property(::Type{ ResultModel }, name::Symbol, val)
end