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

package com.azure.resourcemanager.hybridconnectivity.models;

import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;

/** Resource collection API of Endpoints. */
public interface Endpoints {
    /**
     * List of endpoints to the target resource.
     *
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
     * @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 list of endpoints as paginated response with {@link PagedIterable}.
     */
    PagedIterable<EndpointResource> list(String resourceUri);

    /**
     * List of endpoints to the target resource.
     *
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
     * @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 list of endpoints as paginated response with {@link PagedIterable}.
     */
    PagedIterable<EndpointResource> list(String resourceUri, Context context);

    /**
     * Gets the endpoint to the resource.
     *
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
     * @param endpointName The endpoint name.
     * @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 endpoint to the resource along with {@link Response}.
     */
    Response<EndpointResource> getWithResponse(String resourceUri, String endpointName, Context context);

    /**
     * Gets the endpoint to the resource.
     *
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
     * @param endpointName The endpoint name.
     * @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 endpoint to the resource.
     */
    EndpointResource get(String resourceUri, String endpointName);

    /**
     * Deletes the endpoint access to the target resource.
     *
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
     * @param endpointName The endpoint name.
     * @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 Response}.
     */
    Response<Void> deleteByResourceGroupWithResponse(String resourceUri, String endpointName, Context context);

    /**
     * Deletes the endpoint access to the target resource.
     *
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
     * @param endpointName The endpoint name.
     * @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 resourceUri, String endpointName);

    /**
     * Gets the endpoint access credentials to the resource.
     *
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
     * @param endpointName The endpoint name.
     * @param expiresin The is how long the endpoint access token is valid (in seconds).
     * @param listCredentialsRequest Object of type ListCredentialsRequest.
     * @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 endpoint access credentials to the resource along with {@link Response}.
     */
    Response<EndpointAccessResource> listCredentialsWithResponse(
        String resourceUri,
        String endpointName,
        Long expiresin,
        ListCredentialsRequest listCredentialsRequest,
        Context context);

    /**
     * Gets the endpoint access credentials to the resource.
     *
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
     * @param endpointName The endpoint name.
     * @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 endpoint access credentials to the resource.
     */
    EndpointAccessResource listCredentials(String resourceUri, String endpointName);

    /**
     * Gets the ingress gateway endpoint credentials.
     *
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
     * @param endpointName The endpoint name.
     * @param expiresin The is how long the endpoint access token is valid (in seconds).
     * @param listIngressGatewayCredentialsRequest Object of type ListIngressGatewayCredentialsRequest.
     * @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 ingress gateway endpoint credentials along with {@link Response}.
     */
    Response<IngressGatewayResource> listIngressGatewayCredentialsWithResponse(
        String resourceUri,
        String endpointName,
        Long expiresin,
        ListIngressGatewayCredentialsRequest listIngressGatewayCredentialsRequest,
        Context context);

    /**
     * Gets the ingress gateway endpoint credentials.
     *
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
     * @param endpointName The endpoint name.
     * @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 ingress gateway endpoint credentials.
     */
    IngressGatewayResource listIngressGatewayCredentials(String resourceUri, String endpointName);

    /**
     * Fetches the managed proxy details.
     *
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
     * @param endpointName The endpoint name.
     * @param managedProxyRequest Object of type ManagedProxyRequest.
     * @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 managed Proxy along with {@link Response}.
     */
    Response<ManagedProxyResource> listManagedProxyDetailsWithResponse(
        String resourceUri, String endpointName, ManagedProxyRequest managedProxyRequest, Context context);

    /**
     * Fetches the managed proxy details.
     *
     * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
     * @param endpointName The endpoint name.
     * @param managedProxyRequest Object of type ManagedProxyRequest.
     * @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 managed Proxy.
     */
    ManagedProxyResource listManagedProxyDetails(
        String resourceUri, String endpointName, ManagedProxyRequest managedProxyRequest);

    /**
     * Gets the endpoint to the 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.
     * @return the endpoint to the resource along with {@link Response}.
     */
    EndpointResource getById(String id);

    /**
     * Gets the endpoint to the 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.
     * @return the endpoint to the resource along with {@link Response}.
     */
    Response<EndpointResource> getByIdWithResponse(String id, Context context);

    /**
     * Deletes the endpoint access to the target 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 the endpoint access to the target 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.
     * @return the {@link Response}.
     */
    Response<Void> deleteByIdWithResponse(String id, Context context);

    /**
     * Begins definition for a new EndpointResource resource.
     *
     * @param name resource name.
     * @return the first stage of the new EndpointResource definition.
     */
    EndpointResource.DefinitionStages.Blank define(String name);
}
