// 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.models;

import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineInner;
import java.util.List;

/** An immutable client-side representation of LivePipeline. */
public interface LivePipeline {
    /**
     * Gets the id property: Fully qualified resource Id for the resource.
     *
     * @return the id value.
     */
    String id();

    /**
     * Gets the name property: The name of the resource.
     *
     * @return the name value.
     */
    String name();

    /**
     * Gets the type property: The type of the resource.
     *
     * @return the type value.
     */
    String type();

    /**
     * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
     *
     * @return the systemData value.
     */
    SystemData systemData();

    /**
     * Gets the topologyName property: The reference to an existing pipeline topology defined for real-time content
     * processing. When activated, this live pipeline will process content according to the pipeline topology
     * definition.
     *
     * @return the topologyName value.
     */
    String topologyName();

    /**
     * Gets the description property: An optional description for the pipeline.
     *
     * @return the description value.
     */
    String description();

    /**
     * Gets the bitrateKbps property: Maximum bitrate capacity in Kbps reserved for the live pipeline. The allowed range
     * is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this capacity, then the service
     * will disconnect temporarily from the camera. It will retry to re-establish connection (with exponential backoff),
     * checking to see if the camera bitrate is now below the reserved capacity. Doing so will ensure that one 'noisy
     * neighbor' does not affect other live pipelines in your account.
     *
     * @return the bitrateKbps value.
     */
    int bitrateKbps();

    /**
     * Gets the state property: Current state of the pipeline (read-only).
     *
     * @return the state value.
     */
    LivePipelineState state();

    /**
     * Gets the parameters property: List of the instance level parameter values for the user-defined topology
     * parameters. A pipeline can only define or override parameters values for parameters which have been declared in
     * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a
     * default value can be optionally be overridden.
     *
     * @return the parameters value.
     */
    List<ParameterDefinition> parameters();

    /**
     * Gets the name of the resource group.
     *
     * @return the name of the resource group.
     */
    String resourceGroupName();

    /**
     * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineInner object.
     *
     * @return the inner object.
     */
    LivePipelineInner innerModel();

