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

/** An instance of this class provides access to all the operations defined in NetworkToNetworkInterconnectsClient. */
public interface NetworkToNetworkInterconnectsClient {
    /**
     * Configuration used to setup CE-PE connectivity.
     *
     * <p>Configuration used to setup CE-PE connectivity PUT Method.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the NetworkFabric.
     * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName.
     * @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 NetworkToNetworkInterconnect resource definition.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<NetworkToNetworkInterconnectInner>, NetworkToNetworkInterconnectInner> beginCreate(
        String resourceGroupName,
        String networkFabricName,
        String networkToNetworkInterconnectName,
        NetworkToNetworkInterconnectInner body);

    /**
     * Configuration used to setup CE-PE connectivity.
     *
     * <p>Configuration used to setup CE-PE connectivity PUT Method.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the NetworkFabric.
     * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName.
     * @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 NetworkToNetworkInterconnect resource definition.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<NetworkToNetworkInterconnectInner>, NetworkToNetworkInterconnectInner> beginCreate(
        String resourceGroupName,
        String networkFabricName,
        String networkToNetworkInterconnectName,
        NetworkToNetworkInterconnectInner body,
        Context context);

    /**
     * Configuration used to setup CE-PE connectivity.
     *
     * <p>Configuration used to setup CE-PE connectivity PUT Method.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the NetworkFabric.
     * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName.
     * @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 NetworkToNetworkInterconnect resource definition.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    NetworkToNetworkInterconnectInner create(
        String resourceGroupName,
        String networkFabricName,
        String networkToNetworkInterconnectName,
        NetworkToNetworkInterconnectInner body);

    /**
     * Configuration used to setup CE-PE connectivity.
     *
     * <p>Configuration used to setup CE-PE connectivity PUT Method.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the NetworkFabric.
     * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName.
     * @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 NetworkToNetworkInterconnect resource definition.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    NetworkToNetworkInterconnectInner create(
        String resourceGroupName,
        String networkFabricName,
        String networkToNetworkInterconnectName,
        NetworkToNetworkInterconnectInner body,
        Context context);

    /**
     * Configuration used to setup CE-PE connectivity.
     *
     * <p>Implements NetworkToNetworkInterconnects GET method.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the NetworkFabric.
     * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnect.
     * @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 NetworkToNetworkInterconnect resource definition along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<NetworkToNetworkInterconnectInner> getWithResponse(
        String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, Context context);

    /**
     * Configuration used to setup CE-PE connectivity.
     *
     * <p>Implements NetworkToNetworkInterconnects GET method.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the NetworkFabric.
     * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnect.
     * @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 NetworkToNetworkInterconnect resource definition.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    NetworkToNetworkInterconnectInner get(
        String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName);

    /**
     * Deletes a NetworkToNetworkInterconnects.
     *
     * <p>Implements NetworkToNetworkInterconnects DELETE method.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the NetworkFabric.
     * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName.
     * @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, String networkToNetworkInterconnectName);

    /**
     * Deletes a NetworkToNetworkInterconnects.
     *
     * <p>Implements NetworkToNetworkInterconnects DELETE method.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the NetworkFabric.
     * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName.
     * @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, String networkToNetworkInterconnectName, Context context);

    /**
     * Deletes a NetworkToNetworkInterconnects.
     *
     * <p>Implements NetworkToNetworkInterconnects DELETE method.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the NetworkFabric.
     * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName.
     * @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, String networkToNetworkInterconnectName);

    /**
     * Deletes a NetworkToNetworkInterconnects.
     *
     * <p>Implements NetworkToNetworkInterconnects DELETE method.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param networkFabricName Name of the NetworkFabric.
     * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName.
     * @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, String networkToNetworkInterconnectName, Context context);

    /**
     * Executes list operation to display Network To Network Interconnects within a Network Fabric.
     *
     * <p>Implements Network To Network Interconnects list by Network Fabric GET method.
     *
     * @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 list of NetworkToNetworkInterconnects as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<NetworkToNetworkInterconnectInner> list(String resourceGroupName, String networkFabricName);

    /**
     * Executes list operation to display Network To Network Interconnects within a Network Fabric.
     *
     * <p>Implements Network To Network Interconnects list by Network Fabric GET method.
     *
     * @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 list of NetworkToNetworkInterconnects as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<NetworkToNetworkInterconnectInner> list(
        String resourceGroupName, String networkFabricName, Context context);
}
