// 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 ReplicationRecoveryPlans. */
public interface ReplicationRecoveryPlans {
    /**
     * Gets the list of recovery plans.
     *
     * <p>Lists the recovery plans 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 recovery plan collection details as paginated response with {@link PagedIterable}.
     */
    PagedIterable<RecoveryPlan> list(String resourceName, String resourceGroupName);

    /**
     * Gets the list of recovery plans.
     *
     * <p>Lists the recovery plans 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 recovery plan collection details as paginated response with {@link PagedIterable}.
     */
    PagedIterable<RecoveryPlan> list(String resourceName, String resourceGroupName, Context context);

    /**
     * Gets the requested recovery plan.
     *
     * <p>Gets the details of the recovery plan.
     *
     * @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 recoveryPlanName Name of the recovery plan.
     * @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 the recovery plan along with {@link Response}.
     */
    Response<RecoveryPlan> getWithResponse(
        String resourceName, String resourceGroupName, String recoveryPlanName, Context context);

    /**
     * Gets the requested recovery plan.
     *
     * <p>Gets the details of the recovery plan.
     *
     * @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 recoveryPlanName Name of the recovery plan.
     * @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 the recovery plan.
     */
    RecoveryPlan get(String resourceName, String resourceGroupName, String recoveryPlanName);

    /**
     * Deletes the specified recovery plan.
     *
     * <p>Delete a recovery plan.
     *
     * @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 recoveryPlanName Recovery plan 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 recoveryPlanName);

    /**
     * Deletes the specified recovery plan.
     *
     * <p>Delete a recovery plan.
     *
     * @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 recoveryPlanName Recovery plan 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 recoveryPlanName, Context context);

    /**
     * Execute cancel failover of the recovery plan.
     *
     * <p>The operation to cancel the failover of a recovery plan.
     *
     * @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 recoveryPlanName Recovery plan 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 recovery plan details.
     */
    RecoveryPlan failoverCancel(String resourceName, String resourceGroupName, String recoveryPlanName);

    /**
     * Execute cancel failover of the recovery plan.
     *
     * <p>The operation to cancel the failover of a recovery plan.
     *
     * @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 recoveryPlanName Recovery plan 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 recovery plan details.
     */
    RecoveryPlan failoverCancel(
        String resourceName, String resourceGroupName, String recoveryPlanName, Context context);

    /**
     * Execute commit failover of the recovery plan.
     *
     * <p>The operation to commit the failover of a recovery plan.
     *
     * @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 recoveryPlanName Recovery plan 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 recovery plan details.
     */
    RecoveryPlan failoverCommit(String resourceName, String resourceGroupName, String recoveryPlanName);

    /**
     * Execute commit failover of the recovery plan.
     *
     * <p>The operation to commit the failover of a recovery plan.
     *
     * @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 recoveryPlanName Recovery plan 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 recovery plan details.
     */
    RecoveryPlan failoverCommit(
        String resourceName, String resourceGroupName, String recoveryPlanName, Context context);

    /**
     * Execute planned failover of the recovery plan.
     *
     * <p>The operation to start the planned failover of a recovery plan.
     *
     * @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 recoveryPlanName Recovery plan name.
     * @param input Failover input.
     * @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 recovery plan details.
     */
    RecoveryPlan plannedFailover(
        String resourceName, String resourceGroupName, String recoveryPlanName, RecoveryPlanPlannedFailoverInput input);

    /**
     * Execute planned failover of the recovery plan.
     *
     * <p>The operation to start the planned failover of a recovery plan.
     *
     * @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 recoveryPlanName Recovery plan name.
     * @param input Failover input.
     * @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 recovery plan details.
     */
    RecoveryPlan plannedFailover(
        String resourceName,
        String resourceGroupName,
        String recoveryPlanName,
        RecoveryPlanPlannedFailoverInput input,
        Context context);

