// 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 ReplicationProtectionContainerMappings. */
public interface ReplicationProtectionContainerMappings {
    /**
     * Gets the list of protection container mappings for a protection container.
     *
     * <p>Lists the protection container mappings for 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 protection container mapping collection class as paginated response with {@link PagedIterable}.
     */
    PagedIterable<ProtectionContainerMapping> listByReplicationProtectionContainers(
        String resourceName, String resourceGroupName, String fabricName, String protectionContainerName);

    /**
     * Gets the list of protection container mappings for a protection container.
     *
     * <p>Lists the protection container mappings for 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 protection container mapping collection class as paginated response with {@link PagedIterable}.
     */
    PagedIterable<ProtectionContainerMapping> listByReplicationProtectionContainers(
        String resourceName,
        String resourceGroupName,
        String fabricName,
        String protectionContainerName,
        Context context);

    /**
     * Gets a protection container mapping.
     *
     * <p>Gets the details of a protection container mapping.
     *
     * @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 mappingName Protection Container mapping 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 mapping along with {@link Response}.
     */
    Response<ProtectionContainerMapping> getWithResponse(
        String resourceName,
        String resourceGroupName,
        String fabricName,
        String protectionContainerName,
        String mappingName,
        Context context);

    /**
     * Gets a protection container mapping.
     *
     * <p>Gets the details of a protection container mapping.
     *
     * @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 mappingName Protection Container mapping 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 mapping.
     */
    ProtectionContainerMapping get(
        String resourceName,
        String resourceGroupName,
        String fabricName,
        String protectionContainerName,
        String mappingName);

    /**
     * Purge protection container mapping.
     *
     * <p>The operation to purge(force delete) a protection container mapping.
     *
     * @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 mappingName Protection container mapping 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 protectionContainerName,
        String mappingName);

    /**
     * Purge protection container mapping.
     *
     * <p>The operation to purge(force delete) a protection container mapping.
     *
     * @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 mappingName Protection container mapping 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 protectionContainerName,
        String mappingName,
        Context context);

    /**
     * Remove protection container mapping.
     *
     * <p>The operation to delete or remove a protection container mapping.
     *
     * @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 mappingName Protection container mapping name.
     * @param removalInput Removal 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.
     */
    void delete(
        String resourceName,
        String resourceGroupName,
        String fabricName,
        String protectionContainerName,
        String mappingName,
        RemoveProtectionContainerMappingInput removalInput);

    /**
     * Remove protection container mapping.
     *
     * <p>The operation to delete or remove a protection container mapping.
     *
     * @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 mappingName Protection container mapping name.
     * @param removalInput Removal 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.
     */
    void delete(
        String resourceName,
        String resourceGroupName,
        String fabricName,
        String protectionContainerName,
        String mappingName,
        RemoveProtectionContainerMappingInput removalInput,
        Context context);

    /**
     * Gets the list of all protection container mappings in a vault.
     *
     * <p>Lists the protection container mappings 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 protection container mapping collection class as paginated response with {@link PagedIterable}.
     */
    PagedIterable<ProtectionContainerMapping> list(String resourceName, String resourceGroupName);

    /**
     * Gets the list of all protection container mappings in a vault.
     *
     * <p>Lists the protection container mappings 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 protection container mapping collection class as paginated response with {@link PagedIterable}.
     */
    PagedIterable<ProtectionContainerMapping> list(String resourceName, String resourceGroupName, Context context);

    /**
     * Gets a protection container mapping.
     *
     * <p>Gets the details of a protection container mapping.
     *
     * @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 a protection container mapping along with {@link Response}.
     */
    ProtectionContainerMapping getById(String id);

    /**
     * Gets a protection container mapping.
     *
     * <p>Gets the details of a protection container mapping.
     *
     * @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 a protection container mapping along with {@link Response}.
     */
    Response<ProtectionContainerMapping> getByIdWithResponse(String id, Context context);

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