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

package com.azure.resourcemanager.powerbidedicated.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 Capacities. */
public interface Capacities {
    /**
     * Gets details about the specified dedicated capacity.
     *
     * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part.
     *     This name must be at least 1 character in length, and no more than 90.
     * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a
     *     maximum of 63.
     * @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 details about the specified dedicated capacity along with {@link Response}.
     */
    Response<DedicatedCapacity> getByResourceGroupWithResponse(
        String resourceGroupName, String dedicatedCapacityName, Context context);

    /**
     * Gets details about the specified dedicated capacity.
     *
     * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part.
     *     This name must be at least 1 character in length, and no more than 90.
     * @param dedicatedCapacityName The name of the dedicated capacity. It must be a minimum of 3 characters, and a
     *     maximum of 63.
     * @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 details about the specified dedicated capacity.
     */
    DedicatedCapacity getByResourceGroup(String resourceGroupName, String dedicatedCapacityName);

    /**
     * Deletes the specified Dedicated capacity.
     *
     * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part.
     *     This name must be at least 1 character in length, and no more than 90.
     * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and
     *     no more than 63.
     * @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.
     */
    void deleteByResourceGroup(String resourceGroupName, String dedicatedCapacityName);

    /**
     * Deletes the specified Dedicated capacity.
     *
     * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part.
     *     This name must be at least 1 character in length, and no more than 90.
     * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and
     *     no more than 63.
     * @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.
     */
    void delete(String resourceGroupName, String dedicatedCapacityName, Context context);

    /**
     * Suspends operation of the specified dedicated capacity instance.
     *
     * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part.
     *     This name must be at least 1 character in length, and no more than 90.
     * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and
     *     no more than 63.
     * @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.
     */
    void suspend(String resourceGroupName, String dedicatedCapacityName);

    /**
     * Suspends operation of the specified dedicated capacity instance.
     *
     * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part.
     *     This name must be at least 1 character in length, and no more than 90.
     * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and
     *     no more than 63.
     * @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.
     */
    void suspend(String resourceGroupName, String dedicatedCapacityName, Context context);

    /**
     * Resumes operation of the specified Dedicated capacity instance.
     *
     * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part.
     *     This name must be at least 1 character in length, and no more than 90.
     * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and
     *     no more than 63.
     * @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.
     */
    void resume(String resourceGroupName, String dedicatedCapacityName);

    /**
     * Resumes operation of the specified Dedicated capacity instance.
     *
     * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part.
     *     This name must be at least 1 character in length, and no more than 90.
     * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and
     *     no more than 63.
     * @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.
     */
    void resume(String resourceGroupName, String dedicatedCapacityName, Context context);

    /**
     * Gets all the Dedicated capacities for the given resource group.
     *
     * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part.
     *     This name must be at least 1 character in length, and no more than 90.
     * @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 all the Dedicated capacities for the given resource group as paginated response with {@link
     *     PagedIterable}.
     */
    PagedIterable<DedicatedCapacity> listByResourceGroup(String resourceGroupName);

    /**
     * Gets all the Dedicated capacities for the given resource group.
     *
     * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part.
     *     This name must be at least 1 character in length, and no more than 90.
     * @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 all the Dedicated capacities for the given resource group as paginated response with {@link
     *     PagedIterable}.
     */
    PagedIterable<DedicatedCapacity> listByResourceGroup(String resourceGroupName, Context context);

    /**
     * Lists all the Dedicated capacities for the given subscription.
     *
     * @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 an array of Dedicated capacities resources as paginated response with {@link PagedIterable}.
     */
    PagedIterable<DedicatedCapacity> list();

    /**
     * Lists all the Dedicated capacities for the given subscription.
     *
     * @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 an array of Dedicated capacities resources as paginated response with {@link PagedIterable}.
     */
    PagedIterable<DedicatedCapacity> list(Context context);

    /**
     * Lists eligible SKUs for PowerBI Dedicated resource provider.
     *
     * @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 an object that represents enumerating SKUs for new resources along with {@link Response}.
     */
    Response<SkuEnumerationForNewResourceResult> listSkusWithResponse(Context context);

    /**
     * Lists eligible SKUs for PowerBI Dedicated resource provider.
     *
     * @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 an object that represents enumerating SKUs for new resources.
     */
    SkuEnumerationForNewResourceResult listSkus();

    /**
     * Lists eligible SKUs for a PowerBI Dedicated resource.
     *
     * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part.
     *     This name must be at least 1 character in length, and no more than 90.
     * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and
     *     no more than 63.
     * @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 an object that represents enumerating SKUs for existing resources along with {@link Response}.
     */
    Response<SkuEnumerationForExistingResourceResult> listSkusForCapacityWithResponse(
        String resourceGroupName, String dedicatedCapacityName, Context context);

    /**
     * Lists eligible SKUs for a PowerBI Dedicated resource.
     *
     * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part.
     *     This name must be at least 1 character in length, and no more than 90.
     * @param dedicatedCapacityName The name of the Dedicated capacity. It must be at least 3 characters in length, and
     *     no more than 63.
     * @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 an object that represents enumerating SKUs for existing resources.
     */
    SkuEnumerationForExistingResourceResult listSkusForCapacity(String resourceGroupName, String dedicatedCapacityName);

    /**
     * Check the name availability in the target location.
     *
     * @param location The region name which the operation will lookup into.
     * @param capacityParameters The name of the capacity.
     * @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 checking result of capacity name availability along with {@link Response}.
     */
    Response<CheckCapacityNameAvailabilityResult> checkNameAvailabilityWithResponse(
        String location, CheckCapacityNameAvailabilityParameters capacityParameters, Context context);

    /**
     * Check the name availability in the target location.
     *
     * @param location The region name which the operation will lookup into.
     * @param capacityParameters The name of the capacity.
     * @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 checking result of capacity name availability.
     */
    CheckCapacityNameAvailabilityResult checkNameAvailability(
        String location, CheckCapacityNameAvailabilityParameters capacityParameters);

    /**
     * Gets details about the specified dedicated capacity.
     *
     * @param id the resource ID.
     * @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 details about the specified dedicated capacity along with {@link Response}.
     */
    DedicatedCapacity getById(String id);

    /**
     * Gets details about the specified dedicated capacity.
     *
     * @param id the resource ID.
     * @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 details about the specified dedicated capacity along with {@link Response}.
     */
    Response<DedicatedCapacity> getByIdWithResponse(String id, Context context);

    /**
     * Deletes the specified Dedicated capacity.
     *
     * @param id the resource ID.
     * @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.
     */
    void deleteById(String id);

    /**
     * Deletes the specified Dedicated capacity.
     *
     * @param id the resource ID.
     * @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.
     */
    void deleteByIdWithResponse(String id, Context context);

    /**
     * Begins definition for a new DedicatedCapacity resource.
     *
     * @param name resource name.
     * @return the first stage of the new DedicatedCapacity definition.
     */
    DedicatedCapacity.DefinitionStages.Blank define(String name);
}
