// 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.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.recoveryservicessiterecovery.fluent.models.ProtectionContainerInner;
import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionContainerInput;
import com.azure.resourcemanager.recoveryservicessiterecovery.models.DiscoverProtectableItemRequest;
import com.azure.resourcemanager.recoveryservicessiterecovery.models.SwitchProtectionInput;

/** An instance of this class provides access to all the operations defined in ReplicationProtectionContainersClient. */
public interface ReplicationProtectionContainersClient {
    /**
     * Gets the list of protection container for a fabric.
     *
     * <p>Lists the protection containers in 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 protection Container collection as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ProtectionContainerInner> listByReplicationFabrics(
        String resourceName, String resourceGroupName, String fabricName);

    /**
     * Gets the list of protection container for a fabric.
     *
     * <p>Lists the protection containers in 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 protection Container collection as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ProtectionContainerInner> listByReplicationFabrics(
        String resourceName, String resourceGroupName, String fabricName, Context context);

    /**
     * Gets the protection container details.
     *
     * <p>Gets the details of a protection container.
     *
     * @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 protectionContainerName Protection container 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 a protection container along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ProtectionContainerInner> getWithResponse(
        String resourceName,
        String resourceGroupName,
        String fabricName,
        String protectionContainerName,
        Context context);

    /**
     * Gets the protection container details.
     *
     * <p>Gets the details of a protection container.
     *
     * @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 protectionContainerName Protection container 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 a protection container.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ProtectionContainerInner get(
        String resourceName, String resourceGroupName, String fabricName, String protectionContainerName);

    /**
     * Create a protection container.
     *
     * <p>Operation to create a protection container.
     *
     * @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 Unique fabric ARM name.
     * @param protectionContainerName Unique protection container ARM name.
     * @param creationInput Creation 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 the {@link SyncPoller} for polling of protection container details.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<ProtectionContainerInner>, ProtectionContainerInner> beginCreate(
        String resourceName,
        String resourceGroupName,
        String fabricName,
        String protectionContainerName,
        CreateProtectionContainerInput creationInput);

    /**
     * Create a protection container.
     *
     * <p>Operation to create a protection container.
     *
     * @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 Unique fabric ARM name.
     * @param protectionContainerName Unique protection container ARM name.
     * @param creationInput Creation 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 the {@link SyncPoller} for polling of protection container details.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<ProtectionContainerInner>, ProtectionContainerInner> beginCreate(
        String resourceName,
        String resourceGroupName,
        String fabricName,
        String protectionContainerName,
        CreateProtectionContainerInput creationInput,
        Context context);

    /**
     * Create a protection container.
     *
     * <p>Operation to create a protection container.
     *
     * @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 Unique fabric ARM name.
     * @param protectionContainerName Unique protection container ARM name.
     * @param creationInput Creation 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 protection container details.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ProtectionContainerInner create(
        String resourceName,
        String resourceGroupName,
        String fabricName,
        String protectionContainerName,
        CreateProtectionContainerInput creationInput);

    /**
     * Create a protection container.
     *
     * <p>Operation to create a protection container.
     *
     * @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 Unique fabric ARM name.
     * @param protectionContainerName Unique protection container ARM name.
     * @param creationInput Creation 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 protection container details.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ProtectionContainerInner create(
        String resourceName,
        String resourceGroupName,
        String fabricName,
        String protectionContainerName,
        CreateProtectionContainerInput creationInput,
        Context context);

    /**
     * Adds a protectable item to the replication protection container.
     *
     * <p>The operation to a add a protectable item to a protection container(Add physical server).
     *
     * @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 The name of the fabric.
     * @param protectionContainerName The name of the protection container.
     * @param discoverProtectableItemRequest The request object to add a protectable item.
     * @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 protection container details.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<ProtectionContainerInner>, ProtectionContainerInner> beginDiscoverProtectableItem(
        String resourceName,
        String resourceGroupName,
        String fabricName,
        String protectionContainerName,
        DiscoverProtectableItemRequest discoverProtectableItemRequest);

    /**
     * Adds a protectable item to the replication protection container.
     *
     * <p>The operation to a add a protectable item to a protection container(Add physical server).
     *
     * @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 The name of the fabric.
     * @param protectionContainerName The name of the protection container.
     * @param discoverProtectableItemRequest The request object to add a protectable item.
     * @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 protection container details.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<ProtectionContainerInner>, ProtectionContainerInner> beginDiscoverProtectableItem(
        String resourceName,
        String resourceGroupName,
        String fabricName,
        String protectionContainerName,
        DiscoverProtectableItemRequest discoverProtectableItemRequest,
        Context context);

    /**
     * Adds a protectable item to the replication protection container.
     *
     * <p>The operation to a add a protectable item to a protection container(Add physical server).
     *
     * @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 The name of the fabric.
     * @param protectionContainerName The name of the protection container.
     * @param discoverProtectableItemRequest The request object to add a protectable item.
     * @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 protection container details.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ProtectionContainerInner discoverProtectableItem(
        String resourceName,
        String resourceGroupName,
        String fabricName,
        String protectionContainerName,
        DiscoverProtectableItemRequest discoverProtectableItemRequest);

    /**
     * Adds a protectable item to the replication protection container.
     *
     * <p>The operation to a add a protectable item to a protection container(Add physical server).
     *
     * @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 The name of the fabric.
     * @param protectionContainerName The name of the protection container.
     * @param discoverProtectableItemRequest The request object to add a protectable item.
     * @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 protection container details.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ProtectionContainerInner discoverProtectableItem(
        String resourceName,
        String resourceGroupName,
        String fabricName,
        String protectionContainerName,
        DiscoverProtectableItemRequest discoverProtectableItemRequest,
        Context context);

    /**
     * Removes a protection container.
     *
     * <p>Operation to remove a protection container.
     *
     * @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 Unique fabric ARM name.
     * @param protectionContainerName Unique protection container ARM 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 {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(
        String resourceName, String resourceGroupName, String fabricName, String protectionContainerName);

    /**
     * Removes a protection container.
     *
     * <p>Operation to remove a protection container.
     *
     * @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 Unique fabric ARM name.
     * @param protectionContainerName Unique protection container ARM 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 SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(
        String resourceName,
        String resourceGroupName,
        String fabricName,
        String protectionContainerName,
        Context context);

    /**
     * Removes a protection container.
     *
     * <p>Operation to remove a protection container.
     *
     * @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 Unique fabric ARM name.
     * @param protectionContainerName Unique protection container ARM 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName);

    /**
     * Removes a protection container.
     *
     * <p>Operation to remove a protection container.
     *
     * @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 Unique fabric ARM name.
     * @param protectionContainerName Unique protection container ARM 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(
        String resourceName,
        String resourceGroupName,
        String fabricName,
        String protectionContainerName,
        Context context);

    /**
     * Switches protection from one container to another or one replication provider to another.
     *
     * <p>Operation to switch protection from one container to another or one replication provider to another.
     *
     * @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 Unique fabric name.
     * @param protectionContainerName Protection container name.
     * @param switchInput Switch protection 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 the {@link SyncPoller} for polling of protection container details.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<ProtectionContainerInner>, ProtectionContainerInner> beginSwitchProtection(
        String resourceName,
        String resourceGroupName,
        String fabricName,
        String protectionContainerName,
        SwitchProtectionInput switchInput);

    /**
     * Switches protection from one container to another or one replication provider to another.
     *
     * <p>Operation to switch protection from one container to another or one replication provider to another.
     *
     * @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 Unique fabric name.
     * @param protectionContainerName Protection container name.
     * @param switchInput Switch protection 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 the {@link SyncPoller} for polling of protection container details.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<ProtectionContainerInner>, ProtectionContainerInner> beginSwitchProtection(
        String resourceName,
        String resourceGroupName,
        String fabricName,
        String protectionContainerName,
        SwitchProtectionInput switchInput,
        Context context);

    /**
     * Switches protection from one container to another or one replication provider to another.
     *
     * <p>Operation to switch protection from one container to another or one replication provider to another.
     *
     * @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 Unique fabric name.
     * @param protectionContainerName Protection container name.
     * @param switchInput Switch protection 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 protection container details.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ProtectionContainerInner switchProtection(
        String resourceName,
        String resourceGroupName,
        String fabricName,
        String protectionContainerName,
        SwitchProtectionInput switchInput);

    /**
     * Switches protection from one container to another or one replication provider to another.
     *
     * <p>Operation to switch protection from one container to another or one replication provider to another.
     *
     * @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 Unique fabric name.
     * @param protectionContainerName Protection container name.
     * @param switchInput Switch protection 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 protection container details.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ProtectionContainerInner switchProtection(
        String resourceName,
        String resourceGroupName,
        String fabricName,
        String protectionContainerName,
        SwitchProtectionInput switchInput,
        Context context);

    /**
     * Gets the list of all protection containers in a vault.
     *
     * <p>Lists the protection containers in a 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 protection Container collection as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ProtectionContainerInner> list(String resourceName, String resourceGroupName);

    /**
     * Gets the list of all protection containers in a vault.
     *
     * <p>Lists the protection containers in a 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 protection Container collection as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ProtectionContainerInner> list(String resourceName, String resourceGroupName, Context context);
}
