/* 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 { AsyncMigrationTypeCountRequestFromJSONTyped, AsyncMigrationTypeCountRequestToJSON, } from './AsyncMigrationTypeCountRequest';
import { AsyncMigrationTypeCountsRequestFromJSONTyped, AsyncMigrationTypeCountsRequestToJSON, } from './AsyncMigrationTypeCountsRequest';
import { BackupTypeRangeRequestFromJSONTyped, BackupTypeRangeRequestToJSON, } from './BackupTypeRangeRequest';
import { BatchChecksumRequestFromJSONTyped, BatchChecksumRequestToJSON, } from './BatchChecksumRequest';
import { CalculateOptimalRangeRequestFromJSONTyped, CalculateOptimalRangeRequestToJSON, } from './CalculateOptimalRangeRequest';
import { CreateForumsForAccessRequirementsRequestFromJSONTyped, CreateForumsForAccessRequirementsRequestToJSON, } from './CreateForumsForAccessRequirementsRequest';
import { RestoreTypeRequestFromJSONTyped, RestoreTypeRequestToJSON, } from './RestoreTypeRequest';
export function AdminRequestFromJSON(json) {
    return AdminRequestFromJSONTyped(json, false);
}
export function AdminRequestFromJSONTyped(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.AsyncMigrationTypeCountRequest':
            return Object.assign({}, AsyncMigrationTypeCountRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.migration.AsyncMigrationTypeCountRequest' });
        case 'org.sagebionetworks.repo.model.migration.AsyncMigrationTypeCountsRequest':
            return Object.assign({}, AsyncMigrationTypeCountsRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.migration.AsyncMigrationTypeCountsRequest' });
        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.CalculateOptimalRangeRequest':
            return Object.assign({}, CalculateOptimalRangeRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.migration.CalculateOptimalRangeRequest' });
        case 'org.sagebionetworks.repo.model.migration.CreateForumsForAccessRequirementsRequest':
            return Object.assign({}, CreateForumsForAccessRequirementsRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.migration.CreateForumsForAccessRequirementsRequest' });
        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 AdminRequestToJSON(json) {
    return AdminRequestToJSONTyped(json, false);
}
export function AdminRequestToJSONTyped(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.AsyncMigrationTypeCountRequest':
            return Object.assign({}, AsyncMigrationTypeCountRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.AsyncMigrationTypeCountRequest' });
        case 'org.sagebionetworks.repo.model.migration.AsyncMigrationTypeCountsRequest':
            return Object.assign({}, AsyncMigrationTypeCountsRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.AsyncMigrationTypeCountsRequest' });
        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.CalculateOptimalRangeRequest':
            return Object.assign({}, CalculateOptimalRangeRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.CalculateOptimalRangeRequest' });
        case 'org.sagebionetworks.repo.model.migration.CreateForumsForAccessRequirementsRequest':
            return Object.assign({}, CreateForumsForAccessRequirementsRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.CreateForumsForAccessRequirementsRequest' });
        case 'org.sagebionetworks.repo.model.migration.RestoreTypeRequest':
            return Object.assign({}, RestoreTypeRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.migration.RestoreTypeRequest' });
        default:
            return value;
    }
}
//# sourceMappingURL=AdminRequest.js.map