// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.loadtesting.models;

import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;

/** Resource collection API of Quotas. */
public interface Quotas {
    /**
     * Lists all the available quota per region per subscription.
     *
     * @param location The name of Azure region.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of quota bucket objects as paginated response with {@link PagedIterable}.
     */
    PagedIterable<QuotaResource> list(String location);

    /**
     * Lists all the available quota per region per subscription.
     *
     * @param location The name of Azure region.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of quota bucket objects as paginated response with {@link PagedIterable}.
     */
    PagedIterable<QuotaResource> list(String location, Context context);

    /**
     * Get the available quota for a quota bucket per region per subscription.
     *
     * @param location The name of Azure region.
     * @param quotaBucketName Quota Bucket name.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the available quota for a quota bucket per region per subscription along with {@link Response}.
     */
    Response<QuotaResource> getWithResponse(String location, String quotaBucketName, Context context);

    /**
     * Get the available quota for a quota bucket per region per subscription.
     *
     * @param location The name of Azure region.
     * @param quotaBucketName Quota Bucket name.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the available quota for a quota bucket per region per subscription.
     */
    QuotaResource get(String location, String quotaBucketName);

    /**
     * Check Quota Availability on quota bucket per region per subscription.
     *
     * @param location The name of Azure region.
     * @param quotaBucketName Quota Bucket name.
     * @param quotaBucketRequest Quota Bucket Request data.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return check quota availability response object along with {@link Response}.
     */
    Response<CheckQuotaAvailabilityResponse> checkAvailabilityWithResponse(
        String location, String quotaBucketName, QuotaBucketRequest quotaBucketRequest, Context context);

    /**
     * Check Quota Availability on quota bucket per region per subscription.
     *
     * @param location The name of Azure region.
     * @param quotaBucketName Quota Bucket name.
     * @param quotaBucketRequest Quota Bucket Request data.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return check quota availability response object.
     */
    CheckQuotaAvailabilityResponse checkAvailability(
        String location, String quotaBucketName, QuotaBucketRequest quotaBucketRequest);
}
