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

package com.azure.resourcemanager.synapse.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 SqlPoolWorkloadGroups. */
public interface SqlPoolWorkloadGroups {
    /**
     * Sql pool's workload group
     *
     * <p>Get a Sql pool's workload group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param sqlPoolName SQL pool name.
     * @param workloadGroupName The name of the workload group.
     * @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 a Sql pool's workload group along with {@link Response}.
     */
    Response<WorkloadGroup> getWithResponse(
        String resourceGroupName, String workspaceName, String sqlPoolName, String workloadGroupName, Context context);

    /**
     * Sql pool's workload group
     *
     * <p>Get a Sql pool's workload group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param sqlPoolName SQL pool name.
     * @param workloadGroupName The name of the workload group.
     * @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 a Sql pool's workload group.
     */
    WorkloadGroup get(String resourceGroupName, String workspaceName, String sqlPoolName, String workloadGroupName);

    /**
     * Remove workload group
     *
     * <p>Remove Sql pool's workload group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param sqlPoolName SQL pool name.
     * @param workloadGroupName The name of the workload group.
     * @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 workspaceName, String sqlPoolName, String workloadGroupName);

    /**
     * Remove workload group
     *
     * <p>Remove Sql pool's workload group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param sqlPoolName SQL pool name.
     * @param workloadGroupName The name of the workload group.
     * @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 workspaceName, String sqlPoolName, String workloadGroupName, Context context);

    /**
     * Sql pool's workload groups
     *
     * <p>Get list of Sql pool's workload groups.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param sqlPoolName SQL pool 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 list of Sql pool's workload groups as paginated response with {@link PagedIterable}.
     */
    PagedIterable<WorkloadGroup> list(String resourceGroupName, String workspaceName, String sqlPoolName);

    /**
     * Sql pool's workload groups
     *
     * <p>Get list of Sql pool's workload groups.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param sqlPoolName SQL pool 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 list of Sql pool's workload groups as paginated response with {@link PagedIterable}.
     */
    PagedIterable<WorkloadGroup> list(
        String resourceGroupName, String workspaceName, String sqlPoolName, Context context);

    /**
     * Sql pool's workload group
     *
     * <p>Get a Sql pool's workload group.
     *
     * @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 a Sql pool's workload group along with {@link Response}.
     */
    WorkloadGroup getById(String id);

    /**
     * Sql pool's workload group
     *
     * <p>Get a Sql pool's workload group.
     *
     * @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 a Sql pool's workload group along with {@link Response}.
     */
    Response<WorkloadGroup> getByIdWithResponse(String id, Context context);

    /**
     * Remove workload group
     *
     * <p>Remove Sql pool's workload group.
     *
     * @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);

    /**
     * Remove workload group
     *
     * <p>Remove Sql pool's workload group.
     *
     * @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 WorkloadGroup resource.
     *
     * @param name resource name.
     * @return the first stage of the new WorkloadGroup definition.
     */
    WorkloadGroup.DefinitionStages.Blank define(String name);
}
