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

package com.azure.resourcemanager.appcomplianceautomation.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.appcomplianceautomation.models.DownloadType;
import com.azure.resourcemanager.appcomplianceautomation.models.SnapshotDownloadRequest;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class SnapshotDownloadRequestTests {
    @Test
    public void testDeserialize() {
        SnapshotDownloadRequest model =
            BinaryData
                .fromString(
                    "{\"reportCreatorTenantId\":\"qzbqjvsov\",\"downloadType\":\"ComplianceDetailedPdfReport\",\"offerGuid\":\"kacspkw\"}")
                .toObject(SnapshotDownloadRequest.class);
        Assertions.assertEquals("qzbqjvsov", model.reportCreatorTenantId());
        Assertions.assertEquals(DownloadType.COMPLIANCE_DETAILED_PDF_REPORT, model.downloadType());
        Assertions.assertEquals("kacspkw", model.offerGuid());
    }

    @Test
    public void testSerialize() {
        SnapshotDownloadRequest model =
            new SnapshotDownloadRequest()
                .withReportCreatorTenantId("qzbqjvsov")
                .withDownloadType(DownloadType.COMPLIANCE_DETAILED_PDF_REPORT)
                .withOfferGuid("kacspkw");
        model = BinaryData.fromObject(model).toObject(SnapshotDownloadRequest.class);
        Assertions.assertEquals("qzbqjvsov", model.reportCreatorTenantId());
        Assertions.assertEquals(DownloadType.COMPLIANCE_DETAILED_PDF_REPORT, model.downloadType());
        Assertions.assertEquals("kacspkw", model.offerGuid());
    }
}
