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

package com.azure.resourcemanager.datamigration.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.datamigration.models.MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel;

public final class MigrateSqlServerSqlMISyncTaskOutputDatabaseLevelTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel model =
            BinaryData
                .fromString(
                    "{\"resultType\":\"DatabaseLevelOutput\",\"sourceDatabaseName\":\"npqfrtqlkzmeg\",\"migrationState\":\"FULL_BACKUP_UPLOAD_START\",\"startedOn\":\"2021-04-26T07:00:30Z\",\"endedOn\":\"2021-05-13T12:27Z\",\"fullBackupSetInfo\":{\"backupSetId\":\"yqdrf\",\"firstLsn\":\"cealzxwh\",\"lastLsn\":\"nsymoyqhlwigd\",\"lastModifiedTime\":\"2021-11-15T21:41:13Z\",\"backupType\":\"DifferentialPartial\",\"listOfBackupFiles\":[{\"fileLocation\":\"mf\",\"familySequenceNumber\":1845604298,\"status\":\"Restored\"},{\"fileLocation\":\"qvdaeyyguxakjsq\",\"familySequenceNumber\":1954072007,\"status\":\"Restoring\"},{\"fileLocation\":\"kgimsidxasic\",\"familySequenceNumber\":424119886,\"status\":\"Queued\"}],\"databaseName\":\"skgfmocwahpq\",\"backupStartDate\":\"2021-09-10T10:22:32Z\",\"backupFinishedDate\":\"2021-07-27T04:50:29Z\",\"isBackupRestored\":true},\"lastRestoredBackupSetInfo\":{\"backupSetId\":\"vjhhn\",\"firstLsn\":\"zybbj\",\"lastLsn\":\"dj\",\"lastModifiedTime\":\"2021-08-12T04:28:10Z\",\"backupType\":\"DifferentialPartial\",\"listOfBackupFiles\":[{\"fileLocation\":\"xevbl\",\"familySequenceNumber\":1474038091,\"status\":\"Arrived\"},{\"fileLocation\":\"jlageu\",\"familySequenceNumber\":1383886156,\"status\":\"Cancelled\"},{\"fileLocation\":\"smjbnkppxyn\",\"familySequenceNumber\":1909310911,\"status\":\"Arrived\"},{\"fileLocation\":\"eizzgwk\",\"familySequenceNumber\":2086736187,\"status\":\"Arrived\"}],\"databaseName\":\"feycxcktp\",\"backupStartDate\":\"2021-01-14T07:17:58Z\",\"backupFinishedDate\":\"2021-05-17T16:24Z\",\"isBackupRestored\":true},\"activeBackupSets\":[{\"backupSetId\":\"mx\",\"firstLsn\":\"ekkkzd\",\"lastLsn\":\"tkgdojbmxva\",\"lastModifiedTime\":\"2021-01-02T04:04:33Z\",\"backupType\":\"DifferentialDatabase\",\"listOfBackupFiles\":[],\"databaseName\":\"vecuijpx\",\"backupStartDate\":\"2021-06-11T16:30:21Z\",\"backupFinishedDate\":\"2021-11-05T03:20:02Z\",\"isBackupRestored\":true},{\"backupSetId\":\"ujwsawddjibabxvi\",\"firstLsn\":\"tvtzeexavoxtfg\",\"lastLsn\":\"cd\",\"lastModifiedTime\":\"2021-07-23T09:21:39Z\",\"backupType\":\"TransactionLog\",\"listOfBackupFiles\":[],\"databaseName\":\"q\",\"backupStartDate\":\"2021-10-15T07:24:14Z\",\"backupFinishedDate\":\"2021-11-12T14:00:05Z\",\"isBackupRestored\":false}],\"containerName\":\"slhhxudbxv\",\"errorPrefix\":\"htnsi\",\"isFullBackupRestored\":true,\"exceptionsAndWarnings\":[{\"message\":\"mes\",\"actionableMessage\":\"dlpagzrcxfail\",\"filePath\":\"xwmdboxd\",\"lineNumber\":\"sftufqobrjlna\",\"hResult\":287245464,\"stackTrace\":\"kknhxkizvytnrzv\"}],\"id\":\"jraaeranokqguk\"}")
                .toObject(MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel.class);
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel model = new MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel();
        model = BinaryData.fromObject(model).toObject(MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel.class);
    }
}
