# This file was generated by the Julia OpenAPI Code Generator
# Do not modify this file directly. Modify the OpenAPI specification instead.
@doc raw"""TaskModel
TaskModel(;
created_at_ms=nothing,
error=nothing,
finished_at_ms=nothing,
id=nothing,
operation=nothing,
started_at_ms=nothing,
status=nothing,
workflow_id=nothing,
)
- created_at_ms::Int64
- error::String
- finished_at_ms::Int64
- id::Int64
- operation::String
- started_at_ms::Int64
- status::TaskStatus
- workflow_id::Int64
"""
Base.@kwdef mutable struct TaskModel <: OpenAPI.APIModel
created_at_ms::Union{Nothing, Int64} = nothing
error::Union{Nothing, String} = nothing
finished_at_ms::Union{Nothing, Int64} = nothing
id::Union{Nothing, Int64} = nothing
operation::Union{Nothing, String} = nothing
started_at_ms::Union{Nothing, Int64} = nothing
status = nothing # spec type: Union{ Nothing, TaskStatus }
workflow_id::Union{Nothing, Int64} = nothing
function TaskModel(created_at_ms, error, finished_at_ms, id, operation, started_at_ms, status, workflow_id, )
o = new(created_at_ms, error, finished_at_ms, id, operation, started_at_ms, status, workflow_id, )
OpenAPI.validate_properties(o)
return o
end
end # type TaskModel
const _property_types_TaskModel = Dict{Symbol,String}(Symbol("created_at_ms")=>"Int64", Symbol("error")=>"String", Symbol("finished_at_ms")=>"Int64", Symbol("id")=>"Int64", Symbol("operation")=>"String", Symbol("started_at_ms")=>"Int64", Symbol("status")=>"TaskStatus", Symbol("workflow_id")=>"Int64", )
OpenAPI.property_type(::Type{ TaskModel }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_TaskModel[name]))}
function OpenAPI.check_required(o::TaskModel)
o.created_at_ms === nothing && (return false)
o.id === nothing && (return false)
o.operation === nothing && (return false)
o.status === nothing && (return false)
o.workflow_id === nothing && (return false)
true
end
function OpenAPI.validate_properties(o::TaskModel)
OpenAPI.validate_property(TaskModel, Symbol("created_at_ms"), o.created_at_ms)
OpenAPI.validate_property(TaskModel, Symbol("error"), o.error)
OpenAPI.validate_property(TaskModel, Symbol("finished_at_ms"), o.finished_at_ms)
OpenAPI.validate_property(TaskModel, Symbol("id"), o.id)
OpenAPI.validate_property(TaskModel, Symbol("operation"), o.operation)
OpenAPI.validate_property(TaskModel, Symbol("started_at_ms"), o.started_at_ms)
OpenAPI.validate_property(TaskModel, Symbol("status"), o.status)
OpenAPI.validate_property(TaskModel, Symbol("workflow_id"), o.workflow_id)
end
function OpenAPI.validate_property(::Type{ TaskModel }, name::Symbol, val)
if name === Symbol("created_at_ms")
OpenAPI.validate_param(name, "TaskModel", :format, val, "int64")
end
if name === Symbol("finished_at_ms")
OpenAPI.validate_param(name, "TaskModel", :format, val, "int64")
end
if name === Symbol("id")
OpenAPI.validate_param(name, "TaskModel", :format, val, "int64")
end
if name === Symbol("started_at_ms")
OpenAPI.validate_param(name, "TaskModel", :format, val, "int64")
end
if name === Symbol("workflow_id")
OpenAPI.validate_param(name, "TaskModel", :format, val, "int64")
end
end