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

package com.azure.resourcemanager.postgresqlflexibleserver.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FlexibleServerCapabilityInner;
import org.junit.jupiter.api.Assertions;

public final class FlexibleServerCapabilityInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        FlexibleServerCapabilityInner model =
            BinaryData
                .fromString(
                    "{\"name\":\"mkjozkrwf\",\"supportedServerEditions\":[{\"name\":\"djpslw\",\"defaultSkuName\":\"dpvwryoqpsoaccta\",\"supportedStorageEditions\":[],\"supportedServerSkus\":[],\"status\":\"Visible\",\"reason\":\"bcryffdfd\"},{\"name\":\"ygexpaojakhmsb\",\"defaultSkuName\":\"hcrzevd\",\"supportedStorageEditions\":[],\"supportedServerSkus\":[],\"status\":\"Default\",\"reason\":\"hqtrgqjbpf\"}],\"supportedServerVersions\":[{\"name\":\"n\",\"supportedVersionsToUpgrade\":[\"f\"],\"status\":\"Disabled\",\"reason\":\"zoxxjtf\"}],\"fastProvisioningSupported\":\"Disabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"zitonpeqfpjkjl\",\"supportedSku\":\"fpdvhpfxxypi\",\"supportedStorageGb\":7569944,\"supportedServerVersions\":\"ayhuy\",\"serverCount\":1192352775,\"status\":\"Default\",\"reason\":\"epoo\"},{\"supportedTier\":\"nuvamiheogna\",\"supportedSku\":\"zxtheotusivyevcc\",\"supportedStorageGb\":1522291140,\"supportedServerVersions\":\"nhungbw\",\"serverCount\":870807939,\"status\":\"Disabled\",\"reason\":\"gxg\"},{\"supportedTier\":\"pemvtzfkufubljof\",\"supportedSku\":\"eofjaeqjh\",\"supportedStorageGb\":158340850,\"supportedServerVersions\":\"s\",\"serverCount\":1818222173,\"status\":\"Visible\",\"reason\":\"ulngsntn\"},{\"supportedTier\":\"bkzgcwrwclx\",\"supportedSku\":\"rljdouskcqv\",\"supportedStorageGb\":422670277,\"supportedServerVersions\":\"cjdkwtnhxbnjbi\",\"serverCount\":1514521592,\"status\":\"Visible\",\"reason\":\"ssainqpjwnzll\"}],\"geoBackupSupported\":\"Disabled\",\"zoneRedundantHaSupported\":\"Enabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Disabled\",\"storageAutoGrowthSupported\":\"Enabled\",\"onlineResizeSupported\":\"Enabled\",\"restricted\":\"Disabled\",\"status\":\"Available\",\"reason\":\"yqduujit\"}")
                .toObject(FlexibleServerCapabilityInner.class);
        Assertions.assertEquals("mkjozkrwf", model.name());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        FlexibleServerCapabilityInner model = new FlexibleServerCapabilityInner().withName("mkjozkrwf");
        model = BinaryData.fromObject(model).toObject(FlexibleServerCapabilityInner.class);
        Assertions.assertEquals("mkjozkrwf", model.name());
    }
}
