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

package com.azure.resourcemanager.managednetworkfabric.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 AccessControlLists. */
public interface AccessControlLists {
    /**
     * Gets a Access Control List.
     *
     * <p>Implements Access Control List GET method.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accessControlListName Name of the Access Control List.
     * @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 AccessControlList resource definition along with {@link Response}.
     */
    Response<AccessControlList> getByResourceGroupWithResponse(
        String resourceGroupName, String accessControlListName, Context context);

    /**
     * Gets a Access Control List.
     *
     * <p>Implements Access Control List GET method.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accessControlListName Name of the Access Control List.
     * @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 AccessControlList resource definition.
     */
    AccessControlList getByResourceGroup(String resourceGroupName, String accessControlListName);

    /**
     * Deletes a Access Control List.
     *
     * <p>Implements Access Control List DELETE method.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accessControlListName Name of the Access Control List.
     * @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 {@link Response}.
     */
    Response<Void> deleteByResourceGroupWithResponse(
        String resourceGroupName, String accessControlListName, Context context);

    /**
     * Deletes a Access Control List.
     *
     * <p>Implements Access Control List DELETE method.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accessControlListName Name of the Access Control List.
     * @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 accessControlListName);

    /**
     * List AccessControlLists by resource group.
     *
     * <p>Implements AccessControlLists list by resource group GET method.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @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 AccessControlLists as paginated response with {@link PagedIterable}.
     */
    PagedIterable<AccessControlList> listByResourceGroup(String resourceGroupName);

    /**
     * List AccessControlLists by resource group.
     *
     * <p>Implements AccessControlLists list by resource group GET method.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @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 AccessControlLists as paginated response with {@link PagedIterable}.
     */
    PagedIterable<AccessControlList> listByResourceGroup(String resourceGroupName, Context context);

    /**
     * List AccessControlLists by subscription.
     *
     * <p>Implements AccessControlLists list by subscription GET method.
     *
     * @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 AccessControlLists as paginated response with {@link PagedIterable}.
     */
    PagedIterable<AccessControlList> list();

    /**
     * List AccessControlLists by subscription.
     *
     * <p>Implements AccessControlLists list by subscription GET method.
     *
     * @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 AccessControlLists as paginated response with {@link PagedIterable}.
     */
    PagedIterable<AccessControlList> list(Context context);

    /**
     * Gets a Access Control List.
     *
     * <p>Implements Access Control List GET method.
     *
     * @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 the AccessControlList resource definition along with {@link Response}.
     */
    AccessControlList getById(String id);

    /**
     * Gets a Access Control List.
     *
     * <p>Implements Access Control List GET method.
     *
     * @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 the AccessControlList resource definition along with {@link Response}.
     */
    Response<AccessControlList> getByIdWithResponse(String id, Context context);

    /**
     * Deletes a Access Control List.
     *
     * <p>Implements Access Control List DELETE method.
     *
     * @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 a Access Control List.
     *
     * <p>Implements Access Control List DELETE method.
     *
     * @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 the {@link Response}.
     */
    Response<Void> deleteByIdWithResponse(String id, Context context);

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