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

package com.azure.resourcemanager.streamanalytics.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 StreamingJobs. */
public interface StreamingJobs {
    /**
     * Deletes a streaming job.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param jobName The name of the streaming job.
     * @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 deleteByResourceGroup(String resourceGroupName, String jobName);

    /**
     * Deletes a streaming job.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param jobName The name of the streaming job.
     * @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 resourceGroupName, String jobName, Context context);

    /**
     * Gets details about the specified streaming job.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param jobName The name of the streaming job.
     * @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 details about the specified streaming job.
     */
    StreamingJob getByResourceGroup(String resourceGroupName, String jobName);

    /**
     * Gets details about the specified streaming job.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param jobName The name of the streaming job.
     * @param expand The $expand OData query parameter. This is a comma-separated list of additional streaming job
     *     properties to include in the response, beyond the default set returned when this parameter is absent. The
     *     default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and
     *     'functions'.
     * @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 details about the specified streaming job.
     */
    Response<StreamingJob> getByResourceGroupWithResponse(
        String resourceGroupName, String jobName, String expand, Context context);

    /**
     * Lists all of the streaming jobs in the specified resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @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 object containing a list of streaming jobs.
     */
    PagedIterable<StreamingJob> listByResourceGroup(String resourceGroupName);

    /**
     * Lists all of the streaming jobs in the specified resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param expand The $expand OData query parameter. This is a comma-separated list of additional streaming job
     *     properties to include in the response, beyond the default set returned when this parameter is absent. The
     *     default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and
     *     'functions'.
     * @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 object containing a list of streaming jobs.
     */
    PagedIterable<StreamingJob> listByResourceGroup(String resourceGroupName, String expand, Context context);

    /**
     * Lists all of the streaming jobs in the given subscription.
     *
     * @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 object containing a list of streaming jobs.
     */
    PagedIterable<StreamingJob> list();

    /**
     * Lists all of the streaming jobs in the given subscription.
     *
     * @param expand The $expand OData query parameter. This is a comma-separated list of additional streaming job
     *     properties to include in the response, beyond the default set returned when this parameter is absent. The
     *     default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and
     *     'functions'.
     * @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 object containing a list of streaming jobs.
     */
    PagedIterable<StreamingJob> list(String expand, Context context);

    /**
     * Starts a streaming job. Once a job is started it will start processing input events and produce output.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param jobName The name of the streaming job.
     * @param startJobParameters Parameters applicable to a start streaming job 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 start(String resourceGroupName, String jobName, StartStreamingJobParameters startJobParameters);

    /**
     * Starts a streaming job. Once a job is started it will start processing input events and produce output.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param jobName The name of the streaming job.
     * @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 start(String resourceGroupName, String jobName);

    /**
     * Starts a streaming job. Once a job is started it will start processing input events and produce output.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param jobName The name of the streaming job.
     * @param startJobParameters Parameters applicable to a start streaming job operation.
     * @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 start(
        String resourceGroupName, String jobName, StartStreamingJobParameters startJobParameters, Context context);

    /**
     * Stops a running streaming job. This will cause a running streaming job to stop processing input events and
     * producing output.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param jobName The name of the streaming job.
     * @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 stop(String resourceGroupName, String jobName);

    /**
     * Stops a running streaming job. This will cause a running streaming job to stop processing input events and
     * producing output.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param jobName The name of the streaming job.
     * @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 stop(String resourceGroupName, String jobName, Context context);

    /**
     * Scales a streaming job when the job is running.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param jobName The name of the streaming job.
     * @param scaleJobParameters Parameters applicable to a scale streaming job 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 scale(String resourceGroupName, String jobName, ScaleStreamingJobParameters scaleJobParameters);

    /**
     * Scales a streaming job when the job is running.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param jobName The name of the streaming job.
     * @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 scale(String resourceGroupName, String jobName);

    /**
     * Scales a streaming job when the job is running.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param jobName The name of the streaming job.
     * @param scaleJobParameters Parameters applicable to a scale streaming job operation.
     * @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 scale(
        String resourceGroupName, String jobName, ScaleStreamingJobParameters scaleJobParameters, Context context);

    /**
     * Gets details about the specified streaming job.
     *
     * @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 details about the specified streaming job.
     */
    StreamingJob getById(String id);

    /**
     * Gets details about the specified streaming job.
     *
     * @param id the resource ID.
     * @param expand The $expand OData query parameter. This is a comma-separated list of additional streaming job
     *     properties to include in the response, beyond the default set returned when this parameter is absent. The
     *     default set is all streaming job properties other than 'inputs', 'transformation', 'outputs', and
     *     'functions'.
     * @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 details about the specified streaming job.
     */
    Response<StreamingJob> getByIdWithResponse(String id, String expand, Context context);

    /**
     * Deletes a streaming job.
     *
     * @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 a streaming job.
     *
     * @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 StreamingJob resource.
     *
     * @param name resource name.
     * @return the first stage of the new StreamingJob definition.
     */
    StreamingJob.DefinitionStages.Blank define(String name);
}
