// 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.Job;
import com.azure.resourcemanager.mediaservices.models.JobInputAsset;
import com.azure.resourcemanager.mediaservices.models.JobOutputAsset;
import com.azure.resourcemanager.mediaservices.models.Priority;
import java.util.Arrays;

/** Samples for Jobs Update. */
public final class JobsUpdateSamples {
    /*
     * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/Encoding/stable/2022-07-01/examples/jobs-update.json
     */
    /**
     * Sample code: Update a Job.
     *
     * @param manager Entry point to MediaServicesManager.
     */
    public static void updateAJob(com.azure.resourcemanager.mediaservices.MediaServicesManager manager) {
        Job resource =
            manager
                .jobs()
                .getWithResponse(
                    "contosoresources", "contosomedia", "exampleTransform", "job1", com.azure.core.util.Context.NONE)
                .getValue();
        resource
            .update()
            .withDescription("Example job to illustrate update.")
            .withInput(new JobInputAsset().withAssetName("job1-InputAsset"))
            .withOutputs(Arrays.asList(new JobOutputAsset().withAssetName("job1-OutputAsset")))
            .withPriority(Priority.HIGH)
            .apply();
    }
}
