// 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.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListInner;
import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatch;

/** An instance of this class provides access to all the operations defined in AccessControlListsClient. */
public interface AccessControlListsClient {
    /**
     * Create Access Control List.
     *
     * <p>Implements Access Control List PUT method.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accessControlListName Name of the Access Control List.
     * @param body Request payload.
     * @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}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<AccessControlListInner> createWithResponse(
        String resourceGroupName, String accessControlListName, AccessControlListInner body, Context context);

    /**
     * Create Access Control List.
     *
     * <p>Implements Access Control List PUT method.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accessControlListName Name of the Access Control List.
     * @param body Request payload.
     * @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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    AccessControlListInner create(String resourceGroupName, String accessControlListName, AccessControlListInner body);

    /**
     * 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}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<AccessControlListInner> 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    AccessControlListInner getByResourceGroup(String resourceGroupName, String accessControlListName);

    /**
     * Updates a Access Control List.
     *
     * <p>API to update certain properties of the Access Control List resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accessControlListName Name of the Access Control List.
     * @param body Access Control List properties to update.
     * @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}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<AccessControlListInner> updateWithResponse(
        String resourceGroupName, String accessControlListName, AccessControlListPatch body, Context context);

    /**
     * Updates a Access Control List.
     *
     * <p>API to update certain properties of the Access Control List resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accessControlListName Name of the Access Control List.
     * @param body Access Control List properties to update.
     * @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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    AccessControlListInner update(String resourceGroupName, String accessControlListName, AccessControlListPatch body);

    /**
     * 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}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<Void> deleteWithResponse(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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(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}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<AccessControlListInner> 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}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<AccessControlListInner> 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}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<AccessControlListInner> 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}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<AccessControlListInner> list(Context context);
}
