/* tslint:disable */
/* eslint-disable */
/**
 * Synapse REST API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
import { AsyncMigrationRangeChecksumRequestFromJSONTyped, AsyncMigrationRangeChecksumRequestToJSON, } from './AsyncMigrationRangeChecksumRequest';
import { AsyncMigrationTypeChecksumRequestFromJSONTyped, AsyncMigrationTypeChecksumRequestToJSON, } from './AsyncMigrationTypeChecksumRequest';
import { BackupTypeRangeRequestFromJSONTyped, BackupTypeRangeRequestToJSON, } from './BackupTypeRangeRequest';
import { BatchChecksumRequestFromJSONTyped, BatchChecksumRequestToJSON, } from './BatchChecksumRequest';
import { BatchChecksumResponseFromJSONTyped, BatchChecksumResponseToJSON, } from './BatchChecksumResponse';
import { CalculateOptimalRangeRequestFromJSONTyped, CalculateOptimalRangeRequestToJSON, } from './CalculateOptimalRangeRequest';
import { CalculateOptimalRangeResponseFromJSONTyped, CalculateOptimalRangeResponseToJSON, } from './CalculateOptimalRangeResponse';
import { MigrationTypeChecksumFromJSONTyped, MigrationTypeChecksumToJSON, } from './MigrationTypeChecksum';
import { RestoreTypeRequestFromJSONTyped, RestoreTypeRequestToJSON, } from './RestoreTypeRequest';
export function HasMigrationTypeFromJSON(json) {
    return HasMigrationTypeFromJSONTyped(json, false);
}
export function HasMigrationTypeFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.migration.AsyncMigrationRangeChecksumRequest':
            return Object.assign({}, AsyncMigrationRangeChecksumRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.migration.AsyncMigrationRangeChecksumRequest' });
        case 'org.sagebionetworks.repo.model.migration.AsyncMigrationTypeChecksumRequest':
            return Object.assign({}, AsyncMigrationTypeChecksumRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.migration.AsyncMigrationTypeChecksumRequest' });
        case 'org.sagebionetworks.repo.model.migration.BackupTypeRangeRequest':
            return Object.assign({}, BackupTypeRangeRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.migration.BackupTypeRangeRequest' });
        case 'org.sagebionetworks.repo.model.migration.BatchChecksumRequest':
            return Object.assign({}, BatchChecksumRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.migration.BatchChecksumRequest' });
        case 'org.sagebionetworks.repo.model.migration.BatchChecksumResponse':
            return Object.assign({}, BatchChecksumResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.migration.BatchChecksumResponse' });
        case 'org.sagebionetworks.repo.model.migration.CalculateOptimalRangeRequest':
            return Object.assign({}, CalculateOptimalRangeRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.migration.CalculateOptimalRangeRequest' });
        case 'org.sagebionetworks.repo.model.migration.CalculateOptimalRangeResponse':
            return Object.assign({}, CalculateOptimalRangeResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.migration.CalculateOptimalRangeResponse' });
        case 'org.sagebionetworks.repo.model.migration.MigrationTypeChecksum':
            return Object.assign({}, MigrationTypeChecksumFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.migration.MigrationTypeChecksum' });
        case 'org.sagebionetworks.repo.model.migration.RestoreTypeRequest':
            return Object.assign({}, RestoreTypeRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.migration.RestoreTypeRequest' });
        default:
            return json;
    }
}
export function HasMigrationTypeToJSON(json) {
    return HasMigrationTypeToJSONTyped(json, false);
}
export function HasMigrationTypeToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.migration.AsyncMigrationRangeChecksumRequest':
            return Object.assign({}, AsyncMigrationRangeChecksumRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.AsyncMigrationRangeChecksumRequest' });
        case 'org.sagebionetworks.repo.model.migration.AsyncMigrationTypeChecksumRequest':
            return Object.assign({}, AsyncMigrationTypeChecksumRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.AsyncMigrationTypeChecksumRequest' });
        case 'org.sagebionetworks.repo.model.migration.BackupTypeRangeRequest':
            return Object.assign({}, BackupTypeRangeRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.BackupTypeRangeRequest' });
        case 'org.sagebionetworks.repo.model.migration.BatchChecksumRequest':
            return Object.assign({}, BatchChecksumRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.BatchChecksumRequest' });
        case 'org.sagebionetworks.repo.model.migration.BatchChecksumResponse':
            return Object.assign({}, BatchChecksumResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.BatchChecksumResponse' });
        case 'org.sagebionetworks.repo.model.migration.CalculateOptimalRangeRequest':
            return Object.assign({}, CalculateOptimalRangeRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.CalculateOptimalRangeRequest' });
        case 'org.sagebionetworks.repo.model.migration.CalculateOptimalRangeResponse':
            return Object.assign({}, CalculateOptimalRangeResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.CalculateOptimalRangeResponse' });
        case 'org.sagebionetworks.repo.model.migration.MigrationTypeChecksum':
            return Object.assign({}, MigrationTypeChecksumToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.MigrationTypeChecksum' });
        case 'org.sagebionetworks.repo.model.migration.RestoreTypeRequest':
            return Object.assign({}, RestoreTypeRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.RestoreTypeRequest' });
        default:
            return value;
    }
}
//# sourceMappingURL=HasMigrationType.js.map