# This file was generated by the Julia OpenAPI Code Generator
# Do not modify this file directly. Modify the OpenAPI specification instead.
struct FilesApi <: OpenAPI.APIClientImpl
client::OpenAPI.Clients.Client
end
"""
The default API base path for APIs in `FilesApi`.
This can be used to construct the `OpenAPI.Clients.Client` instance.
"""
basepath(::Type{ FilesApi }) = "http://localhost/torc-service/v1"
const _returntypes_create_file_FilesApi = Dict{Regex,Type}(
Regex("^" * replace("200", "x"=>".") * "\$") => FileModel,
Regex("^" * replace("403", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("404", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("500", "x"=>".") * "\$") => ErrorResponse,
)
function _oacinternal_create_file(_api::FilesApi, file_model::FileModel; _mediaType=nothing)
_ctx = OpenAPI.Clients.Ctx(_api.client, "POST", _returntypes_create_file_FilesApi, "/files", [], file_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:
- file_model::FileModel (required)
Return: FileModel, OpenAPI.Clients.ApiResponse
"""
function create_file(_api::FilesApi, file_model::FileModel; _mediaType=nothing)
_ctx = _oacinternal_create_file(_api, file_model; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx)
end
function create_file(_api::FilesApi, response_stream::Channel, file_model::FileModel; _mediaType=nothing)
_ctx = _oacinternal_create_file(_api, file_model; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx, response_stream)
end
const _returntypes_delete_file_FilesApi = Dict{Regex,Type}(
Regex("^" * replace("200", "x"=>".") * "\$") => FileModel,
Regex("^" * replace("403", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("404", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("500", "x"=>".") * "\$") => ErrorResponse,
)
function _oacinternal_delete_file(_api::FilesApi, id::Int64; _mediaType=nothing)
_ctx = OpenAPI.Clients.Ctx(_api.client, "DELETE", _returntypes_delete_file_FilesApi, "/files/{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: FileModel, OpenAPI.Clients.ApiResponse
"""
function delete_file(_api::FilesApi, id::Int64; _mediaType=nothing)
_ctx = _oacinternal_delete_file(_api, id; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx)
end
function delete_file(_api::FilesApi, response_stream::Channel, id::Int64; _mediaType=nothing)
_ctx = _oacinternal_delete_file(_api, id; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx, response_stream)
end
const _returntypes_delete_files_FilesApi = Dict{Regex,Type}(
Regex("^" * replace("200", "x"=>".") * "\$") => DeleteCountResponse,
Regex("^" * replace("403", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("404", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("500", "x"=>".") * "\$") => ErrorResponse,
)
function _oacinternal_delete_files(_api::FilesApi, workflow_id::Int64; _mediaType=nothing)
_ctx = OpenAPI.Clients.Ctx(_api.client, "DELETE", _returntypes_delete_files_FilesApi, "/files", [])
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: DeleteCountResponse, OpenAPI.Clients.ApiResponse
"""
function delete_files(_api::FilesApi, workflow_id::Int64; _mediaType=nothing)
_ctx = _oacinternal_delete_files(_api, workflow_id; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx)
end
function delete_files(_api::FilesApi, response_stream::Channel, workflow_id::Int64; _mediaType=nothing)
_ctx = _oacinternal_delete_files(_api, workflow_id; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx, response_stream)
end
const _returntypes_get_file_FilesApi = Dict{Regex,Type}(
Regex("^" * replace("200", "x"=>".") * "\$") => FileModel,
Regex("^" * replace("403", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("404", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("500", "x"=>".") * "\$") => ErrorResponse,
)
function _oacinternal_get_file(_api::FilesApi, id::Int64; _mediaType=nothing)
_ctx = OpenAPI.Clients.Ctx(_api.client, "GET", _returntypes_get_file_FilesApi, "/files/{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: FileModel, OpenAPI.Clients.ApiResponse
"""
function get_file(_api::FilesApi, id::Int64; _mediaType=nothing)
_ctx = _oacinternal_get_file(_api, id; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx)
end
function get_file(_api::FilesApi, response_stream::Channel, id::Int64; _mediaType=nothing)
_ctx = _oacinternal_get_file(_api, id; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx, response_stream)
end
const _returntypes_list_files_FilesApi = Dict{Regex,Type}(
Regex("^" * replace("200", "x"=>".") * "\$") => ListFilesResponse,
Regex("^" * replace("403", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("404", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("500", "x"=>".") * "\$") => ErrorResponse,
)
function _oacinternal_list_files(_api::FilesApi, workflow_id::Int64; produced_by_job_id=nothing, offset=nothing, limit=nothing, sort_by=nothing, reverse_sort=nothing, name=nothing, path=nothing, is_output=nothing, _mediaType=nothing)
_ctx = OpenAPI.Clients.Ctx(_api.client, "GET", _returntypes_list_files_FilesApi, "/files", [])
OpenAPI.Clients.set_param(_ctx.query, "workflow_id", workflow_id; style="form", is_explode=true) # type Int64
OpenAPI.Clients.set_param(_ctx.query, "produced_by_job_id", produced_by_job_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, "name", name; style="form", is_explode=true) # type String
OpenAPI.Clients.set_param(_ctx.query, "path", path; style="form", is_explode=true) # type String
OpenAPI.Clients.set_param(_ctx.query, "is_output", is_output; 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)
- produced_by_job_id::Int64
- offset::Int64
- limit::Int64
- sort_by::String
- reverse_sort::Bool
- name::String
- path::String
- is_output::Bool
Return: ListFilesResponse, OpenAPI.Clients.ApiResponse
"""
function list_files(_api::FilesApi, workflow_id::Int64; produced_by_job_id=nothing, offset=nothing, limit=nothing, sort_by=nothing, reverse_sort=nothing, name=nothing, path=nothing, is_output=nothing, _mediaType=nothing)
_ctx = _oacinternal_list_files(_api, workflow_id; produced_by_job_id=produced_by_job_id, offset=offset, limit=limit, sort_by=sort_by, reverse_sort=reverse_sort, name=name, path=path, is_output=is_output, _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx)
end
function list_files(_api::FilesApi, response_stream::Channel, workflow_id::Int64; produced_by_job_id=nothing, offset=nothing, limit=nothing, sort_by=nothing, reverse_sort=nothing, name=nothing, path=nothing, is_output=nothing, _mediaType=nothing)
_ctx = _oacinternal_list_files(_api, workflow_id; produced_by_job_id=produced_by_job_id, offset=offset, limit=limit, sort_by=sort_by, reverse_sort=reverse_sort, name=name, path=path, is_output=is_output, _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx, response_stream)
end
const _returntypes_update_file_FilesApi = Dict{Regex,Type}(
Regex("^" * replace("200", "x"=>".") * "\$") => FileModel,
Regex("^" * replace("403", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("404", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("500", "x"=>".") * "\$") => ErrorResponse,
)
function _oacinternal_update_file(_api::FilesApi, id::Int64, file_model::FileModel; _mediaType=nothing)
_ctx = OpenAPI.Clients.Ctx(_api.client, "PUT", _returntypes_update_file_FilesApi, "/files/{id}", [], file_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)
- file_model::FileModel (required)
Return: FileModel, OpenAPI.Clients.ApiResponse
"""
function update_file(_api::FilesApi, id::Int64, file_model::FileModel; _mediaType=nothing)
_ctx = _oacinternal_update_file(_api, id, file_model; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx)
end
function update_file(_api::FilesApi, response_stream::Channel, id::Int64, file_model::FileModel; _mediaType=nothing)
_ctx = _oacinternal_update_file(_api, id, file_model; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx, response_stream)
end
export create_file
export delete_file
export delete_files
export get_file
export list_files
export update_file