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

package com.azure.resourcemanager.workloads.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.workloads.models.PrometheusOSProviderInstanceProperties;
import com.azure.resourcemanager.workloads.models.SslPreference;
import org.junit.jupiter.api.Assertions;

public final class PrometheusOSProviderInstancePropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PrometheusOSProviderInstanceProperties model =
            BinaryData
                .fromString(
                    "{\"providerType\":\"PrometheusOS\",\"prometheusUrl\":\"rhnj\",\"sslPreference\":\"Disabled\",\"sslCertificateUri\":\"v\",\"sapSid\":\"ovqfzge\"}")
                .toObject(PrometheusOSProviderInstanceProperties.class);
        Assertions.assertEquals("rhnj", model.prometheusUrl());
        Assertions.assertEquals(SslPreference.DISABLED, model.sslPreference());
        Assertions.assertEquals("v", model.sslCertificateUri());
        Assertions.assertEquals("ovqfzge", model.sapSid());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        PrometheusOSProviderInstanceProperties model =
            new PrometheusOSProviderInstanceProperties()
                .withPrometheusUrl("rhnj")
                .withSslPreference(SslPreference.DISABLED)
                .withSslCertificateUri("v")
                .withSapSid("ovqfzge");
        model = BinaryData.fromObject(model).toObject(PrometheusOSProviderInstanceProperties.class);
        Assertions.assertEquals("rhnj", model.prometheusUrl());
        Assertions.assertEquals(SslPreference.DISABLED, model.sslPreference());
        Assertions.assertEquals("v", model.sslCertificateUri());
        Assertions.assertEquals("ovqfzge", model.sapSid());
    }
}
