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

/** Resource collection API of NetworkDevices. */
public interface NetworkDevices {
    /**
     * Gets a Network Device.
     *
     * <p>Get the Network Device resource details.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkDeviceName Name of the Network Device.
     * @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 Device resource details along with {@link Response}.
     */
    Response<NetworkDevice> getByResourceGroupWithResponse(
        String resourceGroupName, String networkDeviceName, Context context);

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

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

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

    /**
     * List NetworkDevices by resource group.
     *
     * <p>List all the Network Device resources in a given resource group.
     *
     * @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 NetworkDevices as paginated response with {@link PagedIterable}.
     */
    PagedIterable<NetworkDevice> listByResourceGroup(String resourceGroupName);

    /**
     * List NetworkDevices by resource group.
     *
     * <p>List all the Network Device resources in a given resource group.
     *
     * @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 NetworkDevices as paginated response with {@link PagedIterable}.
     */
    PagedIterable<NetworkDevice> listByResourceGroup(String resourceGroupName, Context context);

    /**
     * List NetworkDevices by subscription.
     *
     * <p>List all the Network Device resources in a given subscription.
     *
     * @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 NetworkDevices as paginated response with {@link PagedIterable}.
     */
    PagedIterable<NetworkDevice> list();

    /**
     * List NetworkDevices by subscription.
     *
     * <p>List all the Network Device resources in a given subscription.
     *
     * @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 NetworkDevices as paginated response with {@link PagedIterable}.
     */
    PagedIterable<NetworkDevice> list(Context context);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Reboot the Network Device.
     *
     * @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.
     */
    void reboot(String resourceGroupName, String networkDeviceName);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Reboot the Network Device.
     *
     * @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.
     */
    void reboot(String resourceGroupName, String networkDeviceName, Context context);

    /**
     * Restores the configuration to last applied good configuration from Azure.
     *
     * <p>Restore the configuration of the Network Device resource to last known good configuration.
     *
     * @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.
     */
    void restoreConfig(String resourceGroupName, String networkDeviceName);

    /**
     * Restores the configuration to last applied good configuration from Azure.
     *
     * <p>Restore the configuration of the Network Device resource to last known good configuration.
     *
     * @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.
     */
    void restoreConfig(String resourceGroupName, String networkDeviceName, Context context);

    /**
     * Implements SKU version upgrade of network device.
     *
     * <p>Update the SKU version of the Network Device resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkDeviceName Name of the NetworkDevice.
     * @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 updateVersion(String resourceGroupName, String networkDeviceName, UpdateVersionProperties body);

    /**
     * Implements SKU version upgrade of network device.
     *
     * <p>Update the SKU version of the Network Device resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkDeviceName Name of the NetworkDevice.
     * @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 updateVersion(
        String resourceGroupName, String networkDeviceName, UpdateVersionProperties body, Context context);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Generate Support Package for the given Network Device.
     *
     * @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 generate support package post action properties.
     */
    SupportPackageProperties generateSupportPackage(String resourceGroupName, String networkDeviceName);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Generate Support Package for the given Network Device.
     *
     * @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 generate support package post action properties.
     */
    SupportPackageProperties generateSupportPackage(
        String resourceGroupName, String networkDeviceName, Context context);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Update PDU power cycle of the Network Device.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkDeviceName Name of the NetworkDevice.
     * @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 updatePowerCycle(String resourceGroupName, String networkDeviceName, UpdatePowerCycleProperties body);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Update PDU power cycle of the Network Device.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkDeviceName Name of the NetworkDevice.
     * @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 updatePowerCycle(
        String resourceGroupName, String networkDeviceName, UpdatePowerCycleProperties body, Context context);

    /**
     * Gets the running status of the network device.
     *
     * <p>Get the running status of the Network Device.
     *
     * @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 the running status of the Network Device.
     */
    GetDeviceStatusProperties getStatus(String resourceGroupName, String networkDeviceName);

    /**
     * Gets the running status of the network device.
     *
     * <p>Get the running status of the Network Device.
     *
     * @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 the running status of the Network Device.
     */
    GetDeviceStatusProperties getStatus(String resourceGroupName, String networkDeviceName, Context context);

    /**
     * Show the interface maps as per the topology.
     *
     * <p>Get the static interface maps for the given Network Device.
     *
     * @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 the static interface maps for the given Network Device.
     */
    List<GetStaticInterfaceMapsPropertiesItem> getStaticInterfaceMaps(
        String resourceGroupName, String networkDeviceName);

    /**
     * Show the interface maps as per the topology.
     *
     * <p>Get the static interface maps for the given Network Device.
     *
     * @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 the static interface maps for the given Network Device.
     */
    List<GetStaticInterfaceMapsPropertiesItem> getStaticInterfaceMaps(
        String resourceGroupName, String networkDeviceName, Context context);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Get the dynamic interface maps for the given Network Device.
     *
     * @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 the dynamic interface maps for the given Network Device.
     */
    List<GetDynamicInterfaceMapsPropertiesItem> getDynamicInterfaceMaps(
        String resourceGroupName, String networkDeviceName);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Get the dynamic interface maps for the given Network Device.
     *
     * @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 the dynamic interface maps for the given Network Device.
     */
    List<GetDynamicInterfaceMapsPropertiesItem> getDynamicInterfaceMaps(
        String resourceGroupName, String networkDeviceName, Context context);

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

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

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