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

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

"""

Sets the managementpolicy to the specified storage account.
Param: resourceGroupName::String (required)
Param: accountName::String (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Param: managementPolicyName::String (required)
Param: properties::ManagementPolicy (required)
Return: ManagementPolicy
"""
function _swaggerinternal_managementPoliciesCreateOrUpdate(_api::ManagementPoliciesApi, resourceGroupName::String, accountName::String, api_version::String, subscriptionId::String, managementPolicyName::String, properties; _mediaType=nothing)
    Swagger.validate_param("resourceGroupName", "managementPoliciesCreateOrUpdate", :maxLength, resourceGroupName, 90)
    Swagger.validate_param("resourceGroupName", "managementPoliciesCreateOrUpdate", :minLength, resourceGroupName, 1)

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

    Swagger.validate_param("api_version", "managementPoliciesCreateOrUpdate", :minLength, api_version, 1)

    Swagger.validate_param("subscriptionId", "managementPoliciesCreateOrUpdate", :minLength, subscriptionId, 1)

    _ctx = Swagger.Ctx(_api.client, "PUT", ManagementPolicy, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}", ["azure_auth"], properties)
    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.path, "managementPolicyName", managementPolicyName)  # 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 managementPoliciesCreateOrUpdate(_api::ManagementPoliciesApi, resourceGroupName::String, accountName::String, api_version::String, subscriptionId::String, managementPolicyName::String, properties; _mediaType=nothing)
    _ctx = _swaggerinternal_managementPoliciesCreateOrUpdate(_api, resourceGroupName, accountName, api_version, subscriptionId, managementPolicyName, properties; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function managementPoliciesCreateOrUpdate(_api::ManagementPoliciesApi, response_stream::Channel, resourceGroupName::String, accountName::String, api_version::String, subscriptionId::String, managementPolicyName::String, properties; _mediaType=nothing)
    _ctx = _swaggerinternal_managementPoliciesCreateOrUpdate(_api, resourceGroupName, accountName, api_version, subscriptionId, managementPolicyName, properties; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Deletes the managementpolicy associated with the specified storage account.
Param: resourceGroupName::String (required)
Param: accountName::String (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Param: managementPolicyName::String (required)
Return: Nothing
"""
function _swaggerinternal_managementPoliciesDelete(_api::ManagementPoliciesApi, resourceGroupName::String, accountName::String, api_version::String, subscriptionId::String, managementPolicyName::String; _mediaType=nothing)
    Swagger.validate_param("resourceGroupName", "managementPoliciesDelete", :maxLength, resourceGroupName, 90)
    Swagger.validate_param("resourceGroupName", "managementPoliciesDelete", :minLength, resourceGroupName, 1)

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

    Swagger.validate_param("api_version", "managementPoliciesDelete", :minLength, api_version, 1)

    Swagger.validate_param("subscriptionId", "managementPoliciesDelete", :minLength, subscriptionId, 1)

    _ctx = Swagger.Ctx(_api.client, "DELETE", Nothing, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}", ["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.path, "managementPolicyName", managementPolicyName)  # 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 managementPoliciesDelete(_api::ManagementPoliciesApi, resourceGroupName::String, accountName::String, api_version::String, subscriptionId::String, managementPolicyName::String; _mediaType=nothing)
    _ctx = _swaggerinternal_managementPoliciesDelete(_api, resourceGroupName, accountName, api_version, subscriptionId, managementPolicyName; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function managementPoliciesDelete(_api::ManagementPoliciesApi, response_stream::Channel, resourceGroupName::String, accountName::String, api_version::String, subscriptionId::String, managementPolicyName::String; _mediaType=nothing)
    _ctx = _swaggerinternal_managementPoliciesDelete(_api, resourceGroupName, accountName, api_version, subscriptionId, managementPolicyName; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Gets the managementpolicy associated with the specified storage account.
Param: resourceGroupName::String (required)
Param: accountName::String (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Param: managementPolicyName::String (required)
Return: ManagementPolicy
"""
function _swaggerinternal_managementPoliciesGet(_api::ManagementPoliciesApi, resourceGroupName::String, accountName::String, api_version::String, subscriptionId::String, managementPolicyName::String; _mediaType=nothing)
    Swagger.validate_param("resourceGroupName", "managementPoliciesGet", :maxLength, resourceGroupName, 90)
    Swagger.validate_param("resourceGroupName", "managementPoliciesGet", :minLength, resourceGroupName, 1)

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

    Swagger.validate_param("api_version", "managementPoliciesGet", :minLength, api_version, 1)

    Swagger.validate_param("subscriptionId", "managementPoliciesGet", :minLength, subscriptionId, 1)

    _ctx = Swagger.Ctx(_api.client, "GET", ManagementPolicy, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}", ["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.path, "managementPolicyName", managementPolicyName)  # 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 managementPoliciesGet(_api::ManagementPoliciesApi, resourceGroupName::String, accountName::String, api_version::String, subscriptionId::String, managementPolicyName::String; _mediaType=nothing)
    _ctx = _swaggerinternal_managementPoliciesGet(_api, resourceGroupName, accountName, api_version, subscriptionId, managementPolicyName; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function managementPoliciesGet(_api::ManagementPoliciesApi, response_stream::Channel, resourceGroupName::String, accountName::String, api_version::String, subscriptionId::String, managementPolicyName::String; _mediaType=nothing)
    _ctx = _swaggerinternal_managementPoliciesGet(_api, resourceGroupName, accountName, api_version, subscriptionId, managementPolicyName; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

export managementPoliciesCreateOrUpdate, managementPoliciesDelete, managementPoliciesGet
