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

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

"""

Creates or updates the specified virtual network rule. During update, the virtual network rule with the specified name will be replaced with this new virtual network rule.
Param: subscriptionId::String (required)
Param: resourceGroupName::String (required)
Param: accountName::String (required)
Param: virtualNetworkRuleName::String (required)
Param: parameters::CreateOrUpdateVirtualNetworkRuleParameters (required)
Param: api_version::String (required)
Return: VirtualNetworkRule
"""
function _swaggerinternal_virtualNetworkRulesCreateOrUpdate(_api::VirtualNetworkRulesApi, subscriptionId::String, resourceGroupName::String, accountName::String, virtualNetworkRuleName::String, parameters, api_version::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PUT", VirtualNetworkRule, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}", ["azure_auth"], parameters)
    Swagger.set_param(_ctx.path, "subscriptionId", subscriptionId)  # type String
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "accountName", accountName)  # type String
    Swagger.set_param(_ctx.path, "virtualNetworkRuleName", virtualNetworkRuleName)  # 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 virtualNetworkRulesCreateOrUpdate(_api::VirtualNetworkRulesApi, subscriptionId::String, resourceGroupName::String, accountName::String, virtualNetworkRuleName::String, parameters, api_version::String; _mediaType=nothing)
    _ctx = _swaggerinternal_virtualNetworkRulesCreateOrUpdate(_api, subscriptionId, resourceGroupName, accountName, virtualNetworkRuleName, parameters, api_version; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function virtualNetworkRulesCreateOrUpdate(_api::VirtualNetworkRulesApi, response_stream::Channel, subscriptionId::String, resourceGroupName::String, accountName::String, virtualNetworkRuleName::String, parameters, api_version::String; _mediaType=nothing)
    _ctx = _swaggerinternal_virtualNetworkRulesCreateOrUpdate(_api, subscriptionId, resourceGroupName, accountName, virtualNetworkRuleName, parameters, api_version; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Deletes the specified virtual network rule from the specified Data Lake Store account.
Param: subscriptionId::String (required)
Param: resourceGroupName::String (required)
Param: accountName::String (required)
Param: virtualNetworkRuleName::String (required)
Param: api_version::String (required)
Return: Nothing
"""
function _swaggerinternal_virtualNetworkRulesDelete(_api::VirtualNetworkRulesApi, subscriptionId::String, resourceGroupName::String, accountName::String, virtualNetworkRuleName::String, api_version::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "DELETE", Nothing, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}", ["azure_auth"])
    Swagger.set_param(_ctx.path, "subscriptionId", subscriptionId)  # type String
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "accountName", accountName)  # type String
    Swagger.set_param(_ctx.path, "virtualNetworkRuleName", virtualNetworkRuleName)  # 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 virtualNetworkRulesDelete(_api::VirtualNetworkRulesApi, subscriptionId::String, resourceGroupName::String, accountName::String, virtualNetworkRuleName::String, api_version::String; _mediaType=nothing)
    _ctx = _swaggerinternal_virtualNetworkRulesDelete(_api, subscriptionId, resourceGroupName, accountName, virtualNetworkRuleName, api_version; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function virtualNetworkRulesDelete(_api::VirtualNetworkRulesApi, response_stream::Channel, subscriptionId::String, resourceGroupName::String, accountName::String, virtualNetworkRuleName::String, api_version::String; _mediaType=nothing)
    _ctx = _swaggerinternal_virtualNetworkRulesDelete(_api, subscriptionId, resourceGroupName, accountName, virtualNetworkRuleName, api_version; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Gets the specified Data Lake Store virtual network rule.
Param: subscriptionId::String (required)
Param: resourceGroupName::String (required)
Param: accountName::String (required)
Param: virtualNetworkRuleName::String (required)
Param: api_version::String (required)
Return: VirtualNetworkRule
"""
function _swaggerinternal_virtualNetworkRulesGet(_api::VirtualNetworkRulesApi, subscriptionId::String, resourceGroupName::String, accountName::String, virtualNetworkRuleName::String, api_version::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", VirtualNetworkRule, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}", ["azure_auth"])
    Swagger.set_param(_ctx.path, "subscriptionId", subscriptionId)  # type String
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "accountName", accountName)  # type String
    Swagger.set_param(_ctx.path, "virtualNetworkRuleName", virtualNetworkRuleName)  # 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 virtualNetworkRulesGet(_api::VirtualNetworkRulesApi, subscriptionId::String, resourceGroupName::String, accountName::String, virtualNetworkRuleName::String, api_version::String; _mediaType=nothing)
    _ctx = _swaggerinternal_virtualNetworkRulesGet(_api, subscriptionId, resourceGroupName, accountName, virtualNetworkRuleName, api_version; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function virtualNetworkRulesGet(_api::VirtualNetworkRulesApi, response_stream::Channel, subscriptionId::String, resourceGroupName::String, accountName::String, virtualNetworkRuleName::String, api_version::String; _mediaType=nothing)
    _ctx = _swaggerinternal_virtualNetworkRulesGet(_api, subscriptionId, resourceGroupName, accountName, virtualNetworkRuleName, api_version; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Lists the Data Lake Store virtual network rules within the specified Data Lake Store account.
Param: subscriptionId::String (required)
Param: resourceGroupName::String (required)
Param: accountName::String (required)
Param: api_version::String (required)
Return: VirtualNetworkRuleListResult
"""
function _swaggerinternal_virtualNetworkRulesListByAccount(_api::VirtualNetworkRulesApi, subscriptionId::String, resourceGroupName::String, accountName::String, api_version::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", VirtualNetworkRuleListResult, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules", ["azure_auth"])
    Swagger.set_param(_ctx.path, "subscriptionId", subscriptionId)  # type String
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "accountName", accountName)  # 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 virtualNetworkRulesListByAccount(_api::VirtualNetworkRulesApi, subscriptionId::String, resourceGroupName::String, accountName::String, api_version::String; _mediaType=nothing)
    _ctx = _swaggerinternal_virtualNetworkRulesListByAccount(_api, subscriptionId, resourceGroupName, accountName, api_version; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function virtualNetworkRulesListByAccount(_api::VirtualNetworkRulesApi, response_stream::Channel, subscriptionId::String, resourceGroupName::String, accountName::String, api_version::String; _mediaType=nothing)
    _ctx = _swaggerinternal_virtualNetworkRulesListByAccount(_api, subscriptionId, resourceGroupName, accountName, api_version; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Updates the specified virtual network rule.
Param: subscriptionId::String (required)
Param: resourceGroupName::String (required)
Param: accountName::String (required)
Param: virtualNetworkRuleName::String (required)
Param: api_version::String (required)
Param: parameters::UpdateVirtualNetworkRuleParameters
Return: VirtualNetworkRule
"""
function _swaggerinternal_virtualNetworkRulesUpdate(_api::VirtualNetworkRulesApi, subscriptionId::String, resourceGroupName::String, accountName::String, virtualNetworkRuleName::String, api_version::String; parameters=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PATCH", VirtualNetworkRule, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/virtualNetworkRules/{virtualNetworkRuleName}", ["azure_auth"], parameters)
    Swagger.set_param(_ctx.path, "subscriptionId", subscriptionId)  # type String
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "accountName", accountName)  # type String
    Swagger.set_param(_ctx.path, "virtualNetworkRuleName", virtualNetworkRuleName)  # 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 virtualNetworkRulesUpdate(_api::VirtualNetworkRulesApi, subscriptionId::String, resourceGroupName::String, accountName::String, virtualNetworkRuleName::String, api_version::String; parameters=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_virtualNetworkRulesUpdate(_api, subscriptionId, resourceGroupName, accountName, virtualNetworkRuleName, api_version; parameters=parameters, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function virtualNetworkRulesUpdate(_api::VirtualNetworkRulesApi, response_stream::Channel, subscriptionId::String, resourceGroupName::String, accountName::String, virtualNetworkRuleName::String, api_version::String; parameters=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_virtualNetworkRulesUpdate(_api, subscriptionId, resourceGroupName, accountName, virtualNetworkRuleName, api_version; parameters=parameters, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

export virtualNetworkRulesCreateOrUpdate, virtualNetworkRulesDelete, virtualNetworkRulesGet, virtualNetworkRulesListByAccount, virtualNetworkRulesUpdate
