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

package com.azure.resourcemanager.recoveryservicessiterecovery.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 ReplicationRecoveryServicesProviders. */
public interface ReplicationRecoveryServicesProviders {
    /**
     * Gets the list of registered recovery services providers for the fabric.
     *
     * <p>Lists the registered recovery services providers for the specified fabric.
     *
     * @param resourceName The name of the recovery services vault.
     * @param resourceGroupName The name of the resource group where the recovery services vault is present.
     * @param fabricName Fabric 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 collection of providers as paginated response with {@link PagedIterable}.
     */
    PagedIterable<RecoveryServicesProvider> listByReplicationFabrics(
        String resourceName, String resourceGroupName, String fabricName);

    /**
     * Gets the list of registered recovery services providers for the fabric.
     *
     * <p>Lists the registered recovery services providers for the specified fabric.
     *
     * @param resourceName The name of the recovery services vault.
     * @param resourceGroupName The name of the resource group where the recovery services vault is present.
     * @param fabricName Fabric 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 collection of providers as paginated response with {@link PagedIterable}.
     */
    PagedIterable<RecoveryServicesProvider> listByReplicationFabrics(
        String resourceName, String resourceGroupName, String fabricName, Context context);

    /**
     * Gets the details of a recovery services provider.
     *
     * <p>Gets the details of registered recovery services provider.
     *
     * @param resourceName The name of the recovery services vault.
     * @param resourceGroupName The name of the resource group where the recovery services vault is present.
     * @param fabricName Fabric name.
     * @param providerName Recovery services provider 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 details of registered recovery services provider along with {@link Response}.
     */
    Response<RecoveryServicesProvider> getWithResponse(
        String resourceName, String resourceGroupName, String fabricName, String providerName, Context context);

    /**
     * Gets the details of a recovery services provider.
     *
     * <p>Gets the details of registered recovery services provider.
     *
     * @param resourceName The name of the recovery services vault.
     * @param resourceGroupName The name of the resource group where the recovery services vault is present.
     * @param fabricName Fabric name.
     * @param providerName Recovery services provider 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 details of registered recovery services provider.
     */
    RecoveryServicesProvider get(String resourceName, String resourceGroupName, String fabricName, String providerName);

    /**
     * Purges recovery service provider from fabric.
     *
     * <p>The operation to purge(force delete) a recovery services provider from the vault.
     *
     * @param resourceName The name of the recovery services vault.
     * @param resourceGroupName The name of the resource group where the recovery services vault is present.
     * @param fabricName Fabric name.
     * @param providerName Recovery services provider 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 purge(String resourceName, String resourceGroupName, String fabricName, String providerName);

    /**
     * Purges recovery service provider from fabric.
     *
     * <p>The operation to purge(force delete) a recovery services provider from the vault.
     *
     * @param resourceName The name of the recovery services vault.
     * @param resourceGroupName The name of the resource group where the recovery services vault is present.
     * @param fabricName Fabric name.
     * @param providerName Recovery services provider 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.
     */
    void purge(String resourceName, String resourceGroupName, String fabricName, String providerName, Context context);

    /**
     * Refresh details from the recovery services provider.
     *
     * <p>The operation to refresh the information from the recovery services provider.
     *
     * @param resourceName The name of the recovery services vault.
     * @param resourceGroupName The name of the resource group where the recovery services vault is present.
     * @param fabricName Fabric name.
     * @param providerName Recovery services provider 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 provider details.
     */
    RecoveryServicesProvider refreshProvider(
        String resourceName, String resourceGroupName, String fabricName, String providerName);

    /**
     * Refresh details from the recovery services provider.
     *
     * <p>The operation to refresh the information from the recovery services provider.
     *
     * @param resourceName The name of the recovery services vault.
     * @param resourceGroupName The name of the resource group where the recovery services vault is present.
     * @param fabricName Fabric name.
     * @param providerName Recovery services provider 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 provider details.
     */
    RecoveryServicesProvider refreshProvider(
        String resourceName, String resourceGroupName, String fabricName, String providerName, Context context);

    /**
     * Deletes provider from fabric. Note: Deleting provider for any fabric other than SingleHost is unsupported. To
     * maintain backward compatibility for released clients the object "deleteRspInput" is used (if the object is empty
     * we assume that it is old client and continue the old behavior).
     *
     * <p>The operation to removes/delete(unregister) a recovery services provider from the vault.
     *
     * @param resourceName The name of the recovery services vault.
     * @param resourceGroupName The name of the resource group where the recovery services vault is present.
     * @param fabricName Fabric name.
     * @param providerName Recovery services provider 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 delete(String resourceName, String resourceGroupName, String fabricName, String providerName);

    /**
     * Deletes provider from fabric. Note: Deleting provider for any fabric other than SingleHost is unsupported. To
     * maintain backward compatibility for released clients the object "deleteRspInput" is used (if the object is empty
     * we assume that it is old client and continue the old behavior).
     *
     * <p>The operation to removes/delete(unregister) a recovery services provider from the vault.
     *
     * @param resourceName The name of the recovery services vault.
     * @param resourceGroupName The name of the resource group where the recovery services vault is present.
     * @param fabricName Fabric name.
     * @param providerName Recovery services provider 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.
     */
    void delete(String resourceName, String resourceGroupName, String fabricName, String providerName, Context context);

    /**
     * Gets the list of registered recovery services providers in the vault. This is a view only api.
     *
     * <p>Lists the registered recovery services providers in the vault.
     *
     * @param resourceName The name of the recovery services vault.
     * @param resourceGroupName The name of the resource group where the recovery services vault is present.
     * @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 collection of providers as paginated response with {@link PagedIterable}.
     */
    PagedIterable<RecoveryServicesProvider> list(String resourceName, String resourceGroupName);

    /**
     * Gets the list of registered recovery services providers in the vault. This is a view only api.
     *
     * <p>Lists the registered recovery services providers in the vault.
     *
     * @param resourceName The name of the recovery services vault.
     * @param resourceGroupName The name of the resource group where the recovery services vault is present.
     * @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 collection of providers as paginated response with {@link PagedIterable}.
     */
    PagedIterable<RecoveryServicesProvider> list(String resourceName, String resourceGroupName, Context context);

    /**
     * Gets the details of a recovery services provider.
     *
     * <p>Gets the details of registered recovery services provider.
     *
     * @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 details of registered recovery services provider along with {@link Response}.
     */
    RecoveryServicesProvider getById(String id);

    /**
     * Gets the details of a recovery services provider.
     *
     * <p>Gets the details of registered recovery services provider.
     *
     * @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 details of registered recovery services provider along with {@link Response}.
     */
    Response<RecoveryServicesProvider> getByIdWithResponse(String id, Context context);

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