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

package com.azure.resourcemanager.cognitiveservices.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.cognitiveservices.fluent.models.PrivateLinkResourceListResultInner;
import com.azure.resourcemanager.cognitiveservices.models.PrivateLinkResource;
import com.azure.resourcemanager.cognitiveservices.models.PrivateLinkResourceProperties;
import java.util.Arrays;

public final class PrivateLinkResourceListResultInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PrivateLinkResourceListResultInner model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"properties\":{\"groupId\":\"qtaruoujmkcjhwq\",\"requiredMembers\":[],\"requiredZoneNames\":[],\"displayName\":\"ybn\"},\"id\":\"jewgdrjerv\",\"name\":\"aen\",\"type\":\"pehindoygm\"},{\"properties\":{\"groupId\":\"hnzdndslgnayqi\",\"requiredMembers\":[],\"requiredZoneNames\":[],\"displayName\":\"uhavhql\"},\"id\":\"thuma\",\"name\":\"olbgycduiertgccy\",\"type\":\"vaolpsslqlf\"}]}")
                .toObject(PrivateLinkResourceListResultInner.class);
    }

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