// 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 ReplicationJobs. */
public interface ReplicationJobs {
    /**
     * Gets the list of jobs.
     *
     * <p>Gets the list of Azure Site Recovery Jobs for 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 the list of Azure Site Recovery Jobs for the vault as paginated response with {@link PagedIterable}.
     */
    PagedIterable<Job> list(String resourceName, String resourceGroupName);

    /**
     * Gets the list of jobs.
     *
     * <p>Gets the list of Azure Site Recovery Jobs for 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 filter OData filter options.
     * @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 Azure Site Recovery Jobs for the vault as paginated response with {@link PagedIterable}.
     */
    PagedIterable<Job> list(String resourceName, String resourceGroupName, String filter, Context context);

    /**
     * Gets the job details.
     *
     * <p>Get the details of an Azure Site Recovery job.
     *
     * @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 jobName Job identifier.
     * @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 an Azure Site Recovery job along with {@link Response}.
     */
    Response<Job> getWithResponse(String resourceName, String resourceGroupName, String jobName, Context context);

    /**
     * Gets the job details.
     *
     * <p>Get the details of an Azure Site Recovery job.
     *
     * @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 jobName Job identifier.
     * @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 an Azure Site Recovery job.
     */
    Job get(String resourceName, String resourceGroupName, String jobName);

    /**
     * Cancels the specified job.
     *
     * <p>The operation to cancel an Azure Site Recovery job.
     *
     * @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 jobName Job identifier.
     * @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 job details.
     */
    Job cancel(String resourceName, String resourceGroupName, String jobName);

    /**
     * Cancels the specified job.
     *
     * <p>The operation to cancel an Azure Site Recovery job.
     *
     * @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 jobName Job identifier.
     * @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 job details.
     */
    Job cancel(String resourceName, String resourceGroupName, String jobName, Context context);

    /**
     * Restarts the specified job.
     *
     * <p>The operation to restart an Azure Site Recovery job.
     *
     * @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 jobName Job identifier.
     * @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 job details.
     */
    Job restart(String resourceName, String resourceGroupName, String jobName);

    /**
     * Restarts the specified job.
     *
     * <p>The operation to restart an Azure Site Recovery job.
     *
     * @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 jobName Job identifier.
     * @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 job details.
     */
    Job restart(String resourceName, String resourceGroupName, String jobName, Context context);

    /**
     * Resumes the specified job.
     *
     * <p>The operation to resume an Azure Site Recovery job.
     *
     * @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 jobName Job identifier.
     * @param resumeJobParams Resume rob comments.
     * @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 job details.
     */
    Job resume(String resourceName, String resourceGroupName, String jobName, ResumeJobParams resumeJobParams);

    /**
     * Resumes the specified job.
     *
     * <p>The operation to resume an Azure Site Recovery job.
     *
     * @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 jobName Job identifier.
     * @param resumeJobParams Resume rob comments.
     * @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 job details.
     */
    Job resume(
        String resourceName,
        String resourceGroupName,
        String jobName,
        ResumeJobParams resumeJobParams,
        Context context);

    /**
     * Exports the details of the Azure Site Recovery jobs of the vault.
     *
     * <p>The operation to export the details of the Azure Site Recovery jobs of 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 jobQueryParameter job query filter.
     * @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 job details.
     */
    Job export(String resourceName, String resourceGroupName, JobQueryParameter jobQueryParameter);

    /**
     * Exports the details of the Azure Site Recovery jobs of the vault.
     *
     * <p>The operation to export the details of the Azure Site Recovery jobs of 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 jobQueryParameter job query filter.
     * @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 job details.
     */
    Job export(String resourceName, String resourceGroupName, JobQueryParameter jobQueryParameter, Context context);
}
