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

package com.azure.resourcemanager.elastic.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.elastic.fluent.models.MonitoredResourceInner;
import com.azure.resourcemanager.elastic.models.SendingLogs;
import org.junit.jupiter.api.Assertions;

public final class MonitoredResourceInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        MonitoredResourceInner model =
            BinaryData
                .fromString("{\"id\":\"kujysvlejuvfq\",\"sendingLogs\":\"False\",\"reasonForLogsStatus\":\"yxwjkcp\"}")
                .toObject(MonitoredResourceInner.class);
        Assertions.assertEquals("kujysvlejuvfq", model.id());
        Assertions.assertEquals(SendingLogs.FALSE, model.sendingLogs());
        Assertions.assertEquals("yxwjkcp", model.reasonForLogsStatus());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        MonitoredResourceInner model =
            new MonitoredResourceInner()
                .withId("kujysvlejuvfq")
                .withSendingLogs(SendingLogs.FALSE)
                .withReasonForLogsStatus("yxwjkcp");
        model = BinaryData.fromObject(model).toObject(MonitoredResourceInner.class);
        Assertions.assertEquals("kujysvlejuvfq", model.id());
        Assertions.assertEquals(SendingLogs.FALSE, model.sendingLogs());
        Assertions.assertEquals("yxwjkcp", model.reasonForLogsStatus());
    }
}