    /**
     * Execute reprotect of the recovery plan.
     *
     * <p>The operation to reprotect(reverse replicate) a recovery plan.
     *
     * @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 recoveryPlanName Recovery plan 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 recovery plan details.
     */
    RecoveryPlan reprotect(String resourceName, String resourceGroupName, String recoveryPlanName);

    /**
     * Execute reprotect of the recovery plan.
     *
     * <p>The operation to reprotect(reverse replicate) a recovery plan.
     *
     * @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 recoveryPlanName Recovery plan 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 recovery plan details.
     */
    RecoveryPlan reprotect(String resourceName, String resourceGroupName, String recoveryPlanName, Context context);

    /**
     * Execute test failover of the recovery plan.
     *
     * <p>The operation to start the test failover of a recovery plan.
     *
     * @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 recoveryPlanName Recovery plan name.
     * @param input Recovery plan test failover input.
     * @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 recovery plan details.
     */
    RecoveryPlan testFailover(
        String resourceName, String resourceGroupName, String recoveryPlanName, RecoveryPlanTestFailoverInput input);

    /**
     * Execute test failover of the recovery plan.
     *
     * <p>The operation to start the test failover of a recovery plan.
     *
     * @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 recoveryPlanName Recovery plan name.
     * @param input Recovery plan test failover input.
     * @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 recovery plan details.
     */
    RecoveryPlan testFailover(
        String resourceName,
        String resourceGroupName,
        String recoveryPlanName,
        RecoveryPlanTestFailoverInput input,
        Context context);

    /**
     * Execute test failover cleanup of the recovery plan.
     *
     * <p>The operation to cleanup test failover of a recovery plan.
     *
     * @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 recoveryPlanName Recovery plan name.
     * @param input Recovery plan test failover cleanup input.
     * @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 recovery plan details.
     */
    RecoveryPlan testFailoverCleanup(
        String resourceName,
        String resourceGroupName,
        String recoveryPlanName,
        RecoveryPlanTestFailoverCleanupInput input);

    /**
     * Execute test failover cleanup of the recovery plan.
     *
     * <p>The operation to cleanup test failover of a recovery plan.
     *
     * @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 recoveryPlanName Recovery plan name.
     * @param input Recovery plan test failover cleanup input.
     * @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 recovery plan details.
     */
    RecoveryPlan testFailoverCleanup(
        String resourceName,
        String resourceGroupName,
        String recoveryPlanName,
        RecoveryPlanTestFailoverCleanupInput input,
        Context context);

    /**
     * Execute unplanned failover of the recovery plan.
     *
     * <p>The operation to start the unplanned failover of a recovery plan.
     *
     * @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 recoveryPlanName Recovery plan name.
     * @param input Recovery plan unplanned failover input.
     * @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 recovery plan details.
     */
    RecoveryPlan unplannedFailover(
        String resourceName,
        String resourceGroupName,
        String recoveryPlanName,
        RecoveryPlanUnplannedFailoverInput input);

    /**
     * Execute unplanned failover of the recovery plan.
     *
     * <p>The operation to start the unplanned failover of a recovery plan.
     *
     * @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 recoveryPlanName Recovery plan name.
     * @param input Recovery plan unplanned failover input.
     * @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 recovery plan details.
     */
    RecoveryPlan unplannedFailover(
        String resourceName,
        String resourceGroupName,
        String recoveryPlanName,
        RecoveryPlanUnplannedFailoverInput input,
        Context context);

    /**
     * Gets the requested recovery plan.
     *
     * <p>Gets the details of the recovery plan.
     *
     * @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 the recovery plan along with {@link Response}.
     */
    RecoveryPlan getById(String id);

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

    /**
     * Deletes the specified recovery plan.
     *
     * <p>Delete a recovery plan.
     *
     * @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 specified recovery plan.
     *
     * <p>Delete a recovery plan.
     *
     * @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.
     */
    void deleteByIdWithResponse(String id, Context context);

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