// 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;
import java.util.Map;

/** Resource collection API of L2IsolationDomains. */
public interface L2IsolationDomains {
    /**
     * Retrieves details of this L2 Isolation Domain.
     *
     * <p>Implements L2 Isolation Domain GET method.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param l2IsolationDomainName Name of the L2 Isolation Domain.
     * @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 L2IsolationDomain resource definition along with {@link Response}.
     */
    Response<L2IsolationDomain> getByResourceGroupWithResponse(
        String resourceGroupName, String l2IsolationDomainName, Context context);

    /**
     * Retrieves details of this L2 Isolation Domain.
     *
     * <p>Implements L2 Isolation Domain GET method.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param l2IsolationDomainName Name of the L2 Isolation Domain.
     * @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 L2IsolationDomain resource definition.
     */
    L2IsolationDomain getByResourceGroup(String resourceGroupName, String l2IsolationDomainName);

    /**
     * Deletes named L2 Isolation Domain
     *
     * <p>Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param l2IsolationDomainName Name of the L2 Isolation Domain.
     * @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 l2IsolationDomainName);

    /**
     * Deletes named L2 Isolation Domain
     *
     * <p>Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param l2IsolationDomainName Name of the L2 Isolation Domain.
     * @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 l2IsolationDomainName, Context context);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Enables isolation domain across the fabric or on specified racks.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param l2IsolationDomainName Name of the L2IsolationDomain.
     * @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.
     */
    void updateAdministrativeState(
        String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Enables isolation domain across the fabric or on specified racks.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param l2IsolationDomainName Name of the L2IsolationDomain.
     * @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.
     */
    void updateAdministrativeState(
        String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body, Context context);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Clears ARP tables for this Isolation Domain.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param l2IsolationDomainName Name of the L2IsolationDomain.
     * @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.
     */
    void clearArpTable(String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Clears ARP tables for this Isolation Domain.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param l2IsolationDomainName Name of the L2IsolationDomain.
     * @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.
     */
    void clearArpTable(
        String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body, Context context);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Clears IPv6 neighbors for this Isolation Domain.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param l2IsolationDomainName Name of the L2IsolationDomain.
     * @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.
     */
    void clearNeighborTable(String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Clears IPv6 neighbors for this Isolation Domain.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param l2IsolationDomainName Name of the L2IsolationDomain.
     * @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.
     */
    void clearNeighborTable(
        String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body, Context context);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Clears IPv6 neighbors for this Isolation Domain.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param l2IsolationDomainName Name of the L2IsolationDomain.
     * @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 show ARP entries response per network device.
     */
    Map<String, ArpProperties> getArpEntries(String resourceGroupName, String l2IsolationDomainName);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Clears IPv6 neighbors for this Isolation Domain.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param l2IsolationDomainName Name of the L2IsolationDomain.
     * @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 show ARP entries response per network device.
     */
    Map<String, ArpProperties> getArpEntries(String resourceGroupName, String l2IsolationDomainName, Context context);

    /**
     * List L2IsolationDomains by resource group.
     *
     * <p>Displays L2IsolationDomains 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 L2IsolationDomains as paginated response with {@link PagedIterable}.
     */
    PagedIterable<L2IsolationDomain> listByResourceGroup(String resourceGroupName);

    /**
     * List L2IsolationDomains by resource group.
     *
     * <p>Displays L2IsolationDomains 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 L2IsolationDomains as paginated response with {@link PagedIterable}.
     */
    PagedIterable<L2IsolationDomain> listByResourceGroup(String resourceGroupName, Context context);

    /**
     * List L2IsolationDomains by subscription.
     *
     * <p>Displays L2IsolationDomains 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 L2IsolationDomains as paginated response with {@link PagedIterable}.
     */
    PagedIterable<L2IsolationDomain> list();

    /**
     * List L2IsolationDomains by subscription.
     *
     * <p>Displays L2IsolationDomains 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 L2IsolationDomains as paginated response with {@link PagedIterable}.
     */
    PagedIterable<L2IsolationDomain> list(Context context);

    /**
     * Retrieves details of this L2 Isolation Domain.
     *
     * <p>Implements L2 Isolation Domain 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 L2IsolationDomain resource definition along with {@link Response}.
     */
    L2IsolationDomain getById(String id);

    /**
     * Retrieves details of this L2 Isolation Domain.
     *
     * <p>Implements L2 Isolation Domain 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 L2IsolationDomain resource definition along with {@link Response}.
     */
    Response<L2IsolationDomain> getByIdWithResponse(String id, Context context);

    /**
     * Deletes named L2 Isolation Domain
     *
     * <p>Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name.
     *
     * @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 named L2 Isolation Domain
     *
     * <p>Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name.
     *
     * @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 L2IsolationDomain resource.
     *
     * @param name resource name.
     * @return the first stage of the new L2IsolationDomain definition.
     */
    L2IsolationDomain.DefinitionStages.Blank define(String name);
}
