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

package com.azure.resourcemanager.cosmosdbforpostgresql.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.PrivateLinkResourceInner;
import com.azure.resourcemanager.cosmosdbforpostgresql.models.PrivateLinkResourceListResult;
import java.util.Arrays;

public final class PrivateLinkResourceListResultTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PrivateLinkResourceListResult model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"properties\":{\"groupId\":\"vxieduugidyj\",\"requiredMembers\":[],\"requiredZoneNames\":[]},\"id\":\"y\",\"name\":\"osvexcsonpclhoc\",\"type\":\"hslkevleggzf\"},{\"properties\":{\"groupId\":\"fmvfaxkffeiit\",\"requiredMembers\":[],\"requiredZoneNames\":[]},\"id\":\"ez\",\"name\":\"v\",\"type\":\"hxmzsbbzoggig\"},{\"properties\":{\"groupId\":\"burvjxxjnspy\",\"requiredMembers\":[],\"requiredZoneNames\":[]},\"id\":\"oenkouknvudwti\",\"name\":\"kbldngkpocipa\",\"type\":\"yxoegukgjnp\"},{\"properties\":{\"groupId\":\"gygev\",\"requiredMembers\":[],\"requiredZoneNames\":[]},\"id\":\"yp\",\"name\":\"rbpizc\",\"type\":\"r\"}]}")
                .toObject(PrivateLinkResourceListResult.class);
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        PrivateLinkResourceListResult model =
            new PrivateLinkResourceListResult()
                .withValue(
                    Arrays
                        .asList(
                            new PrivateLinkResourceInner().withRequiredZoneNames(Arrays.asList()),
                            new PrivateLinkResourceInner().withRequiredZoneNames(Arrays.asList()),
                            new PrivateLinkResourceInner().withRequiredZoneNames(Arrays.asList()),
                            new PrivateLinkResourceInner().withRequiredZoneNames(Arrays.asList())));
        model = BinaryData.fromObject(model).toObject(PrivateLinkResourceListResult.class);
    }
}
