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

package com.azure.resourcemanager.kusto.generated;

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

public final class ManagedPrivateEndpointInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ManagedPrivateEndpointInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"privateLinkResourceId\":\"qzvszjf\",\"privateLinkResourceRegion\":\"vjfdx\",\"groupId\":\"ivetvtcq\",\"requestMessage\":\"tdo\",\"provisioningState\":\"Moving\"},\"id\":\"xv\",\"name\":\"vxysl\",\"type\":\"bhsfxob\"}")
                .toObject(ManagedPrivateEndpointInner.class);
        Assertions.assertEquals("qzvszjf", model.privateLinkResourceId());
        Assertions.assertEquals("vjfdx", model.privateLinkResourceRegion());
        Assertions.assertEquals("ivetvtcq", model.groupId());
        Assertions.assertEquals("tdo", model.requestMessage());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ManagedPrivateEndpointInner model =
            new ManagedPrivateEndpointInner()
                .withPrivateLinkResourceId("qzvszjf")
                .withPrivateLinkResourceRegion("vjfdx")
                .withGroupId("ivetvtcq")
                .withRequestMessage("tdo");
        model = BinaryData.fromObject(model).toObject(ManagedPrivateEndpointInner.class);
        Assertions.assertEquals("qzvszjf", model.privateLinkResourceId());
        Assertions.assertEquals("vjfdx", model.privateLinkResourceRegion());
        Assertions.assertEquals("ivetvtcq", model.groupId());
        Assertions.assertEquals("tdo", model.requestMessage());
    }
}
