# This file was generated by the Julia Swagger Code Generator
# Do not modify this file directly. Modify the swagger specification instead.

struct DefaultApi <: SwaggerApi
    client::Swagger.Client
end

"""
Creates a synchronous action.

Param: info::InstanceActionInfo (required)
Return: Nothing
"""
function createSyncAction(_api::DefaultApi, info; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PUT", Nothing, "/actions", [], info)
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

"""
Returns general information about an instance.

Return: InstanceInfo
"""
function describeInstance(_api::DefaultApi; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", InstanceInfo, "/", [])
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

"""
Gets the machine configuration of the VM.
Gets the machine configuration of the VM. When called before the PUT operation, it will return the default values for the vCPU count (=1), memory size (=128 MiB). By default Hyperthreading is disabled and there is no CPU Template.
Return: MachineConfiguration
"""
function machineConfigGet(_api::DefaultApi; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", MachineConfiguration, "/machine-config", [])
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

"""
Get the MMDS data store.

Return: Any
"""
function mmdsGet(_api::DefaultApi; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", Any, "/mmds", [])
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

"""
Updates the MMDS data store.

Param: body::Any
Return: Nothing
"""
function mmdsPatch(_api::DefaultApi; body=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PATCH", Nothing, "/mmds", [], body)
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

"""
Creates a MMDS (Microvm Metadata Service) data store.

Param: body::Any
Return: Nothing
"""
function mmdsPut(_api::DefaultApi; body=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PUT", Nothing, "/mmds", [], body)
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

"""
Updates the properties of a drive.
Updates the properties of the drive with the ID specified by drive_id path parameter. Will fail if update is not possible.
Param: drive_id::String (required)
Param: body::PartialDrive (required)
Return: Nothing
"""
function patchGuestDriveByID(_api::DefaultApi, drive_id::String, body; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PATCH", Nothing, "/drives/{drive_id}", [], body)
    Swagger.set_param(_ctx.path, "drive_id", drive_id)  # type String
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

"""
Creates or updates the boot source.
Creates new boot source if one does not already exist, otherwise updates it. Will fail if update is not possible. Note that the only currently supported boot source is LocalImage.
Param: body::BootSource (required)
Return: Nothing
"""
function putGuestBootSource(_api::DefaultApi, body; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PUT", Nothing, "/boot-source", [], body)
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

"""
Creates or updates a drive.
Creates new drive with ID specified by drive_id path parameter. If a drive with the specified ID already exists, updates its state based on new input. Will fail if update is not possible.
Param: drive_id::String (required)
Param: body::Drive (required)
Return: Nothing
"""
function putGuestDriveByID(_api::DefaultApi, drive_id::String, body; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PUT", Nothing, "/drives/{drive_id}", [], body)
    Swagger.set_param(_ctx.path, "drive_id", drive_id)  # type String
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

"""
Creates a network interface.
Creates new network interface with ID specified by iface_id path parameter. Updating existing interfaces is currently not allowed.
Param: iface_id::String (required)
Param: body::NetworkInterface (required)
Return: Nothing
"""
function putGuestNetworkInterfaceByID(_api::DefaultApi, iface_id::String, body; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PUT", Nothing, "/network-interfaces/{iface_id}", [], body)
    Swagger.set_param(_ctx.path, "iface_id", iface_id)  # type String
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

"""
Initializes the logger by specifying two named pipes (i.e. for the logs and metrics output).

Param: body::Logger (required)
Return: Nothing
"""
function putLogger(_api::DefaultApi, body; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PUT", Nothing, "/logger", [], body)
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

"""
Updates the Machine Configuration of the VM.
Updates the Virtual Machine Configuration with the specified input. Firecracker starts with default values for vCPU count (=1) and memory size (=128 MiB). With Hyperthreading enabled, the vCPU count is restricted to be 1 or an even number, otherwise there are no restrictions regarding the vCPU count. If any of the parameters has an incorrect value, the whole update fails.
Param: body::MachineConfiguration
Return: Nothing
"""
function putMachineConfiguration(_api::DefaultApi; body=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PUT", Nothing, "/machine-config", [], body)
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

export createSyncAction, describeInstance, machineConfigGet, mmdsGet, mmdsPatch, mmdsPut, patchGuestDriveByID, putGuestBootSource, putGuestDriveByID, putGuestNetworkInterfaceByID, putLogger, putMachineConfiguration
