# This file was generated by the Julia OpenAPI Code Generator
# Do not modify this file directly. Modify the OpenAPI specification instead.
struct ResultsApi <: OpenAPI.APIClientImpl
client::OpenAPI.Clients.Client
end
"""
The default API base path for APIs in `ResultsApi`.
This can be used to construct the `OpenAPI.Clients.Client` instance.
"""
basepath(::Type{ ResultsApi }) = "http://localhost/torc-service/v1"
const _returntypes_create_result_ResultsApi = Dict{Regex,Type}(
Regex("^" * replace("200", "x"=>".") * "\$") => ResultModel,
Regex("^" * replace("403", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("404", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("500", "x"=>".") * "\$") => ErrorResponse,
)
function _oacinternal_create_result(_api::ResultsApi, result_model::ResultModel; _mediaType=nothing)
_ctx = OpenAPI.Clients.Ctx(_api.client, "POST", _returntypes_create_result_ResultsApi, "/results", [], result_model)
OpenAPI.Clients.set_header_accept(_ctx, ["application/json", ])
OpenAPI.Clients.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json", ] : [_mediaType])
return _ctx
end
@doc raw"""Params:
- result_model::ResultModel (required)
Return: ResultModel, OpenAPI.Clients.ApiResponse
"""
function create_result(_api::ResultsApi, result_model::ResultModel; _mediaType=nothing)
_ctx = _oacinternal_create_result(_api, result_model; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx)
end
function create_result(_api::ResultsApi, response_stream::Channel, result_model::ResultModel; _mediaType=nothing)
_ctx = _oacinternal_create_result(_api, result_model; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx, response_stream)
end
const _returntypes_delete_result_ResultsApi = Dict{Regex,Type}(
Regex("^" * replace("200", "x"=>".") * "\$") => ResultModel,
Regex("^" * replace("403", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("404", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("500", "x"=>".") * "\$") => ErrorResponse,
)
function _oacinternal_delete_result(_api::ResultsApi, id::Int64; _mediaType=nothing)
_ctx = OpenAPI.Clients.Ctx(_api.client, "DELETE", _returntypes_delete_result_ResultsApi, "/results/{id}", [])
OpenAPI.Clients.set_param(_ctx.path, "id", id) # type Int64
OpenAPI.Clients.set_header_accept(_ctx, ["application/json", ])
OpenAPI.Clients.set_header_content_type(_ctx, (_mediaType === nothing) ? [] : [_mediaType])
return _ctx
end
@doc raw"""Params:
- id::Int64 (required)
Return: ResultModel, OpenAPI.Clients.ApiResponse
"""
function delete_result(_api::ResultsApi, id::Int64; _mediaType=nothing)
_ctx = _oacinternal_delete_result(_api, id; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx)
end
function delete_result(_api::ResultsApi, response_stream::Channel, id::Int64; _mediaType=nothing)
_ctx = _oacinternal_delete_result(_api, id; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx, response_stream)
end
const _returntypes_delete_results_ResultsApi = Dict{Regex,Type}(
Regex("^" * replace("200", "x"=>".") * "\$") => Any,
Regex("^" * replace("403", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("404", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("500", "x"=>".") * "\$") => ErrorResponse,
)
function _oacinternal_delete_results(_api::ResultsApi, workflow_id::Int64; _mediaType=nothing)
_ctx = OpenAPI.Clients.Ctx(_api.client, "DELETE", _returntypes_delete_results_ResultsApi, "/results", [])
OpenAPI.Clients.set_param(_ctx.query, "workflow_id", workflow_id; style="form", is_explode=true) # type Int64
OpenAPI.Clients.set_header_accept(_ctx, ["application/json", ])
OpenAPI.Clients.set_header_content_type(_ctx, (_mediaType === nothing) ? [] : [_mediaType])
return _ctx
end
@doc raw"""Params:
- workflow_id::Int64 (required)
Return: Any, OpenAPI.Clients.ApiResponse
"""
function delete_results(_api::ResultsApi, workflow_id::Int64; _mediaType=nothing)
_ctx = _oacinternal_delete_results(_api, workflow_id; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx)
end
function delete_results(_api::ResultsApi, response_stream::Channel, workflow_id::Int64; _mediaType=nothing)
_ctx = _oacinternal_delete_results(_api, workflow_id; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx, response_stream)
end
const _returntypes_get_result_ResultsApi = Dict{Regex,Type}(
Regex("^" * replace("200", "x"=>".") * "\$") => ResultModel,
Regex("^" * replace("403", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("404", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("500", "x"=>".") * "\$") => ErrorResponse,
)
function _oacinternal_get_result(_api::ResultsApi, id::Int64; _mediaType=nothing)
_ctx = OpenAPI.Clients.Ctx(_api.client, "GET", _returntypes_get_result_ResultsApi, "/results/{id}", [])
OpenAPI.Clients.set_param(_ctx.path, "id", id) # type Int64
OpenAPI.Clients.set_header_accept(_ctx, ["application/json", ])
OpenAPI.Clients.set_header_content_type(_ctx, (_mediaType === nothing) ? [] : [_mediaType])
return _ctx
end
@doc raw"""Params:
- id::Int64 (required)
Return: ResultModel, OpenAPI.Clients.ApiResponse
"""
function get_result(_api::ResultsApi, id::Int64; _mediaType=nothing)
_ctx = _oacinternal_get_result(_api, id; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx)
end
function get_result(_api::ResultsApi, response_stream::Channel, id::Int64; _mediaType=nothing)
_ctx = _oacinternal_get_result(_api, id; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx, response_stream)
end
const _returntypes_list_results_ResultsApi = Dict{Regex,Type}(
Regex("^" * replace("200", "x"=>".") * "\$") => ListResultsResponse,
Regex("^" * replace("403", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("404", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("500", "x"=>".") * "\$") => ErrorResponse,
)
function _oacinternal_list_results(_api::ResultsApi, workflow_id::Int64; job_id=nothing, run_id=nothing, return_code=nothing, status=nothing, compute_node_id=nothing, offset=nothing, limit=nothing, sort_by=nothing, reverse_sort=nothing, all_runs=nothing, _mediaType=nothing)
_ctx = OpenAPI.Clients.Ctx(_api.client, "GET", _returntypes_list_results_ResultsApi, "/results", [])
OpenAPI.Clients.set_param(_ctx.query, "workflow_id", workflow_id; style="form", is_explode=true) # type Int64
OpenAPI.Clients.set_param(_ctx.query, "job_id", job_id; style="form", is_explode=true) # type Int64
OpenAPI.Clients.set_param(_ctx.query, "run_id", run_id; style="form", is_explode=true) # type Int64
OpenAPI.Clients.set_param(_ctx.query, "return_code", return_code; style="form", is_explode=true) # type Int64
OpenAPI.Clients.set_param(_ctx.query, "status", status; style="form", is_explode=true) # type JobStatus
OpenAPI.Clients.set_param(_ctx.query, "compute_node_id", compute_node_id; style="form", is_explode=true) # type Int64
OpenAPI.Clients.set_param(_ctx.query, "offset", offset; style="form", is_explode=true) # type Int64
OpenAPI.Clients.set_param(_ctx.query, "limit", limit; style="form", is_explode=true) # type Int64
OpenAPI.Clients.set_param(_ctx.query, "sort_by", sort_by; style="form", is_explode=true) # type String
OpenAPI.Clients.set_param(_ctx.query, "reverse_sort", reverse_sort; style="form", is_explode=true) # type Bool
OpenAPI.Clients.set_param(_ctx.query, "all_runs", all_runs; style="form", is_explode=true) # type Bool
OpenAPI.Clients.set_header_accept(_ctx, ["application/json", ])
OpenAPI.Clients.set_header_content_type(_ctx, (_mediaType === nothing) ? [] : [_mediaType])
return _ctx
end
@doc raw"""Params:
- workflow_id::Int64 (required)
- job_id::Int64
- run_id::Int64
- return_code::Int64
- status::JobStatus
- compute_node_id::Int64
- offset::Int64
- limit::Int64
- sort_by::String
- reverse_sort::Bool
- all_runs::Bool
Return: ListResultsResponse, OpenAPI.Clients.ApiResponse
"""
function list_results(_api::ResultsApi, workflow_id::Int64; job_id=nothing, run_id=nothing, return_code=nothing, status=nothing, compute_node_id=nothing, offset=nothing, limit=nothing, sort_by=nothing, reverse_sort=nothing, all_runs=nothing, _mediaType=nothing)
_ctx = _oacinternal_list_results(_api, workflow_id; job_id=job_id, run_id=run_id, return_code=return_code, status=status, compute_node_id=compute_node_id, offset=offset, limit=limit, sort_by=sort_by, reverse_sort=reverse_sort, all_runs=all_runs, _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx)
end
function list_results(_api::ResultsApi, response_stream::Channel, workflow_id::Int64; job_id=nothing, run_id=nothing, return_code=nothing, status=nothing, compute_node_id=nothing, offset=nothing, limit=nothing, sort_by=nothing, reverse_sort=nothing, all_runs=nothing, _mediaType=nothing)
_ctx = _oacinternal_list_results(_api, workflow_id; job_id=job_id, run_id=run_id, return_code=return_code, status=status, compute_node_id=compute_node_id, offset=offset, limit=limit, sort_by=sort_by, reverse_sort=reverse_sort, all_runs=all_runs, _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx, response_stream)
end
const _returntypes_update_result_ResultsApi = Dict{Regex,Type}(
Regex("^" * replace("200", "x"=>".") * "\$") => ResultModel,
Regex("^" * replace("403", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("404", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("500", "x"=>".") * "\$") => ErrorResponse,
)
function _oacinternal_update_result(_api::ResultsApi, id::Int64, result_model::ResultModel; _mediaType=nothing)
_ctx = OpenAPI.Clients.Ctx(_api.client, "PUT", _returntypes_update_result_ResultsApi, "/results/{id}", [], result_model)
OpenAPI.Clients.set_param(_ctx.path, "id", id) # type Int64
OpenAPI.Clients.set_header_accept(_ctx, ["application/json", ])
OpenAPI.Clients.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json", ] : [_mediaType])
return _ctx
end
@doc raw"""Params:
- id::Int64 (required)
- result_model::ResultModel (required)
Return: ResultModel, OpenAPI.Clients.ApiResponse
"""
function update_result(_api::ResultsApi, id::Int64, result_model::ResultModel; _mediaType=nothing)
_ctx = _oacinternal_update_result(_api, id, result_model; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx)
end
function update_result(_api::ResultsApi, response_stream::Channel, id::Int64, result_model::ResultModel; _mediaType=nothing)
_ctx = _oacinternal_update_result(_api, id, result_model; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx, response_stream)
end
export create_result
export delete_result
export delete_results
export get_result
export list_results
export update_result