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


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

"""

Checks that the storage account name is valid and is not already in use.
Param: accountName::StorageAccountCheckNameAvailabilityParameters (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: CheckNameAvailabilityResult
"""
function storageAccountsCheckNameAvailability(_api::StorageAccountsApi, accountName, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", CheckNameAvailabilityResult, "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability", ["azure_auth"], accountName)
    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", "text/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

"""

Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
Param: resourceGroupName::String (required)
Param: accountName::String (required)
Param: parameters::StorageAccountCreateParameters (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: StorageAccount
"""
function storageAccountsCreate(_api::StorageAccountsApi, resourceGroupName::String, accountName::String, parameters, api_version::String, subscriptionId::String; _mediaType=nothing)
    Swagger.validate_param("resourceGroupName", "storageAccountsCreate", :maxLength, resourceGroupName, 90)
    Swagger.validate_param("resourceGroupName", "storageAccountsCreate", :minLength, resourceGroupName, 1)

    Swagger.validate_param("accountName", "storageAccountsCreate", :maxLength, accountName, 24)
    Swagger.validate_param("accountName", "storageAccountsCreate", :minLength, accountName, 3)

    _ctx = Swagger.Ctx(_api.client, "PUT", StorageAccount, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}", ["azure_auth"], parameters)
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "accountName", accountName)  # 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", "text/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

"""

Deletes a storage account in Microsoft Azure.
Param: resourceGroupName::String (required)
Param: accountName::String (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: Nothing
"""
function storageAccountsDelete(_api::StorageAccountsApi, resourceGroupName::String, accountName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    Swagger.validate_param("resourceGroupName", "storageAccountsDelete", :maxLength, resourceGroupName, 90)
    Swagger.validate_param("resourceGroupName", "storageAccountsDelete", :minLength, resourceGroupName, 1)

    Swagger.validate_param("accountName", "storageAccountsDelete", :maxLength, accountName, 24)
    Swagger.validate_param("accountName", "storageAccountsDelete", :minLength, accountName, 3)

    _ctx = Swagger.Ctx(_api.client, "DELETE", Nothing, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}", ["azure_auth"])
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "accountName", accountName)  # 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", "text/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

"""

Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys.
Param: resourceGroupName::String (required)
Param: accountName::String (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: StorageAccount
"""
function storageAccountsGetProperties(_api::StorageAccountsApi, resourceGroupName::String, accountName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    Swagger.validate_param("resourceGroupName", "storageAccountsGetProperties", :maxLength, resourceGroupName, 90)
    Swagger.validate_param("resourceGroupName", "storageAccountsGetProperties", :minLength, resourceGroupName, 1)

    Swagger.validate_param("accountName", "storageAccountsGetProperties", :maxLength, accountName, 24)
    Swagger.validate_param("accountName", "storageAccountsGetProperties", :minLength, accountName, 3)

    _ctx = Swagger.Ctx(_api.client, "GET", StorageAccount, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}", ["azure_auth"])
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "accountName", accountName)  # 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", "text/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

