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

package com.azure.resourcemanager.security.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.security.fluent.models.IoTSecuritySolutionAnalyticsModelInner;
import com.azure.resourcemanager.security.fluent.models.IoTSecuritySolutionAnalyticsModelListInner;
import java.util.Arrays;

public final class IoTSecuritySolutionAnalyticsModelListInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        IoTSecuritySolutionAnalyticsModelListInner model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"properties\":{\"unhealthyDeviceCount\":623670055928945506,\"devicesMetrics\":[],\"topAlertedDevices\":[],\"mostPrevalentDeviceAlerts\":[],\"mostPrevalentDeviceRecommendations\":[]},\"id\":\"eyueaxibxujwb\",\"name\":\"qwalmuzyoxaepd\",\"type\":\"zjancuxr\"},{\"properties\":{\"unhealthyDeviceCount\":8073615781533611484,\"devicesMetrics\":[],\"topAlertedDevices\":[],\"mostPrevalentDeviceAlerts\":[],\"mostPrevalentDeviceRecommendations\":[]},\"id\":\"wd\",\"name\":\"swzts\",\"type\":\"bpg\"}],\"nextLink\":\"ytxhp\"}")
                .toObject(IoTSecuritySolutionAnalyticsModelListInner.class);
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        IoTSecuritySolutionAnalyticsModelListInner model =
            new IoTSecuritySolutionAnalyticsModelListInner()
                .withValue(
                    Arrays
                        .asList(
                            new IoTSecuritySolutionAnalyticsModelInner()
                                .withTopAlertedDevices(Arrays.asList())
                                .withMostPrevalentDeviceAlerts(Arrays.asList())
                                .withMostPrevalentDeviceRecommendations(Arrays.asList()),
                            new IoTSecuritySolutionAnalyticsModelInner()
                                .withTopAlertedDevices(Arrays.asList())
                                .withMostPrevalentDeviceAlerts(Arrays.asList())
                                .withMostPrevalentDeviceRecommendations(Arrays.asList())));
        model = BinaryData.fromObject(model).toObject(IoTSecuritySolutionAnalyticsModelListInner.class);
    }
}
