// 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 NetworkInterfaces. */
public interface NetworkInterfaces {
    /**
     * Gets a NetworkInterface.
     *
     * <p>Get the Network Interface resource details.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkDeviceName Name of the NetworkDevice.
     * @param networkInterfaceName Name of the NetworkInterfaceName.
     * @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 Network Interface resource details along with {@link Response}.
     */
    Response<NetworkInterface> getWithResponse(
        String resourceGroupName, String networkDeviceName, String networkInterfaceName, Context context);

    /**
     * Gets a NetworkInterface.
     *
     * <p>Get the Network Interface resource details.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkDeviceName Name of the NetworkDevice.
     * @param networkInterfaceName Name of the NetworkInterfaceName.
     * @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 Network Interface resource details.
     */
    NetworkInterface get(String resourceGroupName, String networkDeviceName, String networkInterfaceName);

    /**
     * Deletes a NetworkInterface.
     *
     * <p>Delete the Network Interface resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkDeviceName Name of the NetworkDevice.
     * @param networkInterfaceName Name of the NetworkInterfaceName.
     * @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 networkDeviceName, String networkInterfaceName);

    /**
     * Deletes a NetworkInterface.
     *
     * <p>Delete the Network Interface resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkDeviceName Name of the NetworkDevice.
     * @param networkInterfaceName Name of the NetworkInterfaceName.
     * @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 networkDeviceName, String networkInterfaceName, Context context);

    /**
     * List all Network Interfaces that are available using an Network Device.
     *
     * <p>List all the Network Interface resources in a given resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkDeviceName Name of the NetworkDevice.
     * @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 NetworkInterfaces as paginated response with {@link PagedIterable}.
     */
    PagedIterable<NetworkInterface> list(String resourceGroupName, String networkDeviceName);

    /**
     * List all Network Interfaces that are available using an Network Device.
     *
     * <p>List all the Network Interface resources in a given resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkDeviceName Name of the NetworkDevice.
     * @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 NetworkInterfaces as paginated response with {@link PagedIterable}.
     */
    PagedIterable<NetworkInterface> list(String resourceGroupName, String networkDeviceName, Context context);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Get the running status of the Network Interface.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkDeviceName Name of the NetworkDevice.
     * @param networkInterfaceName Name of the NetworkInterface.
     * @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 running status of the Network Interface.
     */
    InterfaceStatus getStatus(String resourceGroupName, String networkDeviceName, String networkInterfaceName);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Get the running status of the Network Interface.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkDeviceName Name of the NetworkDevice.
     * @param networkInterfaceName Name of the NetworkInterface.
     * @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 running status of the Network Interface.
     */
    InterfaceStatus getStatus(
        String resourceGroupName, String networkDeviceName, String networkInterfaceName, Context context);

    /**
     * Updates the admin state of the network interface.
     *
     * <p>Update the admin state of the Network Interface.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkDeviceName Name of the NetworkDevice.
     * @param networkInterfaceName Name of the NetworkInterface.
     * @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 networkDeviceName,
        String networkInterfaceName,
        UpdateAdministrativeState body);

    /**
     * Updates the admin state of the network interface.
     *
     * <p>Update the admin state of the Network Interface.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkDeviceName Name of the NetworkDevice.
     * @param networkInterfaceName Name of the NetworkInterface.
     * @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 networkDeviceName,
        String networkInterfaceName,
        UpdateAdministrativeState body,
        Context context);

    /**
     * Gets a NetworkInterface.
     *
     * <p>Get the Network Interface resource details.
     *
     * @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 Network Interface resource details along with {@link Response}.
     */
    NetworkInterface getById(String id);

    /**
     * Gets a NetworkInterface.
     *
     * <p>Get the Network Interface resource details.
     *
     * @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 Network Interface resource details along with {@link Response}.
     */
    Response<NetworkInterface> getByIdWithResponse(String id, Context context);

    /**
     * Deletes a NetworkInterface.
     *
     * <p>Delete the Network Interface resource.
     *
     * @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 NetworkInterface.
     *
     * <p>Delete the Network Interface resource.
     *
     * @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 NetworkInterface resource.
     *
     * @param name resource name.
     * @return the first stage of the new NetworkInterface definition.
     */
    NetworkInterface.DefinitionStages.Blank define(String name);
}