"""

Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: StorageAccountListResult
"""
function storageAccountsList(_api::StorageAccountsApi, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", StorageAccountListResult, "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts", ["azure_auth"])
    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", "text/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

"""

List SAS credentials of a storage account.
Param: resourceGroupName::String (required)
Param: accountName::String (required)
Param: parameters::AccountSasParameters (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: ListAccountSasResponse
"""
function storageAccountsListAccountSAS(_api::StorageAccountsApi, resourceGroupName::String, accountName::String, parameters, api_version::String, subscriptionId::String; _mediaType=nothing)
    Swagger.validate_param("resourceGroupName", "storageAccountsListAccountSAS", :maxLength, resourceGroupName, 90)
    Swagger.validate_param("resourceGroupName", "storageAccountsListAccountSAS", :minLength, resourceGroupName, 1)

    Swagger.validate_param("accountName", "storageAccountsListAccountSAS", :maxLength, accountName, 24)
    Swagger.validate_param("accountName", "storageAccountsListAccountSAS", :minLength, accountName, 3)

    _ctx = Swagger.Ctx(_api.client, "POST", ListAccountSasResponse, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListAccountSas", ["azure_auth"], parameters)
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "accountName", accountName)  # 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", "text/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

"""

Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this.
Param: resourceGroupName::String (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: StorageAccountListResult
"""
function storageAccountsListByResourceGroup(_api::StorageAccountsApi, resourceGroupName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    Swagger.validate_param("resourceGroupName", "storageAccountsListByResourceGroup", :maxLength, resourceGroupName, 90)
    Swagger.validate_param("resourceGroupName", "storageAccountsListByResourceGroup", :minLength, resourceGroupName, 1)

    _ctx = Swagger.Ctx(_api.client, "GET", StorageAccountListResult, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts", ["azure_auth"])
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # 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", "text/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

"""

Lists the access keys for the specified storage account.
Param: resourceGroupName::String (required)
Param: accountName::String (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: StorageAccountListKeysResult
"""
function storageAccountsListKeys(_api::StorageAccountsApi, resourceGroupName::String, accountName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    Swagger.validate_param("resourceGroupName", "storageAccountsListKeys", :maxLength, resourceGroupName, 90)
    Swagger.validate_param("resourceGroupName", "storageAccountsListKeys", :minLength, resourceGroupName, 1)

    Swagger.validate_param("accountName", "storageAccountsListKeys", :maxLength, accountName, 24)
    Swagger.validate_param("accountName", "storageAccountsListKeys", :minLength, accountName, 3)

    _ctx = Swagger.Ctx(_api.client, "POST", StorageAccountListKeysResult, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/listKeys", ["azure_auth"])
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "accountName", accountName)  # 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", "text/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

"""

List service SAS credentials of a specific resource.
Param: resourceGroupName::String (required)
Param: accountName::String (required)
Param: parameters::ServiceSasParameters (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: ListServiceSasResponse
"""
function storageAccountsListServiceSAS(_api::StorageAccountsApi, resourceGroupName::String, accountName::String, parameters, api_version::String, subscriptionId::String; _mediaType=nothing)
    Swagger.validate_param("resourceGroupName", "storageAccountsListServiceSAS", :maxLength, resourceGroupName, 90)
    Swagger.validate_param("resourceGroupName", "storageAccountsListServiceSAS", :minLength, resourceGroupName, 1)

    Swagger.validate_param("accountName", "storageAccountsListServiceSAS", :maxLength, accountName, 24)
    Swagger.validate_param("accountName", "storageAccountsListServiceSAS", :minLength, accountName, 3)

    _ctx = Swagger.Ctx(_api.client, "POST", ListServiceSasResponse, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListServiceSas", ["azure_auth"], parameters)
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "accountName", accountName)  # 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", "text/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

"""

Regenerates one of the access keys for the specified storage account.
Param: resourceGroupName::String (required)
Param: accountName::String (required)
Param: regenerateKey::StorageAccountRegenerateKeyParameters (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: StorageAccountListKeysResult
"""
function storageAccountsRegenerateKey(_api::StorageAccountsApi, resourceGroupName::String, accountName::String, regenerateKey, api_version::String, subscriptionId::String; _mediaType=nothing)
    Swagger.validate_param("resourceGroupName", "storageAccountsRegenerateKey", :maxLength, resourceGroupName, 90)
    Swagger.validate_param("resourceGroupName", "storageAccountsRegenerateKey", :minLength, resourceGroupName, 1)

    Swagger.validate_param("accountName", "storageAccountsRegenerateKey", :maxLength, accountName, 24)
    Swagger.validate_param("accountName", "storageAccountsRegenerateKey", :minLength, accountName, 3)

    _ctx = Swagger.Ctx(_api.client, "POST", StorageAccountListKeysResult, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey", ["azure_auth"], regenerateKey)
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "accountName", accountName)  # 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", "text/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

"""

The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation.
Param: resourceGroupName::String (required)
Param: accountName::String (required)
Param: parameters::StorageAccountUpdateParameters (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: StorageAccount
"""
function storageAccountsUpdate(_api::StorageAccountsApi, resourceGroupName::String, accountName::String, parameters, api_version::String, subscriptionId::String; _mediaType=nothing)
    Swagger.validate_param("resourceGroupName", "storageAccountsUpdate", :maxLength, resourceGroupName, 90)
    Swagger.validate_param("resourceGroupName", "storageAccountsUpdate", :minLength, resourceGroupName, 1)

    Swagger.validate_param("accountName", "storageAccountsUpdate", :maxLength, accountName, 24)
    Swagger.validate_param("accountName", "storageAccountsUpdate", :minLength, accountName, 3)

    _ctx = Swagger.Ctx(_api.client, "PATCH", StorageAccount, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}", ["azure_auth"], parameters)
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "accountName", accountName)  # 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", "text/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    Swagger.exec(_ctx)
end

export storageAccountsCheckNameAvailability, storageAccountsCreate, storageAccountsDelete, storageAccountsGetProperties, storageAccountsList, storageAccountsListAccountSAS, storageAccountsListByResourceGroup, storageAccountsListKeys, storageAccountsListServiceSAS, storageAccountsRegenerateKey, storageAccountsUpdate
