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

package com.azure.resourcemanager.machinelearning.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode;
import com.azure.resourcemanager.machinelearning.models.TritonModelJobInput;
import org.junit.jupiter.api.Assertions;

public final class TritonModelJobInputTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        TritonModelJobInput model =
            BinaryData
                .fromString(
                    "{\"jobInputType\":\"triton_model\",\"mode\":\"Download\",\"uri\":\"plhyvd\",\"description\":\"lyzkxitds\"}")
                .toObject(TritonModelJobInput.class);
        Assertions.assertEquals("lyzkxitds", model.description());
        Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.mode());
        Assertions.assertEquals("plhyvd", model.uri());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        TritonModelJobInput model =
            new TritonModelJobInput()
                .withDescription("lyzkxitds")
                .withMode(InputDeliveryMode.DOWNLOAD)
                .withUri("plhyvd");
        model = BinaryData.fromObject(model).toObject(TritonModelJobInput.class);
        Assertions.assertEquals("lyzkxitds", model.description());
        Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.mode());
        Assertions.assertEquals("plhyvd", model.uri());
    }
}
