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

package com.azure.resourcemanager.hybridcompute.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.hybridcompute.models.HybridComputePrivateLinkScopeProperties;
import com.azure.resourcemanager.hybridcompute.models.PublicNetworkAccessType;
import org.junit.jupiter.api.Assertions;

public final class HybridComputePrivateLinkScopePropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        HybridComputePrivateLinkScopeProperties model =
            BinaryData
                .fromString(
                    "{\"publicNetworkAccess\":\"Enabled\",\"provisioningState\":\"jvnysounqe\",\"privateLinkScopeId\":\"noae\"}")
                .toObject(HybridComputePrivateLinkScopeProperties.class);
        Assertions.assertEquals(PublicNetworkAccessType.ENABLED, model.publicNetworkAccess());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        HybridComputePrivateLinkScopeProperties model =
            new HybridComputePrivateLinkScopeProperties().withPublicNetworkAccess(PublicNetworkAccessType.ENABLED);
        model = BinaryData.fromObject(model).toObject(HybridComputePrivateLinkScopeProperties.class);
        Assertions.assertEquals(PublicNetworkAccessType.ENABLED, model.publicNetworkAccess());
    }
}
