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

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

"""

Create or update a connection monitor.
Param: resourceGroupName::String (required)
Param: networkWatcherName::String (required)
Param: connectionMonitorName::String (required)
Param: parameters::ConnectionMonitor (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: ConnectionMonitorResult
"""
function _swaggerinternal_connectionMonitorsCreateOrUpdate(_api::ConnectionMonitorsApi, resourceGroupName::String, networkWatcherName::String, connectionMonitorName::String, parameters, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PUT", ConnectionMonitorResult, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", ["azure_auth"], parameters)
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "networkWatcherName", networkWatcherName)  # type String
    Swagger.set_param(_ctx.path, "connectionMonitorName", connectionMonitorName)  # type String
    Swagger.set_param(_ctx.path, "subscriptionId", subscriptionId)  # type String
    Swagger.set_param(_ctx.query, "api-version", api_version)  # type String
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    return _ctx
end

function connectionMonitorsCreateOrUpdate(_api::ConnectionMonitorsApi, resourceGroupName::String, networkWatcherName::String, connectionMonitorName::String, parameters, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_connectionMonitorsCreateOrUpdate(_api, resourceGroupName, networkWatcherName, connectionMonitorName, parameters, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function connectionMonitorsCreateOrUpdate(_api::ConnectionMonitorsApi, response_stream::Channel, resourceGroupName::String, networkWatcherName::String, connectionMonitorName::String, parameters, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_connectionMonitorsCreateOrUpdate(_api, resourceGroupName, networkWatcherName, connectionMonitorName, parameters, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Deletes the specified connection monitor.
Param: resourceGroupName::String (required)
Param: networkWatcherName::String (required)
Param: connectionMonitorName::String (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: Nothing
"""
function _swaggerinternal_connectionMonitorsDelete(_api::ConnectionMonitorsApi, resourceGroupName::String, networkWatcherName::String, connectionMonitorName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "DELETE", Nothing, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", ["azure_auth"])
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "networkWatcherName", networkWatcherName)  # type String
    Swagger.set_param(_ctx.path, "connectionMonitorName", connectionMonitorName)  # type String
    Swagger.set_param(_ctx.path, "subscriptionId", subscriptionId)  # type String
    Swagger.set_param(_ctx.query, "api-version", api_version)  # type String
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    return _ctx
end

function connectionMonitorsDelete(_api::ConnectionMonitorsApi, resourceGroupName::String, networkWatcherName::String, connectionMonitorName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_connectionMonitorsDelete(_api, resourceGroupName, networkWatcherName, connectionMonitorName, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function connectionMonitorsDelete(_api::ConnectionMonitorsApi, response_stream::Channel, resourceGroupName::String, networkWatcherName::String, connectionMonitorName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_connectionMonitorsDelete(_api, resourceGroupName, networkWatcherName, connectionMonitorName, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Gets a connection monitor by name.
Param: resourceGroupName::String (required)
Param: networkWatcherName::String (required)
Param: connectionMonitorName::String (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: ConnectionMonitorResult
"""
function _swaggerinternal_connectionMonitorsGet(_api::ConnectionMonitorsApi, resourceGroupName::String, networkWatcherName::String, connectionMonitorName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", ConnectionMonitorResult, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", ["azure_auth"])
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "networkWatcherName", networkWatcherName)  # type String
    Swagger.set_param(_ctx.path, "connectionMonitorName", connectionMonitorName)  # type String
    Swagger.set_param(_ctx.path, "subscriptionId", subscriptionId)  # type String
    Swagger.set_param(_ctx.query, "api-version", api_version)  # type String
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    return _ctx
end

function connectionMonitorsGet(_api::ConnectionMonitorsApi, resourceGroupName::String, networkWatcherName::String, connectionMonitorName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_connectionMonitorsGet(_api, resourceGroupName, networkWatcherName, connectionMonitorName, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function connectionMonitorsGet(_api::ConnectionMonitorsApi, response_stream::Channel, resourceGroupName::String, networkWatcherName::String, connectionMonitorName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_connectionMonitorsGet(_api, resourceGroupName, networkWatcherName, connectionMonitorName, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Lists all connection monitors for the specified Network Watcher.
Param: resourceGroupName::String (required)
Param: networkWatcherName::String (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: ConnectionMonitorListResult
"""
function _swaggerinternal_connectionMonitorsList(_api::ConnectionMonitorsApi, resourceGroupName::String, networkWatcherName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", ConnectionMonitorListResult, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors", ["azure_auth"])
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "networkWatcherName", networkWatcherName)  # type String
    Swagger.set_param(_ctx.path, "subscriptionId", subscriptionId)  # type String
    Swagger.set_param(_ctx.query, "api-version", api_version)  # type String
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    return _ctx
end

function connectionMonitorsList(_api::ConnectionMonitorsApi, resourceGroupName::String, networkWatcherName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_connectionMonitorsList(_api, resourceGroupName, networkWatcherName, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function connectionMonitorsList(_api::ConnectionMonitorsApi, response_stream::Channel, resourceGroupName::String, networkWatcherName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_connectionMonitorsList(_api, resourceGroupName, networkWatcherName, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Query a snapshot of the most recent connection states.
Param: resourceGroupName::String (required)
Param: networkWatcherName::String (required)
Param: connectionMonitorName::String (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: ConnectionMonitorQueryResult
"""
function _swaggerinternal_connectionMonitorsQuery(_api::ConnectionMonitorsApi, resourceGroupName::String, networkWatcherName::String, connectionMonitorName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", ConnectionMonitorQueryResult, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/query", ["azure_auth"])
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "networkWatcherName", networkWatcherName)  # type String
    Swagger.set_param(_ctx.path, "connectionMonitorName", connectionMonitorName)  # type String
    Swagger.set_param(_ctx.path, "subscriptionId", subscriptionId)  # type String
    Swagger.set_param(_ctx.query, "api-version", api_version)  # type String
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    return _ctx
end

function connectionMonitorsQuery(_api::ConnectionMonitorsApi, resourceGroupName::String, networkWatcherName::String, connectionMonitorName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_connectionMonitorsQuery(_api, resourceGroupName, networkWatcherName, connectionMonitorName, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function connectionMonitorsQuery(_api::ConnectionMonitorsApi, response_stream::Channel, resourceGroupName::String, networkWatcherName::String, connectionMonitorName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_connectionMonitorsQuery(_api, resourceGroupName, networkWatcherName, connectionMonitorName, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Starts the specified connection monitor.
Param: resourceGroupName::String (required)
Param: networkWatcherName::String (required)
Param: connectionMonitorName::String (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: Nothing
"""
function _swaggerinternal_connectionMonitorsStart(_api::ConnectionMonitorsApi, resourceGroupName::String, networkWatcherName::String, connectionMonitorName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", Nothing, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/start", ["azure_auth"])
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "networkWatcherName", networkWatcherName)  # type String
    Swagger.set_param(_ctx.path, "connectionMonitorName", connectionMonitorName)  # type String
    Swagger.set_param(_ctx.path, "subscriptionId", subscriptionId)  # type String
    Swagger.set_param(_ctx.query, "api-version", api_version)  # type String
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    return _ctx
end

function connectionMonitorsStart(_api::ConnectionMonitorsApi, resourceGroupName::String, networkWatcherName::String, connectionMonitorName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_connectionMonitorsStart(_api, resourceGroupName, networkWatcherName, connectionMonitorName, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function connectionMonitorsStart(_api::ConnectionMonitorsApi, response_stream::Channel, resourceGroupName::String, networkWatcherName::String, connectionMonitorName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_connectionMonitorsStart(_api, resourceGroupName, networkWatcherName, connectionMonitorName, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Stops the specified connection monitor.
Param: resourceGroupName::String (required)
Param: networkWatcherName::String (required)
Param: connectionMonitorName::String (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: Nothing
"""
function _swaggerinternal_connectionMonitorsStop(_api::ConnectionMonitorsApi, resourceGroupName::String, networkWatcherName::String, connectionMonitorName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", Nothing, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop", ["azure_auth"])
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "networkWatcherName", networkWatcherName)  # type String
    Swagger.set_param(_ctx.path, "connectionMonitorName", connectionMonitorName)  # type String
    Swagger.set_param(_ctx.path, "subscriptionId", subscriptionId)  # type String
    Swagger.set_param(_ctx.query, "api-version", api_version)  # type String
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    return _ctx
end

function connectionMonitorsStop(_api::ConnectionMonitorsApi, resourceGroupName::String, networkWatcherName::String, connectionMonitorName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_connectionMonitorsStop(_api, resourceGroupName, networkWatcherName, connectionMonitorName, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function connectionMonitorsStop(_api::ConnectionMonitorsApi, response_stream::Channel, resourceGroupName::String, networkWatcherName::String, connectionMonitorName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_connectionMonitorsStop(_api, resourceGroupName, networkWatcherName, connectionMonitorName, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Update tags of the specified connection monitor.
Param: resourceGroupName::String (required)
Param: networkWatcherName::String (required)
Param: connectionMonitorName::String (required)
Param: parameters::TagsObject (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: ConnectionMonitorResult
"""
function _swaggerinternal_connectionMonitorsUpdateTags(_api::ConnectionMonitorsApi, resourceGroupName::String, networkWatcherName::String, connectionMonitorName::String, parameters, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PATCH", ConnectionMonitorResult, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", ["azure_auth"], parameters)
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "networkWatcherName", networkWatcherName)  # type String
    Swagger.set_param(_ctx.path, "connectionMonitorName", connectionMonitorName)  # type String
    Swagger.set_param(_ctx.path, "subscriptionId", subscriptionId)  # type String
    Swagger.set_param(_ctx.query, "api-version", api_version)  # type String
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    return _ctx
end

function connectionMonitorsUpdateTags(_api::ConnectionMonitorsApi, resourceGroupName::String, networkWatcherName::String, connectionMonitorName::String, parameters, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_connectionMonitorsUpdateTags(_api, resourceGroupName, networkWatcherName, connectionMonitorName, parameters, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function connectionMonitorsUpdateTags(_api::ConnectionMonitorsApi, response_stream::Channel, resourceGroupName::String, networkWatcherName::String, connectionMonitorName::String, parameters, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_connectionMonitorsUpdateTags(_api, resourceGroupName, networkWatcherName, connectionMonitorName, parameters, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

export connectionMonitorsCreateOrUpdate, connectionMonitorsDelete, connectionMonitorsGet, connectionMonitorsList, connectionMonitorsQuery, connectionMonitorsStart, connectionMonitorsStop, connectionMonitorsUpdateTags
