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

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

"""

Query aggregated Azure subscription consumption data for a date range.
Param: reportedStartTime::DateTime (required)
Param: reportedEndTime::DateTime (required)
Param: api_version::String (required)
Param: subscriptionId::String (required)
Param: showDetails::Bool
Param: aggregationGranularity::String
Param: continuationToken::String
Return: UsageAggregationListResult
"""
function _swaggerinternal_usageAggregatesList(_api::UsageAggregatesApi, reportedStartTime::DateTime, reportedEndTime::DateTime, api_version::String, subscriptionId::String; showDetails=nothing, aggregationGranularity=nothing, continuationToken=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", UsageAggregationListResult, "/subscriptions/{subscriptionId}/providers/Microsoft.Commerce/UsageAggregates", [])
    Swagger.set_param(_ctx.path, "subscriptionId", subscriptionId)  # type String
    Swagger.set_param(_ctx.query, "reportedStartTime", reportedStartTime)  # type DateTime
    Swagger.set_param(_ctx.query, "reportedEndTime", reportedEndTime)  # type DateTime
    Swagger.set_param(_ctx.query, "showDetails", showDetails)  # type Bool
    Swagger.set_param(_ctx.query, "aggregationGranularity", aggregationGranularity)  # type String
    Swagger.set_param(_ctx.query, "continuationToken", continuationToken)  # 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", "text/json"] : [_mediaType])
    return _ctx
end

function usageAggregatesList(_api::UsageAggregatesApi, reportedStartTime::DateTime, reportedEndTime::DateTime, api_version::String, subscriptionId::String; showDetails=nothing, aggregationGranularity=nothing, continuationToken=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_usageAggregatesList(_api, reportedStartTime, reportedEndTime, api_version, subscriptionId; showDetails=showDetails, aggregationGranularity=aggregationGranularity, continuationToken=continuationToken, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function usageAggregatesList(_api::UsageAggregatesApi, response_stream::Channel, reportedStartTime::DateTime, reportedEndTime::DateTime, api_version::String, subscriptionId::String; showDetails=nothing, aggregationGranularity=nothing, continuationToken=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_usageAggregatesList(_api, reportedStartTime, reportedEndTime, api_version, subscriptionId; showDetails=showDetails, aggregationGranularity=aggregationGranularity, continuationToken=continuationToken, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

export usageAggregatesList
