// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.network.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedFlux;
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.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.network.fluent.models.InterfaceEndpointInner;
import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete;
import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet;
import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing;
import java.nio.ByteBuffer;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/** An instance of this class provides access to all the operations defined in InterfaceEndpointsClient. */
public interface InterfaceEndpointsClient
    extends InnerSupportsGet<InterfaceEndpointInner>,
        InnerSupportsListing<InterfaceEndpointInner>,
        InnerSupportsDelete<Void> {
    /**
     * Deletes the specified interface endpoint.
     *
     * @param resourceGroupName The name of the resource group.
     * @param interfaceEndpointName The name of the interface endpoint.
     * @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 completion.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String interfaceEndpointName);

    /**
     * Deletes the specified interface endpoint.
     *
     * @param resourceGroupName The name of the resource group.
     * @param interfaceEndpointName The name of the interface endpoint.
     * @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 completion.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String interfaceEndpointName);

    /**
     * Deletes the specified interface endpoint.
     *
     * @param resourceGroupName The name of the resource group.
     * @param interfaceEndpointName The name of the interface endpoint.
     * @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 completion.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String interfaceEndpointName);

    /**
     * Deletes the specified interface endpoint.
     *
     * @param resourceGroupName The name of the resource group.
     * @param interfaceEndpointName The name of the interface endpoint.
     * @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 completion.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SyncPoller<PollResult<Void>, Void> beginDelete(
        String resourceGroupName, String interfaceEndpointName, Context context);

    /**
     * Deletes the specified interface endpoint.
     *
     * @param resourceGroupName The name of the resource group.
     * @param interfaceEndpointName The name of the interface endpoint.
     * @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 completion.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<Void> deleteAsync(String resourceGroupName, String interfaceEndpointName);

    /**
     * Deletes the specified interface endpoint.
     *
     * @param resourceGroupName The name of the resource group.
     * @param interfaceEndpointName The name of the interface endpoint.
     * @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 interfaceEndpointName);

    /**
     * Deletes the specified interface endpoint.
     *
     * @param resourceGroupName The name of the resource group.
     * @param interfaceEndpointName The name of the interface endpoint.
     * @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 interfaceEndpointName, Context context);

    /**
     * Gets the specified interface endpoint by resource group.
     *
     * @param resourceGroupName The name of the resource group.
     * @param interfaceEndpointName The name of the interface endpoint.
     * @param expand Expands referenced resources.
     * @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 specified interface endpoint by resource group.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<Response<InterfaceEndpointInner>> getByResourceGroupWithResponseAsync(
        String resourceGroupName, String interfaceEndpointName, String expand);

    /**
     * Gets the specified interface endpoint by resource group.
     *
     * @param resourceGroupName The name of the resource group.
     * @param interfaceEndpointName The name of the interface endpoint.
     * @param expand Expands referenced resources.
     * @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 specified interface endpoint by resource group.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<InterfaceEndpointInner> getByResourceGroupAsync(
        String resourceGroupName, String interfaceEndpointName, String expand);

    /**
     * Gets the specified interface endpoint by resource group.
     *
     * @param resourceGroupName The name of the resource group.
     * @param interfaceEndpointName The name of the interface endpoint.
     * @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 specified interface endpoint by resource group.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<InterfaceEndpointInner> getByResourceGroupAsync(String resourceGroupName, String interfaceEndpointName);

    /**
     * Gets the specified interface endpoint by resource group.
     *
     * @param resourceGroupName The name of the resource group.
     * @param interfaceEndpointName The name of the interface endpoint.
     * @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 specified interface endpoint by resource group.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    InterfaceEndpointInner getByResourceGroup(String resourceGroupName, String interfaceEndpointName);

    /**
     * Gets the specified interface endpoint by resource group.
     *
     * @param resourceGroupName The name of the resource group.
     * @param interfaceEndpointName The name of the interface endpoint.
     * @param expand Expands referenced resources.
     * @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 specified interface endpoint by resource group.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<InterfaceEndpointInner> getByResourceGroupWithResponse(
        String resourceGroupName, String interfaceEndpointName, String expand, Context context);

    /**
     * Creates or updates an interface endpoint in the specified resource group.
     *
     * @param resourceGroupName The name of the resource group.
     * @param interfaceEndpointName The name of the interface endpoint.
     * @param parameters Parameters supplied to the create or update interface endpoint 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 interface endpoint resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(
        String resourceGroupName, String interfaceEndpointName, InterfaceEndpointInner parameters);

    /**
     * Creates or updates an interface endpoint in the specified resource group.
     *
     * @param resourceGroupName The name of the resource group.
     * @param interfaceEndpointName The name of the interface endpoint.
     * @param parameters Parameters supplied to the create or update interface endpoint 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 interface endpoint resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    PollerFlux<PollResult<InterfaceEndpointInner>, InterfaceEndpointInner> beginCreateOrUpdateAsync(
        String resourceGroupName, String interfaceEndpointName, InterfaceEndpointInner parameters);

    /**
     * Creates or updates an interface endpoint in the specified resource group.
     *
     * @param resourceGroupName The name of the resource group.
     * @param interfaceEndpointName The name of the interface endpoint.
     * @param parameters Parameters supplied to the create or update interface endpoint 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 interface endpoint resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SyncPoller<PollResult<InterfaceEndpointInner>, InterfaceEndpointInner> beginCreateOrUpdate(
        String resourceGroupName, String interfaceEndpointName, InterfaceEndpointInner parameters);

    /**
     * Creates or updates an interface endpoint in the specified resource group.
     *
     * @param resourceGroupName The name of the resource group.
     * @param interfaceEndpointName The name of the interface endpoint.
     * @param parameters Parameters supplied to the create or update interface endpoint operation.
     * @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 interface endpoint resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SyncPoller<PollResult<InterfaceEndpointInner>, InterfaceEndpointInner> beginCreateOrUpdate(
        String resourceGroupName, String interfaceEndpointName, InterfaceEndpointInner parameters, Context context);

    /**
     * Creates or updates an interface endpoint in the specified resource group.
     *
     * @param resourceGroupName The name of the resource group.
     * @param interfaceEndpointName The name of the interface endpoint.
     * @param parameters Parameters supplied to the create or update interface endpoint 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 interface endpoint resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<InterfaceEndpointInner> createOrUpdateAsync(
        String resourceGroupName, String interfaceEndpointName, InterfaceEndpointInner parameters);

    /**
     * Creates or updates an interface endpoint in the specified resource group.
     *
     * @param resourceGroupName The name of the resource group.
     * @param interfaceEndpointName The name of the interface endpoint.
     * @param parameters Parameters supplied to the create or update interface endpoint 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 interface endpoint resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    InterfaceEndpointInner createOrUpdate(
        String resourceGroupName, String interfaceEndpointName, InterfaceEndpointInner parameters);

    /**
     * Creates or updates an interface endpoint in the specified resource group.
     *
     * @param resourceGroupName The name of the resource group.
     * @param interfaceEndpointName The name of the interface endpoint.
     * @param parameters Parameters supplied to the create or update interface endpoint operation.
     * @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 interface endpoint resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    InterfaceEndpointInner createOrUpdate(
        String resourceGroupName, String interfaceEndpointName, InterfaceEndpointInner parameters, Context context);

    /**
     * Gets all interface endpoints in a resource group.
     *
     * @param resourceGroupName The name of the resource group.
     * @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 all interface endpoints in a resource group.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedFlux<InterfaceEndpointInner> listByResourceGroupAsync(String resourceGroupName);

    /**
     * Gets all interface endpoints in a resource group.
     *
     * @param resourceGroupName The name of the resource group.
     * @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 all interface endpoints in a resource group.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<InterfaceEndpointInner> listByResourceGroup(String resourceGroupName);

    /**
     * Gets all interface endpoints in a resource group.
     *
     * @param resourceGroupName The name of the resource group.
     * @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 all interface endpoints in a resource group.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<InterfaceEndpointInner> listByResourceGroup(String resourceGroupName, Context context);

    /**
     * Gets all interface endpoints in a 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 all interface endpoints in a subscription.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedFlux<InterfaceEndpointInner> listAsync();

    /**
     * Gets all interface endpoints in a 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 all interface endpoints in a subscription.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<InterfaceEndpointInner> list();

    /**
     * Gets all interface endpoints in a 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 all interface endpoints in a subscription.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<InterfaceEndpointInner> list(Context context);
}
