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

import com.azure.resourcemanager.mediaservices.models.Hls;
import java.time.Duration;

/** Samples for LiveOutputs Create. */
public final class LiveOutputsCreateSamples {
    /*
     * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Streaming/stable/2022-11-01/examples/liveoutput-create.json
     */
    /**
     * Sample code: Create a LiveOutput.
     *
     * @param manager Entry point to MediaServicesManager.
     */
    public static void createALiveOutput(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) {
        manager
            .liveOutputs()
            .define("myLiveOutput1")
            .withExistingLiveEvent("mediaresources", "slitestmedia10", "myLiveEvent1")
            .withDescription("test live output 1")
            .withAssetName("6f3264f5-a189-48b4-a29a-a40f22575212")
            .withArchiveWindowLength(Duration.parse("PT5M"))
            .withRewindWindowLength(Duration.parse("PT4M"))
            .withManifestName("testmanifest")
            .withHls(new Hls().withFragmentsPerTsSegment(5))
            .create();
    }
}
