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

package com.azure.resourcemanager.videoanalyzer.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.util.Context;
import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineTopologyInner;
import com.azure.resourcemanager.videoanalyzer.models.PipelineTopologyUpdate;

/** An instance of this class provides access to all the operations defined in PipelineTopologiesClient. */
public interface PipelineTopologiesClient {
    /**
     * Retrieves a list of pipeline topologies that have been added to the account, if any, along with their JSON
     * representation.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName The Azure Video Analyzer account 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 a collection of PipelineTopology items as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<PipelineTopologyInner> list(String resourceGroupName, String accountName);

    /**
     * Retrieves a list of pipeline topologies that have been added to the account, if any, along with their JSON
     * representation.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName The Azure Video Analyzer account name.
     * @param filter Restricts the set of items returned.
     * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The
     *     service returns the number of available items up to but not greater than the specified value n.
     * @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 a collection of PipelineTopology items as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<PipelineTopologyInner> list(
        String resourceGroupName, String accountName, String filter, Integer top, Context context);

    /**
     * Retrieves a specific pipeline topology by name. If a topology with that name has been previously created, the
     * call will return the JSON representation of that topology.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName The Azure Video Analyzer account name.
     * @param pipelineTopologyName Pipeline topology unique 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 pipeline topology describes the processing steps to be applied when processing content for a particular
     *     outcome.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    PipelineTopologyInner get(String resourceGroupName, String accountName, String pipelineTopologyName);

    /**
     * Retrieves a specific pipeline topology by name. If a topology with that name has been previously created, the
     * call will return the JSON representation of that topology.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName The Azure Video Analyzer account name.
     * @param pipelineTopologyName Pipeline topology unique 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 pipeline topology describes the processing steps to be applied when processing content for a particular
     *     outcome along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<PipelineTopologyInner> getWithResponse(
        String resourceGroupName, String accountName, String pipelineTopologyName, Context context);

    /**
     * Creates a new pipeline topology or updates an existing one, with the given name. A pipeline topology describes
     * the processing steps to be applied when processing content for a particular outcome. The topology should be
     * defined according to the scenario to be achieved and can be reused across many pipeline instances which share the
     * same processing characteristics.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName The Azure Video Analyzer account name.
     * @param pipelineTopologyName Pipeline topology unique identifier.
     * @param parameters The request parameters.
     * @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 pipeline topology describes the processing steps to be applied when processing content for a particular
     *     outcome.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    PipelineTopologyInner createOrUpdate(
        String resourceGroupName, String accountName, String pipelineTopologyName, PipelineTopologyInner parameters);

    /**
     * Creates a new pipeline topology or updates an existing one, with the given name. A pipeline topology describes
     * the processing steps to be applied when processing content for a particular outcome. The topology should be
     * defined according to the scenario to be achieved and can be reused across many pipeline instances which share the
     * same processing characteristics.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName The Azure Video Analyzer account name.
     * @param pipelineTopologyName Pipeline topology unique identifier.
     * @param parameters The request parameters.
     * @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 pipeline topology describes the processing steps to be applied when processing content for a particular
     *     outcome along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<PipelineTopologyInner> createOrUpdateWithResponse(
        String resourceGroupName,
        String accountName,
        String pipelineTopologyName,
        PipelineTopologyInner parameters,
        Context context);

    /**
     * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology
     * have been stopped and deleted.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName The Azure Video Analyzer account name.
     * @param pipelineTopologyName Pipeline topology unique 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String resourceGroupName, String accountName, String pipelineTopologyName);

    /**
     * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology
     * have been stopped and deleted.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName The Azure Video Analyzer account name.
     * @param pipelineTopologyName Pipeline topology unique 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 {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<Void> deleteWithResponse(
        String resourceGroupName, String accountName, String pipelineTopologyName, Context context);

    /**
     * Updates an existing pipeline topology with the given name. If the associated live pipelines or pipeline jobs are
     * in active or processing state, respectively, then only the description can be updated. Else, the properties that
     * can be updated include: description, parameter declarations, sources, processors, and sinks.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName The Azure Video Analyzer account name.
     * @param pipelineTopologyName Pipeline topology unique identifier.
     * @param parameters The request parameters.
     * @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 pipeline topology describes the processing steps to be applied when processing content for a particular
     *     outcome.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    PipelineTopologyInner update(
        String resourceGroupName, String accountName, String pipelineTopologyName, PipelineTopologyUpdate parameters);

    /**
     * Updates an existing pipeline topology with the given name. If the associated live pipelines or pipeline jobs are
     * in active or processing state, respectively, then only the description can be updated. Else, the properties that
     * can be updated include: description, parameter declarations, sources, processors, and sinks.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName The Azure Video Analyzer account name.
     * @param pipelineTopologyName Pipeline topology unique identifier.
     * @param parameters The request parameters.
     * @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 pipeline topology describes the processing steps to be applied when processing content for a particular
     *     outcome along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<PipelineTopologyInner> updateWithResponse(
        String resourceGroupName,
        String accountName,
        String pipelineTopologyName,
        PipelineTopologyUpdate parameters,
        Context context);
}
