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

package com.azure.resourcemanager.mediaservices.models;

import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.mediaservices.fluent.models.LiveOutputInner;
import java.time.Duration;
import java.time.OffsetDateTime;

/** An immutable client-side representation of LiveOutput. */
public interface LiveOutput {
    /**
     * 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: The system metadata relating to this resource.
     *
     * @return the systemData value.
     */
    SystemData systemData();

    /**
     * Gets the description property: The description of the live output.
     *
     * @return the description value.
     */
    String description();

    /**
     * Gets the assetName property: The asset that the live output will write to.
     *
     * @return the assetName value.
     */
    String assetName();

    /**
     * Gets the archiveWindowLength property: ISO 8601 time between 1 minute to 25 hours to indicate the maximum content
     * length that can be archived in the asset for this live output. This also sets the maximum content length for the
     * rewind window. For example, use PT1H30M to indicate 1 hour and 30 minutes of archive window.
     *
     * @return the archiveWindowLength value.
     */
    Duration archiveWindowLength();

    /**
     * Gets the rewindWindowLength property: ISO 8601 time between 1 minute to the duration of archiveWindowLength to
     * control seek-able window length during Live. The service won't use this property once LiveOutput stops. The
     * archived VOD will have full content with original ArchiveWindowLength. For example, use PT1H30M to indicate 1
     * hour and 30 minutes of rewind window length. Service will use implicit default value 30m only if Live Event
     * enables LL.
     *
     * @return the rewindWindowLength value.
     */
    Duration rewindWindowLength();

    /**
     * Gets the manifestName property: The manifest file name. If not provided, the service will generate one
     * automatically.
     *
     * @return the manifestName value.
     */
    String manifestName();

    /**
     * Gets the hls property: HTTP Live Streaming (HLS) packing setting for the live output.
     *
     * @return the hls value.
     */
    Hls hls();

    /**
     * Gets the outputSnapTime property: The initial timestamp that the live output will start at, any content before
     * this value will not be archived.
     *
     * @return the outputSnapTime value.
     */
    Long outputSnapTime();

    /**
     * Gets the created property: The creation time the live output.
     *
     * @return the created value.
     */
    OffsetDateTime created();

    /**
     * Gets the lastModified property: The time the live output was last modified.
     *
     * @return the lastModified value.
     */
    OffsetDateTime lastModified();

    /**
     * Gets the provisioningState property: The provisioning state of the live output.
     *
     * @return the provisioningState value.
     */
    String provisioningState();

    /**
     * Gets the resourceState property: The resource state of the live output.
     *
     * @return the resourceState value.
     */
    LiveOutputResourceState resourceState();

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

    /** The entirety of the LiveOutput definition. */
    interface Definition
        extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
    }
    /** The LiveOutput definition stages. */
    interface DefinitionStages {
        /** The first stage of the LiveOutput definition. */
        interface Blank extends WithParentResource {
        }
        /** The stage of the LiveOutput definition allowing to specify parent resource. */
        interface WithParentResource {
            /**
             * Specifies resourceGroupName, accountName, liveEventName.
             *
             * @param resourceGroupName The name of the resource group within the Azure subscription.
             * @param accountName The Media Services account name.
             * @param liveEventName The name of the live event, maximum length is 32.
             * @return the next definition stage.
             */
            WithCreate withExistingLiveEvent(String resourceGroupName, String accountName, String liveEventName);
        }
        /**
         * The stage of the LiveOutput 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.WithDescription,
                DefinitionStages.WithAssetName,
                DefinitionStages.WithArchiveWindowLength,
                DefinitionStages.WithRewindWindowLength,
                DefinitionStages.WithManifestName,
                DefinitionStages.WithHls,
                DefinitionStages.WithOutputSnapTime {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            LiveOutput create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            LiveOutput create(Context context);
        }
        /** The stage of the LiveOutput definition allowing to specify description. */
        interface WithDescription {
            /**
             * Specifies the description property: The description of the live output..
             *
             * @param description The description of the live output.
             * @return the next definition stage.
             */
            WithCreate withDescription(String description);
        }
        /** The stage of the LiveOutput definition allowing to specify assetName. */
        interface WithAssetName {
            /**
             * Specifies the assetName property: The asset that the live output will write to..
             *
             * @param assetName The asset that the live output will write to.
             * @return the next definition stage.
             */
            WithCreate withAssetName(String assetName);
        }
        /** The stage of the LiveOutput definition allowing to specify archiveWindowLength. */
        interface WithArchiveWindowLength {
            /**
             * Specifies the archiveWindowLength property: ISO 8601 time between 1 minute to 25 hours to indicate the
             * maximum content length that can be archived in the asset for this live output. This also sets the maximum
             * content length for the rewind window. For example, use PT1H30M to indicate 1 hour and 30 minutes of
             * archive window..
             *
             * @param archiveWindowLength ISO 8601 time between 1 minute to 25 hours to indicate the maximum content
             *     length that can be archived in the asset for this live output. This also sets the maximum content
             *     length for the rewind window. For example, use PT1H30M to indicate 1 hour and 30 minutes of archive
             *     window.
             * @return the next definition stage.
             */
            WithCreate withArchiveWindowLength(Duration archiveWindowLength);
        }
        /** The stage of the LiveOutput definition allowing to specify rewindWindowLength. */
        interface WithRewindWindowLength {
            /**
             * Specifies the rewindWindowLength property: ISO 8601 time between 1 minute to the duration of
             * archiveWindowLength to control seek-able window length during Live. The service won't use this property
             * once LiveOutput stops. The archived VOD will have full content with original ArchiveWindowLength. For
             * example, use PT1H30M to indicate 1 hour and 30 minutes of rewind window length. Service will use implicit
             * default value 30m only if Live Event enables LL..
             *
             * @param rewindWindowLength ISO 8601 time between 1 minute to the duration of archiveWindowLength to
             *     control seek-able window length during Live. The service won't use this property once LiveOutput
             *     stops. The archived VOD will have full content with original ArchiveWindowLength. For example, use
             *     PT1H30M to indicate 1 hour and 30 minutes of rewind window length. Service will use implicit default
             *     value 30m only if Live Event enables LL.
             * @return the next definition stage.
             */
            WithCreate withRewindWindowLength(Duration rewindWindowLength);
        }
        /** The stage of the LiveOutput definition allowing to specify manifestName. */
        interface WithManifestName {
            /**
             * Specifies the manifestName property: The manifest file name. If not provided, the service will generate
             * one automatically..
             *
             * @param manifestName The manifest file name. If not provided, the service will generate one automatically.
             * @return the next definition stage.
             */
            WithCreate withManifestName(String manifestName);
        }
        /** The stage of the LiveOutput definition allowing to specify hls. */
        interface WithHls {
            /**
             * Specifies the hls property: HTTP Live Streaming (HLS) packing setting for the live output..
             *
             * @param hls HTTP Live Streaming (HLS) packing setting for the live output.
             * @return the next definition stage.
             */
            WithCreate withHls(Hls hls);
        }
        /** The stage of the LiveOutput definition allowing to specify outputSnapTime. */
        interface WithOutputSnapTime {
            /**
             * Specifies the outputSnapTime property: The initial timestamp that the live output will start at, any
             * content before this value will not be archived..
             *
             * @param outputSnapTime The initial timestamp that the live output will start at, any content before this
             *     value will not be archived.
             * @return the next definition stage.
             */
            WithCreate withOutputSnapTime(Long outputSnapTime);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    LiveOutput refresh();

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