// 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.NetworkFabricInner;
import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatchParameters;

/** An instance of this class provides access to all the operations defined in NetworkFabricsClient. */
public interface NetworkFabricsClient {
    /**
     * Create Network Fabric.
     *
     * <p>Create Network Fabric resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the Network Fabric.
     * @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 the NetworkFabric resource definition.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<NetworkFabricInner>, NetworkFabricInner> beginCreate(
        String resourceGroupName, String networkFabricName, NetworkFabricInner body);

    /**
     * Create Network Fabric.
     *
     * <p>Create Network Fabric resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the Network Fabric.
     * @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 the NetworkFabric resource definition.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<NetworkFabricInner>, NetworkFabricInner> beginCreate(
        String resourceGroupName, String networkFabricName, NetworkFabricInner body, Context context);

    /**
     * Create Network Fabric.
     *
     * <p>Create Network Fabric resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the Network Fabric.
     * @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 NetworkFabric resource definition.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    NetworkFabricInner create(String resourceGroupName, String networkFabricName, NetworkFabricInner body);

    /**
     * Create Network Fabric.
     *
     * <p>Create Network Fabric resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the Network Fabric.
     * @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 NetworkFabric resource definition.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    NetworkFabricInner create(
        String resourceGroupName, String networkFabricName, NetworkFabricInner body, Context context);

    /**
     * Gets a Network Fabric.
     *
     * <p>Get Network Fabric resource details.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the Network Fabric.
     * @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 network Fabric resource details along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<NetworkFabricInner> getByResourceGroupWithResponse(
        String resourceGroupName, String networkFabricName, Context context);

    /**
     * Gets a Network Fabric.
     *
     * <p>Get Network Fabric resource details.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the Network Fabric.
     * @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 network Fabric resource details.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    NetworkFabricInner getByResourceGroup(String resourceGroupName, String networkFabricName);

    /**
     * Updates a Network Fabric.
     *
     * <p>Update certain properties of the Network Fabric resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the Network Fabric.
     * @param body Network Fabric 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 {@link SyncPoller} for polling of the NetworkFabric resource definition.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<NetworkFabricInner>, NetworkFabricInner> beginUpdate(
        String resourceGroupName, String networkFabricName, NetworkFabricPatchParameters body);

    /**
     * Updates a Network Fabric.
     *
     * <p>Update certain properties of the Network Fabric resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the Network Fabric.
     * @param body Network Fabric 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 {@link SyncPoller} for polling of the NetworkFabric resource definition.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<NetworkFabricInner>, NetworkFabricInner> beginUpdate(
        String resourceGroupName, String networkFabricName, NetworkFabricPatchParameters body, Context context);

    /**
     * Updates a Network Fabric.
     *
     * <p>Update certain properties of the Network Fabric resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the Network Fabric.
     * @param body Network Fabric 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 NetworkFabric resource definition.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    NetworkFabricInner update(String resourceGroupName, String networkFabricName, NetworkFabricPatchParameters body);

    /**
     * Updates a Network Fabric.
     *
     * <p>Update certain properties of the Network Fabric resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the Network Fabric.
     * @param body Network Fabric 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 NetworkFabric resource definition.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    NetworkFabricInner update(
        String resourceGroupName, String networkFabricName, NetworkFabricPatchParameters body, Context context);

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

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

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

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

    /**
     * List NetworkFabrics by resource group.
     *
     * <p>List all the Network Fabric resources in the 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 NetworkFabrics as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<NetworkFabricInner> listByResourceGroup(String resourceGroupName);

    /**
     * List NetworkFabrics by resource group.
     *
     * <p>List all the Network Fabric resources in the 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 NetworkFabrics as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<NetworkFabricInner> listByResourceGroup(String resourceGroupName, Context context);

    /**
     * List NetworkFabrics by subscription.
     *
     * <p>List all the Network Fabric resources in the 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 NetworkFabrics as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<NetworkFabricInner> list();

    /**
     * List NetworkFabrics by subscription.
     *
     * <p>List all the Network Fabric resources in the 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 NetworkFabrics as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<NetworkFabricInner> list(Context context);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Provisions the underlying resources in the given Network Fabric instance.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the NetworkFabric.
     * @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> beginProvision(String resourceGroupName, String networkFabricName);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Provisions the underlying resources in the given Network Fabric instance.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the NetworkFabric.
     * @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> beginProvision(
        String resourceGroupName, String networkFabricName, Context context);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Provisions the underlying resources in the given Network Fabric instance.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the NetworkFabric.
     * @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 provision(String resourceGroupName, String networkFabricName);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Provisions the underlying resources in the given Network Fabric instance.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the NetworkFabric.
     * @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 provision(String resourceGroupName, String networkFabricName, Context context);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Deprovisions the underlying resources in the given Network Fabric instance.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the NetworkFabric.
     * @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> beginDeprovision(String resourceGroupName, String networkFabricName);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Deprovisions the underlying resources in the given Network Fabric instance.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the NetworkFabric.
     * @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> beginDeprovision(
        String resourceGroupName, String networkFabricName, Context context);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Deprovisions the underlying resources in the given Network Fabric instance.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the NetworkFabric.
     * @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 deprovision(String resourceGroupName, String networkFabricName);

    /**
     * Implements the operation to the underlying resources.
     *
     * <p>Deprovisions the underlying resources in the given Network Fabric instance.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the NetworkFabric.
     * @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 deprovision(String resourceGroupName, String networkFabricName, Context context);
}
