/* 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 { BackupTypeResponseFromJSONTyped, BackupTypeResponseToJSON, } from './BackupTypeResponse';
import { BatchChecksumResponseFromJSONTyped, BatchChecksumResponseToJSON, } from './BatchChecksumResponse';
import { CalculateOptimalRangeResponseFromJSONTyped, CalculateOptimalRangeResponseToJSON, } from './CalculateOptimalRangeResponse';
import { CreateForumsForAccessRequirementsResponseFromJSONTyped, CreateForumsForAccessRequirementsResponseToJSON, } from './CreateForumsForAccessRequirementsResponse';
import { MigrationRangeChecksumFromJSONTyped, MigrationRangeChecksumToJSON, } from './MigrationRangeChecksum';
import { MigrationTypeChecksumFromJSONTyped, MigrationTypeChecksumToJSON, } from './MigrationTypeChecksum';
import { MigrationTypeCountFromJSONTyped, MigrationTypeCountToJSON, } from './MigrationTypeCount';
import { MigrationTypeCountsFromJSONTyped, MigrationTypeCountsToJSON, } from './MigrationTypeCounts';
import { RestoreTypeResponseFromJSONTyped, RestoreTypeResponseToJSON, } from './RestoreTypeResponse';
export function AdminResponseFromJSON(json) {
    return AdminResponseFromJSONTyped(json, false);
}
export function AdminResponseFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.migration.BackupTypeResponse':
            return Object.assign({}, BackupTypeResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.migration.BackupTypeResponse' });
        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.CalculateOptimalRangeResponse':
            return Object.assign({}, CalculateOptimalRangeResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.migration.CalculateOptimalRangeResponse' });
        case 'org.sagebionetworks.repo.model.migration.CreateForumsForAccessRequirementsResponse':
            return Object.assign({}, CreateForumsForAccessRequirementsResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.migration.CreateForumsForAccessRequirementsResponse' });
        case 'org.sagebionetworks.repo.model.migration.MigrationRangeChecksum':
            return Object.assign({}, MigrationRangeChecksumFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.migration.MigrationRangeChecksum' });
        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.MigrationTypeCount':
            return Object.assign({}, MigrationTypeCountFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.migration.MigrationTypeCount' });
        case 'org.sagebionetworks.repo.model.migration.MigrationTypeCounts':
            return Object.assign({}, MigrationTypeCountsFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.migration.MigrationTypeCounts' });
        case 'org.sagebionetworks.repo.model.migration.RestoreTypeResponse':
            return Object.assign({}, RestoreTypeResponseFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.migration.RestoreTypeResponse' });
        default:
            return json;
    }
}
export function AdminResponseToJSON(json) {
    return AdminResponseToJSONTyped(json, false);
}
export function AdminResponseToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.migration.BackupTypeResponse':
            return Object.assign({}, BackupTypeResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.BackupTypeResponse' });
        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.CalculateOptimalRangeResponse':
            return Object.assign({}, CalculateOptimalRangeResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.CalculateOptimalRangeResponse' });
        case 'org.sagebionetworks.repo.model.migration.CreateForumsForAccessRequirementsResponse':
            return Object.assign({}, CreateForumsForAccessRequirementsResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.CreateForumsForAccessRequirementsResponse' });
        case 'org.sagebionetworks.repo.model.migration.MigrationRangeChecksum':
            return Object.assign({}, MigrationRangeChecksumToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.MigrationRangeChecksum' });
        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.MigrationTypeCount':
            return Object.assign({}, MigrationTypeCountToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.MigrationTypeCount' });
        case 'org.sagebionetworks.repo.model.migration.MigrationTypeCounts':
            return Object.assign({}, MigrationTypeCountsToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.MigrationTypeCounts' });
        case 'org.sagebionetworks.repo.model.migration.RestoreTypeResponse':
            return Object.assign({}, RestoreTypeResponseToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.RestoreTypeResponse' });
        default:
            return value;
    }
}
//# sourceMappingURL=AdminResponse.js.map