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

package com.azure.resourcemanager.networkcloud.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.networkcloud.fluent.models.L3NetworkProperties;
import com.azure.resourcemanager.networkcloud.models.HybridAksIpamEnabled;
import com.azure.resourcemanager.networkcloud.models.HybridAksPluginType;
import com.azure.resourcemanager.networkcloud.models.IpAllocationType;
import org.junit.jupiter.api.Assertions;

public final class L3NetworkPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        L3NetworkProperties model =
            BinaryData
                .fromString(
                    "{\"associatedResourceIds\":[\"rfzeey\",\"bizikayuhq\"],\"clusterId\":\"jbsybbqw\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"dgmfpgvmpipasl\",\"hybridAksClustersAssociatedIds\":[\"qfxssmwutw\",\"dsrezpdrhneuyow\"],\"hybridAksIpamEnabled\":\"True\",\"hybridAksPluginType\":\"OSDevice\",\"interfaceName\":\"i\",\"ipAllocationType\":\"DualStack\",\"ipv4ConnectedPrefix\":\"rcgp\",\"ipv6ConnectedPrefix\":\"pzimejzanlfzxi\",\"l3IsolationDomainId\":\"vrmbzono\",\"provisioningState\":\"Succeeded\",\"virtualMachinesAssociatedIds\":[\"q\"],\"vlan\":4820100600000743353}")
                .toObject(L3NetworkProperties.class);
        Assertions.assertEquals(HybridAksIpamEnabled.TRUE, model.hybridAksIpamEnabled());
        Assertions.assertEquals(HybridAksPluginType.OSDEVICE, model.hybridAksPluginType());
        Assertions.assertEquals("i", model.interfaceName());
        Assertions.assertEquals(IpAllocationType.DUAL_STACK, model.ipAllocationType());
        Assertions.assertEquals("rcgp", model.ipv4ConnectedPrefix());
        Assertions.assertEquals("pzimejzanlfzxi", model.ipv6ConnectedPrefix());
        Assertions.assertEquals("vrmbzono", model.l3IsolationDomainId());
        Assertions.assertEquals(4820100600000743353L, model.vlan());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        L3NetworkProperties model =
            new L3NetworkProperties()
                .withHybridAksIpamEnabled(HybridAksIpamEnabled.TRUE)
                .withHybridAksPluginType(HybridAksPluginType.OSDEVICE)
                .withInterfaceName("i")
                .withIpAllocationType(IpAllocationType.DUAL_STACK)
                .withIpv4ConnectedPrefix("rcgp")
                .withIpv6ConnectedPrefix("pzimejzanlfzxi")
                .withL3IsolationDomainId("vrmbzono")
                .withVlan(4820100600000743353L);
        model = BinaryData.fromObject(model).toObject(L3NetworkProperties.class);
        Assertions.assertEquals(HybridAksIpamEnabled.TRUE, model.hybridAksIpamEnabled());
        Assertions.assertEquals(HybridAksPluginType.OSDEVICE, model.hybridAksPluginType());
        Assertions.assertEquals("i", model.interfaceName());
        Assertions.assertEquals(IpAllocationType.DUAL_STACK, model.ipAllocationType());
        Assertions.assertEquals("rcgp", model.ipv4ConnectedPrefix());
        Assertions.assertEquals("pzimejzanlfzxi", model.ipv6ConnectedPrefix());
        Assertions.assertEquals("vrmbzono", model.l3IsolationDomainId());
        Assertions.assertEquals(4820100600000743353L, model.vlan());
    }
}
