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


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

"""

Checks whether a resource exists.
Param: resourceGroupName::String (required)
Param: resourceProviderNamespace::String (required)
Param: parentResourcePath::String (required)
Param: resourceType::String (required)
Param: resourceName::String (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: Nothing
"""
function resourcesCheckExistence(_api::ResourcesApi, resourceGroupName::String, resourceProviderNamespace::String, parentResourcePath::String, resourceType::String, resourceName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    Swagger.validate_param("resourceGroupName", "resourcesCheckExistence", :maxLength, resourceGroupName, 90)
    Swagger.validate_param("resourceGroupName", "resourcesCheckExistence", :minLength, resourceGroupName, 1)

    _ctx = Swagger.Ctx(_api.client, "HEAD", Nothing, "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}", ["azure_auth"])
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "resourceProviderNamespace", resourceProviderNamespace)  # type String
    Swagger.set_param(_ctx.path, "parentResourcePath", parentResourcePath)  # type String
    Swagger.set_param(_ctx.path, "resourceType", resourceType)  # type String
    Swagger.set_param(_ctx.path, "resourceName", resourceName)  # 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])
    Swagger.exec(_ctx)
end

"""

Checks by ID whether a resource exists.
Param: resourceId::String (required)
Param: api_version::String (required)
Return: Nothing
"""
function resourcesCheckExistenceById(_api::ResourcesApi, resourceId::String, api_version::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "HEAD", Nothing, "/{resourceId}", ["azure_auth"])
    Swagger.set_param(_ctx.path, "resourceId", resourceId)  # 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])
    Swagger.exec(_ctx)
end

"""

Creates a resource.
Param: resourceGroupName::String (required)
Param: resourceProviderNamespace::String (required)
Param: parentResourcePath::String (required)
Param: resourceType::String (required)
Param: resourceName::String (required)
Param: api_version::String (required)
Param: parameters::GenericResource (required)
Param: subscriptionId::String (required)
Return: GenericResource
"""
function resourcesCreateOrUpdate(_api::ResourcesApi, resourceGroupName::String, resourceProviderNamespace::String, parentResourcePath::String, resourceType::String, resourceName::String, api_version::String, parameters, subscriptionId::String; _mediaType=nothing)
    Swagger.validate_param("resourceGroupName", "resourcesCreateOrUpdate", :maxLength, resourceGroupName, 90)
    Swagger.validate_param("resourceGroupName", "resourcesCreateOrUpdate", :minLength, resourceGroupName, 1)

    _ctx = Swagger.Ctx(_api.client, "PUT", GenericResource, "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}", ["azure_auth"], parameters)
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "resourceProviderNamespace", resourceProviderNamespace)  # type String
    Swagger.set_param(_ctx.path, "parentResourcePath", parentResourcePath)  # type String
    Swagger.set_param(_ctx.path, "resourceType", resourceType)  # type String
    Swagger.set_param(_ctx.path, "resourceName", resourceName)  # 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])
    Swagger.exec(_ctx)
end

