// 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.core.util.BinaryData;
import com.azure.resourcemanager.mediaservices.models.ClipTime;
import com.azure.resourcemanager.mediaservices.models.InputDefinition;
import com.azure.resourcemanager.mediaservices.models.JobInputHttp;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class JobInputHttpTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        JobInputHttp model =
            BinaryData
                .fromString(
                    "{\"@odata.type\":\"#Microsoft.Media.JobInputHttp\",\"baseUri\":\"wsawddjibabxvi\",\"files\":[\"v\",\"zeexavoxtfgle\",\"dmdqb\",\"pypqtgsfj\"],\"start\":{\"@odata.type\":\"ClipTime\"},\"end\":{\"@odata.type\":\"ClipTime\"},\"label\":\"lhhxudbxvodhtnsi\",\"inputDefinitions\":[{\"@odata.type\":\"InputDefinition\",\"includedTracks\":[]},{\"@odata.type\":\"InputDefinition\",\"includedTracks\":[]},{\"@odata.type\":\"InputDefinition\",\"includedTracks\":[]}]}")
                .toObject(JobInputHttp.class);
        Assertions.assertEquals("v", model.files().get(0));
        Assertions.assertEquals("lhhxudbxvodhtnsi", model.label());
        Assertions.assertEquals("wsawddjibabxvi", model.baseUri());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        JobInputHttp model =
            new JobInputHttp()
                .withFiles(Arrays.asList("v", "zeexavoxtfgle", "dmdqb", "pypqtgsfj"))
                .withStart(new ClipTime())
                .withEnd(new ClipTime())
                .withLabel("lhhxudbxvodhtnsi")
                .withInputDefinitions(
                    Arrays
                        .asList(
                            new InputDefinition().withIncludedTracks(Arrays.asList()),
                            new InputDefinition().withIncludedTracks(Arrays.asList()),
                            new InputDefinition().withIncludedTracks(Arrays.asList())))
                .withBaseUri("wsawddjibabxvi");
        model = BinaryData.fromObject(model).toObject(JobInputHttp.class);
        Assertions.assertEquals("v", model.files().get(0));
        Assertions.assertEquals("lhhxudbxvodhtnsi", model.label());
        Assertions.assertEquals("wsawddjibabxvi", model.baseUri());
    }
}
