# This file was generated by the Julia OpenAPI Code Generator
# Do not modify this file directly. Modify the OpenAPI specification instead.
struct EventsApi <: OpenAPI.APIClientImpl
client::OpenAPI.Clients.Client
end
"""
The default API base path for APIs in `EventsApi`.
This can be used to construct the `OpenAPI.Clients.Client` instance.
"""
basepath(::Type{ EventsApi }) = "http://localhost/torc-service/v1"
const _returntypes_create_event_EventsApi = Dict{Regex,Type}(
Regex("^" * replace("200", "x"=>".") * "\$") => EventModel,
Regex("^" * replace("403", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("404", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("500", "x"=>".") * "\$") => ErrorResponse,
)
function _oacinternal_create_event(_api::EventsApi, event_model::EventModel; _mediaType=nothing)
_ctx = OpenAPI.Clients.Ctx(_api.client, "POST", _returntypes_create_event_EventsApi, "/events", [], event_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:
- event_model::EventModel (required)
Return: EventModel, OpenAPI.Clients.ApiResponse
"""
function create_event(_api::EventsApi, event_model::EventModel; _mediaType=nothing)
_ctx = _oacinternal_create_event(_api, event_model; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx)
end
function create_event(_api::EventsApi, response_stream::Channel, event_model::EventModel; _mediaType=nothing)
_ctx = _oacinternal_create_event(_api, event_model; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx, response_stream)
end
const _returntypes_delete_event_EventsApi = Dict{Regex,Type}(
Regex("^" * replace("200", "x"=>".") * "\$") => EventModel,
Regex("^" * replace("403", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("404", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("500", "x"=>".") * "\$") => ErrorResponse,
)
function _oacinternal_delete_event(_api::EventsApi, id::Int64; _mediaType=nothing)
_ctx = OpenAPI.Clients.Ctx(_api.client, "DELETE", _returntypes_delete_event_EventsApi, "/events/{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: EventModel, OpenAPI.Clients.ApiResponse
"""
function delete_event(_api::EventsApi, id::Int64; _mediaType=nothing)
_ctx = _oacinternal_delete_event(_api, id; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx)
end
function delete_event(_api::EventsApi, response_stream::Channel, id::Int64; _mediaType=nothing)
_ctx = _oacinternal_delete_event(_api, id; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx, response_stream)
end
const _returntypes_delete_events_EventsApi = 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_events(_api::EventsApi, workflow_id::Int64; _mediaType=nothing)
_ctx = OpenAPI.Clients.Ctx(_api.client, "DELETE", _returntypes_delete_events_EventsApi, "/events", [])
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_events(_api::EventsApi, workflow_id::Int64; _mediaType=nothing)
_ctx = _oacinternal_delete_events(_api, workflow_id; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx)
end
function delete_events(_api::EventsApi, response_stream::Channel, workflow_id::Int64; _mediaType=nothing)
_ctx = _oacinternal_delete_events(_api, workflow_id; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx, response_stream)
end
const _returntypes_get_event_EventsApi = Dict{Regex,Type}(
Regex("^" * replace("200", "x"=>".") * "\$") => EventModel,
Regex("^" * replace("403", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("404", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("500", "x"=>".") * "\$") => ErrorResponse,
)
function _oacinternal_get_event(_api::EventsApi, id::Int64; _mediaType=nothing)
_ctx = OpenAPI.Clients.Ctx(_api.client, "GET", _returntypes_get_event_EventsApi, "/events/{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: EventModel, OpenAPI.Clients.ApiResponse
"""
function get_event(_api::EventsApi, id::Int64; _mediaType=nothing)
_ctx = _oacinternal_get_event(_api, id; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx)
end
function get_event(_api::EventsApi, response_stream::Channel, id::Int64; _mediaType=nothing)
_ctx = _oacinternal_get_event(_api, id; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx, response_stream)
end
const _returntypes_list_events_EventsApi = Dict{Regex,Type}(
Regex("^" * replace("200", "x"=>".") * "\$") => ListEventsResponse,
Regex("^" * replace("403", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("404", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("500", "x"=>".") * "\$") => ErrorResponse,
)
function _oacinternal_list_events(_api::EventsApi, workflow_id::Int64; offset=nothing, limit=nothing, sort_by=nothing, reverse_sort=nothing, category=nothing, after_timestamp=nothing, _mediaType=nothing)
_ctx = OpenAPI.Clients.Ctx(_api.client, "GET", _returntypes_list_events_EventsApi, "/events", [])
OpenAPI.Clients.set_param(_ctx.query, "workflow_id", workflow_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, "category", category; style="form", is_explode=true) # type String
OpenAPI.Clients.set_param(_ctx.query, "after_timestamp", after_timestamp; 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)
- offset::Int64
- limit::Int64
- sort_by::String
- reverse_sort::Bool
- category::String
- after_timestamp::Int64
Return: ListEventsResponse, OpenAPI.Clients.ApiResponse
"""
function list_events(_api::EventsApi, workflow_id::Int64; offset=nothing, limit=nothing, sort_by=nothing, reverse_sort=nothing, category=nothing, after_timestamp=nothing, _mediaType=nothing)
_ctx = _oacinternal_list_events(_api, workflow_id; offset=offset, limit=limit, sort_by=sort_by, reverse_sort=reverse_sort, category=category, after_timestamp=after_timestamp, _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx)
end
function list_events(_api::EventsApi, response_stream::Channel, workflow_id::Int64; offset=nothing, limit=nothing, sort_by=nothing, reverse_sort=nothing, category=nothing, after_timestamp=nothing, _mediaType=nothing)
_ctx = _oacinternal_list_events(_api, workflow_id; offset=offset, limit=limit, sort_by=sort_by, reverse_sort=reverse_sort, category=category, after_timestamp=after_timestamp, _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx, response_stream)
end
const _returntypes_update_event_EventsApi = Dict{Regex,Type}(
Regex("^" * replace("200", "x"=>".") * "\$") => EventModel,
Regex("^" * replace("403", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("404", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("500", "x"=>".") * "\$") => ErrorResponse,
)
function _oacinternal_update_event(_api::EventsApi, id::Int64, body::Any; _mediaType=nothing)
_ctx = OpenAPI.Clients.Ctx(_api.client, "PUT", _returntypes_update_event_EventsApi, "/events/{id}", [], body)
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)
- body::Any (required)
Return: EventModel, OpenAPI.Clients.ApiResponse
"""
function update_event(_api::EventsApi, id::Int64, body::Any; _mediaType=nothing)
_ctx = _oacinternal_update_event(_api, id, body; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx)
end
function update_event(_api::EventsApi, response_stream::Channel, id::Int64, body::Any; _mediaType=nothing)
_ctx = _oacinternal_update_event(_api, id, body; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx, response_stream)
end
export create_event
export delete_event
export delete_events
export get_event
export list_events
export update_event