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

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

"""

Checks whether the specified account name is available or taken.
Param: subscriptionId::String (required)
Param: location::String (required)
Param: parameters::CheckNameAvailabilityParameters (required)
Param: api_version::String (required)
Return: NameAvailabilityInformation
"""
function _swaggerinternal_accountsCheckNameAvailability(_api::AccountsApi, subscriptionId::String, location::String, parameters, api_version::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", NameAvailabilityInformation, "/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeStore/locations/{location}/checkNameAvailability", ["azure_auth"], parameters)
    Swagger.set_param(_ctx.path, "subscriptionId", subscriptionId)  # type String
    Swagger.set_param(_ctx.path, "location", location)  # 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 accountsCheckNameAvailability(_api::AccountsApi, subscriptionId::String, location::String, parameters, api_version::String; _mediaType=nothing)
    _ctx = _swaggerinternal_accountsCheckNameAvailability(_api, subscriptionId, location, parameters, api_version; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function accountsCheckNameAvailability(_api::AccountsApi, response_stream::Channel, subscriptionId::String, location::String, parameters, api_version::String; _mediaType=nothing)
    _ctx = _swaggerinternal_accountsCheckNameAvailability(_api, subscriptionId, location, parameters, api_version; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Creates the specified Data Lake Store account.
Param: subscriptionId::String (required)
Param: resourceGroupName::String (required)
Param: accountName::String (required)
Param: parameters::CreateDataLakeStoreAccountParameters (required)
Param: api_version::String (required)
Return: DataLakeStoreAccount
"""
function _swaggerinternal_accountsCreate(_api::AccountsApi, subscriptionId::String, resourceGroupName::String, accountName::String, parameters, api_version::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PUT", DataLakeStoreAccount, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}", ["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.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 accountsCreate(_api::AccountsApi, subscriptionId::String, resourceGroupName::String, accountName::String, parameters, api_version::String; _mediaType=nothing)
    _ctx = _swaggerinternal_accountsCreate(_api, subscriptionId, resourceGroupName, accountName, parameters, api_version; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function accountsCreate(_api::AccountsApi, response_stream::Channel, subscriptionId::String, resourceGroupName::String, accountName::String, parameters, api_version::String; _mediaType=nothing)
    _ctx = _swaggerinternal_accountsCreate(_api, subscriptionId, resourceGroupName, accountName, parameters, api_version; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Deletes the specified Data Lake Store account.
Param: subscriptionId::String (required)
Param: resourceGroupName::String (required)
Param: accountName::String (required)
Param: api_version::String (required)
Return: Nothing
"""
function _swaggerinternal_accountsDelete(_api::AccountsApi, subscriptionId::String, resourceGroupName::String, accountName::String, api_version::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "DELETE", Nothing, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}", ["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 accountsDelete(_api::AccountsApi, subscriptionId::String, resourceGroupName::String, accountName::String, api_version::String; _mediaType=nothing)
    _ctx = _swaggerinternal_accountsDelete(_api, subscriptionId, resourceGroupName, accountName, api_version; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function accountsDelete(_api::AccountsApi, response_stream::Channel, subscriptionId::String, resourceGroupName::String, accountName::String, api_version::String; _mediaType=nothing)
    _ctx = _swaggerinternal_accountsDelete(_api, subscriptionId, resourceGroupName, accountName, api_version; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Attempts to enable a user managed Key Vault for encryption of the specified Data Lake Store account.
Param: subscriptionId::String (required)
Param: resourceGroupName::String (required)
Param: accountName::String (required)
Param: api_version::String (required)
Return: Nothing
"""
function _swaggerinternal_accountsEnableKeyVault(_api::AccountsApi, subscriptionId::String, resourceGroupName::String, accountName::String, api_version::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", Nothing, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/enableKeyVault", ["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 accountsEnableKeyVault(_api::AccountsApi, subscriptionId::String, resourceGroupName::String, accountName::String, api_version::String; _mediaType=nothing)
    _ctx = _swaggerinternal_accountsEnableKeyVault(_api, subscriptionId, resourceGroupName, accountName, api_version; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function accountsEnableKeyVault(_api::AccountsApi, response_stream::Channel, subscriptionId::String, resourceGroupName::String, accountName::String, api_version::String; _mediaType=nothing)
    _ctx = _swaggerinternal_accountsEnableKeyVault(_api, subscriptionId, resourceGroupName, accountName, api_version; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Gets the specified Data Lake Store account.
Param: subscriptionId::String (required)
Param: resourceGroupName::String (required)
Param: accountName::String (required)
Param: api_version::String (required)
Return: DataLakeStoreAccount
"""
function _swaggerinternal_accountsGet(_api::AccountsApi, subscriptionId::String, resourceGroupName::String, accountName::String, api_version::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", DataLakeStoreAccount, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}", ["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 accountsGet(_api::AccountsApi, subscriptionId::String, resourceGroupName::String, accountName::String, api_version::String; _mediaType=nothing)
    _ctx = _swaggerinternal_accountsGet(_api, subscriptionId, resourceGroupName, accountName, api_version; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function accountsGet(_api::AccountsApi, response_stream::Channel, subscriptionId::String, resourceGroupName::String, accountName::String, api_version::String; _mediaType=nothing)
    _ctx = _swaggerinternal_accountsGet(_api, subscriptionId, resourceGroupName, accountName, api_version; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any.
Param: subscriptionId::String (required)
Param: api_version::String (required)
Param: filter::String
Param: top::Int32
Param: skip::Int32
Param: select::String
Param: orderby::String
Param: count::Bool
Return: DataLakeStoreAccountListResult
"""
function _swaggerinternal_accountsList(_api::AccountsApi, subscriptionId::String, api_version::String; filter=nothing, top=nothing, skip=nothing, select=nothing, orderby=nothing, count=nothing, _mediaType=nothing)
    Swagger.validate_param("top", "accountsList", :minimum, top, 1, false)

    Swagger.validate_param("skip", "accountsList", :minimum, skip, 1, false)

    _ctx = Swagger.Ctx(_api.client, "GET", DataLakeStoreAccountListResult, "/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeStore/accounts", ["azure_auth"])
    Swagger.set_param(_ctx.path, "subscriptionId", subscriptionId)  # type String
    Swagger.set_param(_ctx.query, "\$filter", filter)  # type String
    Swagger.set_param(_ctx.query, "\$top", top)  # type Int32
    Swagger.set_param(_ctx.query, "\$skip", skip)  # type Int32
    Swagger.set_param(_ctx.query, "\$select", select)  # type String
    Swagger.set_param(_ctx.query, "\$orderby", orderby)  # type String
    Swagger.set_param(_ctx.query, "\$count", count)  # type Bool
    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 accountsList(_api::AccountsApi, subscriptionId::String, api_version::String; filter=nothing, top=nothing, skip=nothing, select=nothing, orderby=nothing, count=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_accountsList(_api, subscriptionId, api_version; filter=filter, top=top, skip=skip, select=select, orderby=orderby, count=count, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function accountsList(_api::AccountsApi, response_stream::Channel, subscriptionId::String, api_version::String; filter=nothing, top=nothing, skip=nothing, select=nothing, orderby=nothing, count=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_accountsList(_api, subscriptionId, api_version; filter=filter, top=top, skip=skip, select=select, orderby=orderby, count=count, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any.
Param: subscriptionId::String (required)
Param: resourceGroupName::String (required)
Param: api_version::String (required)
Param: filter::String
Param: top::Int32
Param: skip::Int32
Param: select::String
Param: orderby::String
Param: count::Bool
Return: DataLakeStoreAccountListResult
"""
function _swaggerinternal_accountsListByResourceGroup(_api::AccountsApi, subscriptionId::String, resourceGroupName::String, api_version::String; filter=nothing, top=nothing, skip=nothing, select=nothing, orderby=nothing, count=nothing, _mediaType=nothing)
    Swagger.validate_param("top", "accountsListByResourceGroup", :minimum, top, 1, false)

    Swagger.validate_param("skip", "accountsListByResourceGroup", :minimum, skip, 1, false)

    _ctx = Swagger.Ctx(_api.client, "GET", DataLakeStoreAccountListResult, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts", ["azure_auth"])
    Swagger.set_param(_ctx.path, "subscriptionId", subscriptionId)  # type String
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.query, "\$filter", filter)  # type String
    Swagger.set_param(_ctx.query, "\$top", top)  # type Int32
    Swagger.set_param(_ctx.query, "\$skip", skip)  # type Int32
    Swagger.set_param(_ctx.query, "\$select", select)  # type String
    Swagger.set_param(_ctx.query, "\$orderby", orderby)  # type String
    Swagger.set_param(_ctx.query, "\$count", count)  # type Bool
    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 accountsListByResourceGroup(_api::AccountsApi, subscriptionId::String, resourceGroupName::String, api_version::String; filter=nothing, top=nothing, skip=nothing, select=nothing, orderby=nothing, count=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_accountsListByResourceGroup(_api, subscriptionId, resourceGroupName, api_version; filter=filter, top=top, skip=skip, select=select, orderby=orderby, count=count, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function accountsListByResourceGroup(_api::AccountsApi, response_stream::Channel, subscriptionId::String, resourceGroupName::String, api_version::String; filter=nothing, top=nothing, skip=nothing, select=nothing, orderby=nothing, count=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_accountsListByResourceGroup(_api, subscriptionId, resourceGroupName, api_version; filter=filter, top=top, skip=skip, select=select, orderby=orderby, count=count, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Updates the specified Data Lake Store account information.
Param: subscriptionId::String (required)
Param: resourceGroupName::String (required)
Param: accountName::String (required)
Param: parameters::UpdateDataLakeStoreAccountParameters (required)
Param: api_version::String (required)
Return: DataLakeStoreAccount
"""
function _swaggerinternal_accountsUpdate(_api::AccountsApi, subscriptionId::String, resourceGroupName::String, accountName::String, parameters, api_version::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PATCH", DataLakeStoreAccount, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}", ["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.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 accountsUpdate(_api::AccountsApi, subscriptionId::String, resourceGroupName::String, accountName::String, parameters, api_version::String; _mediaType=nothing)
    _ctx = _swaggerinternal_accountsUpdate(_api, subscriptionId, resourceGroupName, accountName, parameters, api_version; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function accountsUpdate(_api::AccountsApi, response_stream::Channel, subscriptionId::String, resourceGroupName::String, accountName::String, parameters, api_version::String; _mediaType=nothing)
    _ctx = _swaggerinternal_accountsUpdate(_api, subscriptionId, resourceGroupName, accountName, parameters, api_version; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

export accountsCheckNameAvailability, accountsCreate, accountsDelete, accountsEnableKeyVault, accountsGet, accountsList, accountsListByResourceGroup, accountsUpdate
