// 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.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.managednetworkfabric.fluent.models.InterfaceStatusInner;
import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceInner;
import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacePatch;
import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState;

/** An instance of this class provides access to all the operations defined in NetworkInterfacesClient. */
public interface NetworkInterfacesClient {
    /**
     * Create NetworkInterface.
     *
     * <p>Create a 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 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.
     * @return the {@link SyncPoller} for polling of defines the NetworkInterface resource.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<NetworkInterfaceInner>, NetworkInterfaceInner> beginCreate(
        String resourceGroupName, String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner body);

    /**
     * Create NetworkInterface.
     *
     * <p>Create a 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 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.
     * @return the {@link SyncPoller} for polling of defines the NetworkInterface resource.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<NetworkInterfaceInner>, NetworkInterfaceInner> beginCreate(
        String resourceGroupName,
        String networkDeviceName,
        String networkInterfaceName,
        NetworkInterfaceInner body,
        Context context);

    /**
     * Create NetworkInterface.
     *
     * <p>Create a 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 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.
     * @return defines the NetworkInterface resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    NetworkInterfaceInner create(
        String resourceGroupName, String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner body);

    /**
     * Create NetworkInterface.
     *
     * <p>Create a 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 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.
     * @return defines the NetworkInterface resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    NetworkInterfaceInner create(
        String resourceGroupName,
        String networkDeviceName,
        String networkInterfaceName,
        NetworkInterfaceInner body,
        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.
     * @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}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<NetworkInterfaceInner> 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    NetworkInterfaceInner get(String resourceGroupName, String networkDeviceName, String networkInterfaceName);

    /**
     * Updates a NetworkInterface.
     *
     * <p>Update certain properties of 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 body NetworkInterface properties to update. Only tags are supported.
     * @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 SyncPoller} for polling of defines the NetworkInterface resource.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<NetworkInterfaceInner>, NetworkInterfaceInner> beginUpdate(
        String resourceGroupName, String networkDeviceName, String networkInterfaceName, NetworkInterfacePatch body);

    /**
     * Updates a NetworkInterface.
     *
     * <p>Update certain properties of 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 body NetworkInterface properties to update. Only tags are supported.
     * @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 SyncPoller} for polling of defines the NetworkInterface resource.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<NetworkInterfaceInner>, NetworkInterfaceInner> beginUpdate(
        String resourceGroupName,
        String networkDeviceName,
        String networkInterfaceName,
        NetworkInterfacePatch body,
        Context context);

    /**
     * Updates a NetworkInterface.
     *
     * <p>Update certain properties of 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 body NetworkInterface properties to update. Only tags are supported.
     * @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 defines the NetworkInterface resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    NetworkInterfaceInner update(
        String resourceGroupName, String networkDeviceName, String networkInterfaceName, NetworkInterfacePatch body);

    /**
     * Updates a NetworkInterface.
     *
     * <p>Update certain properties of 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 body NetworkInterface properties to update. Only tags are supported.
     * @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 defines the NetworkInterface resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    NetworkInterfaceInner update(
        String resourceGroupName,
        String networkDeviceName,
        String networkInterfaceName,
        NetworkInterfacePatch body,
        Context context);

    /**
     * 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.
     * @return the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(
        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.
     * @return the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(
        String resourceGroupName, String networkDeviceName, String networkInterfaceName, Context context);

    /**
     * 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    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}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<NetworkInterfaceInner> 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}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<NetworkInterfaceInner> 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 {@link SyncPoller} for polling of the running status of the Network Interface.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<InterfaceStatusInner>, InterfaceStatusInner> beginGetStatus(
        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 {@link SyncPoller} for polling of the running status of the Network Interface.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<InterfaceStatusInner>, InterfaceStatusInner> beginGetStatus(
        String resourceGroupName, String networkDeviceName, String networkInterfaceName, 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    InterfaceStatusInner 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    InterfaceStatusInner 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.
     * @return the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginUpdateAdministrativeState(
        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.
     * @return the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginUpdateAdministrativeState(
        String resourceGroupName,
        String networkDeviceName,
        String networkInterfaceName,
        UpdateAdministrativeState body,
        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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void updateAdministrativeState(
        String resourceGroupName,
        String networkDeviceName,
        String networkInterfaceName,
        UpdateAdministrativeState body,
        Context context);
}