"""

Create a resource by ID.
Param: resourceId::String (required)
Param: api_version::String (required)
Param: parameters::GenericResource (required)
Return: GenericResource
"""
function resourcesCreateOrUpdateById(_api::ResourcesApi, resourceId::String, api_version::String, parameters; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PUT", GenericResource, "/{resourceId}", ["azure_auth"], parameters)
    Swagger.set_param(_ctx.path, "resourceId", resourceId)  # 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])
    Swagger.exec(_ctx)
end

"""

Deletes a resource.
Param: resourceGroupName::String (required)
Param: resourceProviderNamespace::String (required)
Param: parentResourcePath::String (required)
Param: resourceType::String (required)
Param: resourceName::String (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: Nothing
"""
function resourcesDelete(_api::ResourcesApi, resourceGroupName::String, resourceProviderNamespace::String, parentResourcePath::String, resourceType::String, resourceName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    Swagger.validate_param("resourceGroupName", "resourcesDelete", :maxLength, resourceGroupName, 90)
    Swagger.validate_param("resourceGroupName", "resourcesDelete", :minLength, resourceGroupName, 1)

    _ctx = Swagger.Ctx(_api.client, "DELETE", Nothing, "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}", ["azure_auth"])
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "resourceProviderNamespace", resourceProviderNamespace)  # type String
    Swagger.set_param(_ctx.path, "parentResourcePath", parentResourcePath)  # type String
    Swagger.set_param(_ctx.path, "resourceType", resourceType)  # type String
    Swagger.set_param(_ctx.path, "resourceName", resourceName)  # 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])
    Swagger.exec(_ctx)
end

"""

Deletes a resource by ID.
Param: resourceId::String (required)
Param: api_version::String (required)
Return: Nothing
"""
function resourcesDeleteById(_api::ResourcesApi, resourceId::String, api_version::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "DELETE", Nothing, "/{resourceId}", ["azure_auth"])
    Swagger.set_param(_ctx.path, "resourceId", resourceId)  # 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])
    Swagger.exec(_ctx)
end

"""

Gets a resource.
Param: resourceGroupName::String (required)
Param: resourceProviderNamespace::String (required)
Param: parentResourcePath::String (required)
Param: resourceType::String (required)
Param: resourceName::String (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: GenericResource
"""
function resourcesGet(_api::ResourcesApi, resourceGroupName::String, resourceProviderNamespace::String, parentResourcePath::String, resourceType::String, resourceName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    Swagger.validate_param("resourceGroupName", "resourcesGet", :maxLength, resourceGroupName, 90)
    Swagger.validate_param("resourceGroupName", "resourcesGet", :minLength, resourceGroupName, 1)

    _ctx = Swagger.Ctx(_api.client, "GET", GenericResource, "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}", ["azure_auth"])
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "resourceProviderNamespace", resourceProviderNamespace)  # type String
    Swagger.set_param(_ctx.path, "parentResourcePath", parentResourcePath)  # type String
    Swagger.set_param(_ctx.path, "resourceType", resourceType)  # type String
    Swagger.set_param(_ctx.path, "resourceName", resourceName)  # 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])
    Swagger.exec(_ctx)
end

"""

Gets a resource by ID.
Param: resourceId::String (required)
Param: api_version::String (required)
Return: GenericResource
"""
function resourcesGetById(_api::ResourcesApi, resourceId::String, api_version::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", GenericResource, "/{resourceId}", ["azure_auth"])
    Swagger.set_param(_ctx.path, "resourceId", resourceId)  # 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])
    Swagger.exec(_ctx)
end

"""

Get all the resources in a subscription.
Param: api_version::String (required)
Param: subscriptionId::String (required)
Param: filter::String
Param: expand::String
Param: top::Int32
Return: ResourceListResult
"""
function resourcesList(_api::ResourcesApi, api_version::String, subscriptionId::String; filter=nothing, expand=nothing, top=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", ResourceListResult, "/subscriptions/{subscriptionId}/resources", ["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, "\$expand", expand)  # type String
    Swagger.set_param(_ctx.query, "\$top", top)  # type Int32
    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])
    Swagger.exec(_ctx)
end

"""
Moves resources from one resource group to another resource group.
The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. 
Param: sourceResourceGroupName::String (required)
Param: parameters::ResourcesMoveInfo (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: Nothing
"""
function resourcesMoveResources(_api::ResourcesApi, sourceResourceGroupName::String, parameters, api_version::String, subscriptionId::String; _mediaType=nothing)
    Swagger.validate_param("sourceResourceGroupName", "resourcesMoveResources", :maxLength, sourceResourceGroupName, 90)
    Swagger.validate_param("sourceResourceGroupName", "resourcesMoveResources", :minLength, sourceResourceGroupName, 1)

    _ctx = Swagger.Ctx(_api.client, "POST", Nothing, "/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/moveResources", ["azure_auth"], parameters)
    Swagger.set_param(_ctx.path, "sourceResourceGroupName", sourceResourceGroupName)  # 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])
    Swagger.exec(_ctx)
end

"""
Validates whether resources can be moved from one resource group to another resource group.
This operation checks whether the specified resources can be moved to the target. The resources to move must be in the same source resource group. The target resource group may be in a different subscription. If validation succeeds, it returns HTTP response code 204 (no content). If validation fails, it returns HTTP response code 409 (Conflict) with an error message. Retrieve the URL in the Location header value to check the result of the long-running operation.
Param: sourceResourceGroupName::String (required)
Param: parameters::ResourcesMoveInfo (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: Nothing
"""
function resourcesValidateMoveResources(_api::ResourcesApi, sourceResourceGroupName::String, parameters, api_version::String, subscriptionId::String; _mediaType=nothing)
    Swagger.validate_param("sourceResourceGroupName", "resourcesValidateMoveResources", :maxLength, sourceResourceGroupName, 90)
    Swagger.validate_param("sourceResourceGroupName", "resourcesValidateMoveResources", :minLength, sourceResourceGroupName, 1)

    _ctx = Swagger.Ctx(_api.client, "POST", Nothing, "/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/validateMoveResources", ["azure_auth"], parameters)
    Swagger.set_param(_ctx.path, "sourceResourceGroupName", sourceResourceGroupName)  # 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])
    Swagger.exec(_ctx)
end

export resourcesCheckExistence, resourcesCheckExistenceById, resourcesCreateOrUpdate, resourcesCreateOrUpdateById, resourcesDelete, resourcesDeleteById, resourcesGet, resourcesGetById, resourcesList, resourcesMoveResources, resourcesValidateMoveResources
