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

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

"""

Create or update an availability set.
Param: resourceGroupName::String (required)
Param: availabilitySetName::String (required)
Param: parameters::AvailabilitySet (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: AvailabilitySet
"""
function _swaggerinternal_availabilitySetsCreateOrUpdate(_api::AvailabilitySetsApi, resourceGroupName::String, availabilitySetName::String, parameters, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PUT", AvailabilitySet, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", ["azure_auth"], parameters)
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "availabilitySetName", availabilitySetName)  # 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])
    return _ctx
end

function availabilitySetsCreateOrUpdate(_api::AvailabilitySetsApi, resourceGroupName::String, availabilitySetName::String, parameters, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_availabilitySetsCreateOrUpdate(_api, resourceGroupName, availabilitySetName, parameters, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function availabilitySetsCreateOrUpdate(_api::AvailabilitySetsApi, response_stream::Channel, resourceGroupName::String, availabilitySetName::String, parameters, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_availabilitySetsCreateOrUpdate(_api, resourceGroupName, availabilitySetName, parameters, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Delete an availability set.
Param: resourceGroupName::String (required)
Param: availabilitySetName::String (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: Nothing
"""
function _swaggerinternal_availabilitySetsDelete(_api::AvailabilitySetsApi, resourceGroupName::String, availabilitySetName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "DELETE", Nothing, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", ["azure_auth"])
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "availabilitySetName", availabilitySetName)  # 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])
    return _ctx
end

function availabilitySetsDelete(_api::AvailabilitySetsApi, resourceGroupName::String, availabilitySetName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_availabilitySetsDelete(_api, resourceGroupName, availabilitySetName, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function availabilitySetsDelete(_api::AvailabilitySetsApi, response_stream::Channel, resourceGroupName::String, availabilitySetName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_availabilitySetsDelete(_api, resourceGroupName, availabilitySetName, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Retrieves information about an availability set.
Param: resourceGroupName::String (required)
Param: availabilitySetName::String (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: AvailabilitySet
"""
function _swaggerinternal_availabilitySetsGet(_api::AvailabilitySetsApi, resourceGroupName::String, availabilitySetName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", AvailabilitySet, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", ["azure_auth"])
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "availabilitySetName", availabilitySetName)  # 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])
    return _ctx
end

function availabilitySetsGet(_api::AvailabilitySetsApi, resourceGroupName::String, availabilitySetName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_availabilitySetsGet(_api, resourceGroupName, availabilitySetName, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function availabilitySetsGet(_api::AvailabilitySetsApi, response_stream::Channel, resourceGroupName::String, availabilitySetName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_availabilitySetsGet(_api, resourceGroupName, availabilitySetName, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Lists all availability sets in a resource group.
Param: resourceGroupName::String (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: AvailabilitySetListResult
"""
function _swaggerinternal_availabilitySetsList(_api::AvailabilitySetsApi, resourceGroupName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", AvailabilitySetListResult, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets", ["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"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    return _ctx
end

function availabilitySetsList(_api::AvailabilitySetsApi, resourceGroupName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_availabilitySetsList(_api, resourceGroupName, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function availabilitySetsList(_api::AvailabilitySetsApi, response_stream::Channel, resourceGroupName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_availabilitySetsList(_api, resourceGroupName, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Lists all available virtual machine sizes that can be used to create a new virtual machine in an existing availability set.
Param: resourceGroupName::String (required)
Param: availabilitySetName::String (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: VirtualMachineSizeListResult
"""
function _swaggerinternal_availabilitySetsListAvailableSizes(_api::AvailabilitySetsApi, resourceGroupName::String, availabilitySetName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", VirtualMachineSizeListResult, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes", ["azure_auth"])
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "availabilitySetName", availabilitySetName)  # 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])
    return _ctx
end

function availabilitySetsListAvailableSizes(_api::AvailabilitySetsApi, resourceGroupName::String, availabilitySetName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_availabilitySetsListAvailableSizes(_api, resourceGroupName, availabilitySetName, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function availabilitySetsListAvailableSizes(_api::AvailabilitySetsApi, response_stream::Channel, resourceGroupName::String, availabilitySetName::String, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_availabilitySetsListAvailableSizes(_api, resourceGroupName, availabilitySetName, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Lists all availability sets in a subscription.
Param: api_version::String (required)
Param: subscriptionId::String (required)
Param: expand::String
Return: AvailabilitySetListResult
"""
function _swaggerinternal_availabilitySetsListBySubscription(_api::AvailabilitySetsApi, api_version::String, subscriptionId::String; expand=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", AvailabilitySetListResult, "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets", ["azure_auth"])
    Swagger.set_param(_ctx.path, "subscriptionId", subscriptionId)  # type String
    Swagger.set_param(_ctx.query, "api-version", api_version)  # type String
    Swagger.set_param(_ctx.query, "\$expand", expand)  # type String
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json"] : [_mediaType])
    return _ctx
end

function availabilitySetsListBySubscription(_api::AvailabilitySetsApi, api_version::String, subscriptionId::String; expand=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_availabilitySetsListBySubscription(_api, api_version, subscriptionId; expand=expand, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function availabilitySetsListBySubscription(_api::AvailabilitySetsApi, response_stream::Channel, api_version::String, subscriptionId::String; expand=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_availabilitySetsListBySubscription(_api, api_version, subscriptionId; expand=expand, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

"""

Update an availability set.
Param: resourceGroupName::String (required)
Param: availabilitySetName::String (required)
Param: parameters::AvailabilitySetUpdate (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Return: AvailabilitySet
"""
function _swaggerinternal_availabilitySetsUpdate(_api::AvailabilitySetsApi, resourceGroupName::String, availabilitySetName::String, parameters, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PATCH", AvailabilitySet, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", ["azure_auth"], parameters)
    Swagger.set_param(_ctx.path, "resourceGroupName", resourceGroupName)  # type String
    Swagger.set_param(_ctx.path, "availabilitySetName", availabilitySetName)  # 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])
    return _ctx
end

function availabilitySetsUpdate(_api::AvailabilitySetsApi, resourceGroupName::String, availabilitySetName::String, parameters, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_availabilitySetsUpdate(_api, resourceGroupName, availabilitySetName, parameters, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function availabilitySetsUpdate(_api::AvailabilitySetsApi, response_stream::Channel, resourceGroupName::String, availabilitySetName::String, parameters, api_version::String, subscriptionId::String; _mediaType=nothing)
    _ctx = _swaggerinternal_availabilitySetsUpdate(_api, resourceGroupName, availabilitySetName, parameters, api_version, subscriptionId; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

export availabilitySetsCreateOrUpdate, availabilitySetsDelete, availabilitySetsGet, availabilitySetsList, availabilitySetsListAvailableSizes, availabilitySetsListBySubscription, availabilitySetsUpdate
