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

package com.azure.resourcemanager.recoveryservicesbackup.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.recoveryservicesbackup.models.DataMoveLevel;
import com.azure.resourcemanager.recoveryservicesbackup.models.TriggerDataMoveRequest;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class TriggerDataMoveRequestTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        TriggerDataMoveRequest model =
            BinaryData
                .fromString(
                    "{\"sourceResourceId\":\"lhbxxhejjzzvdud\",\"sourceRegion\":\"wdslfhotwmcy\",\"dataMoveLevel\":\"Vault\",\"correlationId\":\"wlbjnpgacftade\",\"sourceContainerArmIds\":[\"ltyfsop\",\"usue\",\"nzwdejba\",\"orxzdmohctbqvud\"],\"pauseGC\":false}")
                .toObject(TriggerDataMoveRequest.class);
        Assertions.assertEquals("lhbxxhejjzzvdud", model.sourceResourceId());
        Assertions.assertEquals("wdslfhotwmcy", model.sourceRegion());
        Assertions.assertEquals(DataMoveLevel.VAULT, model.dataMoveLevel());
        Assertions.assertEquals("wlbjnpgacftade", model.correlationId());
        Assertions.assertEquals("ltyfsop", model.sourceContainerArmIds().get(0));
        Assertions.assertEquals(false, model.pauseGC());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        TriggerDataMoveRequest model =
            new TriggerDataMoveRequest()
                .withSourceResourceId("lhbxxhejjzzvdud")
                .withSourceRegion("wdslfhotwmcy")
                .withDataMoveLevel(DataMoveLevel.VAULT)
                .withCorrelationId("wlbjnpgacftade")
                .withSourceContainerArmIds(Arrays.asList("ltyfsop", "usue", "nzwdejba", "orxzdmohctbqvud"))
                .withPauseGC(false);
        model = BinaryData.fromObject(model).toObject(TriggerDataMoveRequest.class);
        Assertions.assertEquals("lhbxxhejjzzvdud", model.sourceResourceId());
        Assertions.assertEquals("wdslfhotwmcy", model.sourceRegion());
        Assertions.assertEquals(DataMoveLevel.VAULT, model.dataMoveLevel());
        Assertions.assertEquals("wlbjnpgacftade", model.correlationId());
        Assertions.assertEquals("ltyfsop", model.sourceContainerArmIds().get(0));
        Assertions.assertEquals(false, model.pauseGC());
    }
}