    /** The entirety of the LivePipeline definition. */
    interface Definition
        extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
    }
    /** The LivePipeline definition stages. */
    interface DefinitionStages {
        /** The first stage of the LivePipeline definition. */
        interface Blank extends WithParentResource {
        }
        /** The stage of the LivePipeline definition allowing to specify parent resource. */
        interface WithParentResource {
            /**
             * Specifies resourceGroupName, accountName.
             *
             * @param resourceGroupName The name of the resource group. The name is case insensitive.
             * @param accountName The Azure Video Analyzer account name.
             * @return the next definition stage.
             */
            WithCreate withExistingVideoAnalyzer(String resourceGroupName, String accountName);
        }
        /**
         * The stage of the LivePipeline definition which contains all the minimum required properties for the resource
         * to be created, but also allows for any other optional properties to be specified.
         */
        interface WithCreate
            extends DefinitionStages.WithTopologyName,
                DefinitionStages.WithDescription,
                DefinitionStages.WithBitrateKbps,
                DefinitionStages.WithParameters {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            LivePipeline create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            LivePipeline create(Context context);
        }
        /** The stage of the LivePipeline definition allowing to specify topologyName. */
        interface WithTopologyName {
            /**
             * Specifies the topologyName property: The reference to an existing pipeline topology defined for real-time
             * content processing. When activated, this live pipeline will process content according to the pipeline
             * topology definition..
             *
             * @param topologyName The reference to an existing pipeline topology defined for real-time content
             *     processing. When activated, this live pipeline will process content according to the pipeline
             *     topology definition.
             * @return the next definition stage.
             */
            WithCreate withTopologyName(String topologyName);
        }
        /** The stage of the LivePipeline definition allowing to specify description. */
        interface WithDescription {
            /**
             * Specifies the description property: An optional description for the pipeline..
             *
             * @param description An optional description for the pipeline.
             * @return the next definition stage.
             */
            WithCreate withDescription(String description);
        }
        /** The stage of the LivePipeline definition allowing to specify bitrateKbps. */
        interface WithBitrateKbps {
            /**
             * Specifies the bitrateKbps property: Maximum bitrate capacity in Kbps reserved for the live pipeline. The
             * allowed range is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this
             * capacity, then the service will disconnect temporarily from the camera. It will retry to re-establish
             * connection (with exponential backoff), checking to see if the camera bitrate is now below the reserved
             * capacity. Doing so will ensure that one 'noisy neighbor' does not affect other live pipelines in your
             * account..
             *
             * @param bitrateKbps Maximum bitrate capacity in Kbps reserved for the live pipeline. The allowed range is
             *     from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this capacity, then the
             *     service will disconnect temporarily from the camera. It will retry to re-establish connection (with
             *     exponential backoff), checking to see if the camera bitrate is now below the reserved capacity. Doing
             *     so will ensure that one 'noisy neighbor' does not affect other live pipelines in your account.
             * @return the next definition stage.
             */
            WithCreate withBitrateKbps(int bitrateKbps);
        }
        /** The stage of the LivePipeline definition allowing to specify parameters. */
        interface WithParameters {
            /**
             * Specifies the parameters property: List of the instance level parameter values for the user-defined
             * topology parameters. A pipeline can only define or override parameters values for parameters which have
             * been declared in the referenced topology. Topology parameters without a default value must be defined.
             * Topology parameters with a default value can be optionally be overridden..
             *
             * @param parameters List of the instance level parameter values for the user-defined topology parameters. A
             *     pipeline can only define or override parameters values for parameters which have been declared in the
             *     referenced topology. Topology parameters without a default value must be defined. Topology parameters
             *     with a default value can be optionally be overridden.
             * @return the next definition stage.
             */
            WithCreate withParameters(List<ParameterDefinition> parameters);
        }
    }
    /**
     * Begins update for the LivePipeline resource.
     *
     * @return the stage of resource update.
     */
    LivePipeline.Update update();

    /** The template for LivePipeline update. */
    interface Update
        extends UpdateStages.WithTopologyName,
            UpdateStages.WithDescription,
            UpdateStages.WithBitrateKbps,
            UpdateStages.WithParameters {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        LivePipeline apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        LivePipeline apply(Context context);
    }
    /** The LivePipeline update stages. */
    interface UpdateStages {
        /** The stage of the LivePipeline update allowing to specify topologyName. */
        interface WithTopologyName {
            /**
             * Specifies the topologyName property: The reference to an existing pipeline topology defined for real-time
             * content processing. When activated, this live pipeline will process content according to the pipeline
             * topology definition..
             *
             * @param topologyName The reference to an existing pipeline topology defined for real-time content
             *     processing. When activated, this live pipeline will process content according to the pipeline
             *     topology definition.
             * @return the next definition stage.
             */
            Update withTopologyName(String topologyName);
        }
        /** The stage of the LivePipeline update allowing to specify description. */
        interface WithDescription {
            /**
             * Specifies the description property: An optional description for the pipeline..
             *
             * @param description An optional description for the pipeline.
             * @return the next definition stage.
             */
            Update withDescription(String description);
        }
        /** The stage of the LivePipeline update allowing to specify bitrateKbps. */
        interface WithBitrateKbps {
            /**
             * Specifies the bitrateKbps property: Maximum bitrate capacity in Kbps reserved for the live pipeline. The
             * allowed range is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this
             * capacity, then the service will disconnect temporarily from the camera. It will retry to re-establish
             * connection (with exponential backoff), checking to see if the camera bitrate is now below the reserved
             * capacity. Doing so will ensure that one 'noisy neighbor' does not affect other live pipelines in your
             * account..
             *
             * @param bitrateKbps Maximum bitrate capacity in Kbps reserved for the live pipeline. The allowed range is
             *     from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this capacity, then the
             *     service will disconnect temporarily from the camera. It will retry to re-establish connection (with
             *     exponential backoff), checking to see if the camera bitrate is now below the reserved capacity. Doing
             *     so will ensure that one 'noisy neighbor' does not affect other live pipelines in your account.
             * @return the next definition stage.
             */
            Update withBitrateKbps(Integer bitrateKbps);
        }
        /** The stage of the LivePipeline update allowing to specify parameters. */
        interface WithParameters {
            /**
             * Specifies the parameters property: List of the instance level parameter values for the user-defined
             * topology parameters. A pipeline can only define or override parameters values for parameters which have
             * been declared in the referenced topology. Topology parameters without a default value must be defined.
             * Topology parameters with a default value can be optionally be overridden..
             *
             * @param parameters List of the instance level parameter values for the user-defined topology parameters. A
             *     pipeline can only define or override parameters values for parameters which have been declared in the
             *     referenced topology. Topology parameters without a default value must be defined. Topology parameters
             *     with a default value can be optionally be overridden.
             * @return the next definition stage.
             */
            Update withParameters(List<ParameterDefinition> parameters);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    LivePipeline refresh();

    /**
     * Refreshes the resource to sync with Azure.
     *
     * @param context The context to associate with this operation.
     * @return the refreshed resource.
     */
    LivePipeline refresh(Context context);

    /**
     * Activates a live pipeline with the given name.
     *
     * @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 activate();

    /**
     * Activates a live pipeline with the given 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 activate(Context context);

    /**
     * Deactivates a live pipeline with the given name.
     *
     * @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 deactivate();

    /**
     * Deactivates a live pipeline with the given 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 deactivate(Context context);
}
