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

package com.azure.resourcemanager.hybridcontainerservice.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.hybridcontainerservice.fluent.models.ProvisionedClusterUpgradeProfileInner;
import com.azure.resourcemanager.hybridcontainerservice.models.ProvisionedClusterPoolUpgradeProfile;
import java.util.Arrays;

public final class ProvisionedClusterUpgradeProfileInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ProvisionedClusterUpgradeProfileInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"provisioningState\":\"nxytxh\",\"controlPlaneProfile\":{\"kubernetesVersion\":\"xbzpfzab\",\"name\":\"cuh\",\"osType\":\"Linux\",\"upgrades\":[]},\"agentPoolProfiles\":[{\"kubernetesVersion\":\"iklbbovpl\",\"name\":\"bhvgy\",\"osType\":\"Windows\",\"upgrades\":[]},{\"kubernetesVersion\":\"vmkfssxqu\",\"name\":\"fpl\",\"osType\":\"Windows\",\"upgrades\":[]},{\"kubernetesVersion\":\"nkjzkdeslpvlop\",\"name\":\"yighxpk\",\"osType\":\"Linux\",\"upgrades\":[]},{\"kubernetesVersion\":\"iuebbaumny\",\"name\":\"ped\",\"osType\":\"Linux\",\"upgrades\":[]}]},\"id\":\"a\",\"name\":\"ckhsmtxpsieb\",\"type\":\"fhvpesaps\"}")
                .toObject(ProvisionedClusterUpgradeProfileInner.class);
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ProvisionedClusterUpgradeProfileInner model =
            new ProvisionedClusterUpgradeProfileInner()
                .withControlPlaneProfile(new ProvisionedClusterPoolUpgradeProfile().withUpgrades(Arrays.asList()))
                .withAgentPoolProfiles(
                    Arrays
                        .asList(
                            new ProvisionedClusterPoolUpgradeProfile().withUpgrades(Arrays.asList()),
                            new ProvisionedClusterPoolUpgradeProfile().withUpgrades(Arrays.asList()),
                            new ProvisionedClusterPoolUpgradeProfile().withUpgrades(Arrays.asList()),
                            new ProvisionedClusterPoolUpgradeProfile().withUpgrades(Arrays.asList())));
        model = BinaryData.fromObject(model).toObject(ProvisionedClusterUpgradeProfileInner.class);
    }
}
