# This file was generated by the Julia OpenAPI Code Generator
# Do not modify this file directly. Modify the OpenAPI specification instead.
struct SystemApi <: OpenAPI.APIClientImpl
client::OpenAPI.Clients.Client
end
"""
The default API base path for APIs in `SystemApi`.
This can be used to construct the `OpenAPI.Clients.Client` instance.
"""
basepath(::Type{ SystemApi }) = "http://localhost/torc-service/v1"
const _returntypes_get_version_SystemApi = Dict{Regex,Type}(
Regex("^" * replace("200", "x"=>".") * "\$") => VersionResponse,
)
function _oacinternal_get_version(_api::SystemApi; _mediaType=nothing)
_ctx = OpenAPI.Clients.Ctx(_api.client, "GET", _returntypes_get_version_SystemApi, "/version", [])
OpenAPI.Clients.set_header_accept(_ctx, ["application/json", ])
OpenAPI.Clients.set_header_content_type(_ctx, (_mediaType === nothing) ? [] : [_mediaType])
return _ctx
end
@doc raw"""Params:
Return: VersionResponse, OpenAPI.Clients.ApiResponse
"""
function get_version(_api::SystemApi; _mediaType=nothing)
_ctx = _oacinternal_get_version(_api; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx)
end
function get_version(_api::SystemApi, response_stream::Channel; _mediaType=nothing)
_ctx = _oacinternal_get_version(_api; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx, response_stream)
end
const _returntypes_ping_SystemApi = Dict{Regex,Type}(
Regex("^" * replace("200", "x"=>".") * "\$") => PingResponse,
)
function _oacinternal_ping(_api::SystemApi; _mediaType=nothing)
_ctx = OpenAPI.Clients.Ctx(_api.client, "GET", _returntypes_ping_SystemApi, "/ping", [])
OpenAPI.Clients.set_header_accept(_ctx, ["application/json", ])
OpenAPI.Clients.set_header_content_type(_ctx, (_mediaType === nothing) ? [] : [_mediaType])
return _ctx
end
@doc raw"""Params:
Return: PingResponse, OpenAPI.Clients.ApiResponse
"""
function ping(_api::SystemApi; _mediaType=nothing)
_ctx = _oacinternal_ping(_api; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx)
end
function ping(_api::SystemApi, response_stream::Channel; _mediaType=nothing)
_ctx = _oacinternal_ping(_api; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx, response_stream)
end
export get_version
export ping