/* 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 { ExternalGoogleCloudUploadDestinationFromJSONTyped, ExternalGoogleCloudUploadDestinationToJSON, } from './ExternalGoogleCloudUploadDestination';
import { ExternalObjectStoreUploadDestinationFromJSONTyped, ExternalObjectStoreUploadDestinationToJSON, } from './ExternalObjectStoreUploadDestination';
import { ExternalS3UploadDestinationFromJSONTyped, ExternalS3UploadDestinationToJSON, } from './ExternalS3UploadDestination';
import { ExternalUploadDestinationFromJSONTyped, ExternalUploadDestinationToJSON, } from './ExternalUploadDestination';
import { S3UploadDestinationFromJSONTyped, S3UploadDestinationToJSON, } from './S3UploadDestination';
export function UploadDestinationFromJSON(json) {
    return UploadDestinationFromJSONTyped(json, false);
}
export function UploadDestinationFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.file.ExternalGoogleCloudUploadDestination':
            return Object.assign({}, ExternalGoogleCloudUploadDestinationFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.file.ExternalGoogleCloudUploadDestination' });
        case 'org.sagebionetworks.repo.model.file.ExternalObjectStoreUploadDestination':
            return Object.assign({}, ExternalObjectStoreUploadDestinationFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.file.ExternalObjectStoreUploadDestination' });
        case 'org.sagebionetworks.repo.model.file.ExternalS3UploadDestination':
            return Object.assign({}, ExternalS3UploadDestinationFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.file.ExternalS3UploadDestination' });
        case 'org.sagebionetworks.repo.model.file.ExternalUploadDestination':
            return Object.assign({}, ExternalUploadDestinationFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.file.ExternalUploadDestination' });
        case 'org.sagebionetworks.repo.model.file.S3UploadDestination':
            return Object.assign({}, S3UploadDestinationFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.file.S3UploadDestination' });
        default:
            return json;
    }
}
export function UploadDestinationToJSON(json) {
    return UploadDestinationToJSONTyped(json, false);
}
export function UploadDestinationToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.file.ExternalGoogleCloudUploadDestination':
            return Object.assign({}, ExternalGoogleCloudUploadDestinationToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.file.ExternalGoogleCloudUploadDestination' });
        case 'org.sagebionetworks.repo.model.file.ExternalObjectStoreUploadDestination':
            return Object.assign({}, ExternalObjectStoreUploadDestinationToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.file.ExternalObjectStoreUploadDestination' });
        case 'org.sagebionetworks.repo.model.file.ExternalS3UploadDestination':
            return Object.assign({}, ExternalS3UploadDestinationToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.file.ExternalS3UploadDestination' });
        case 'org.sagebionetworks.repo.model.file.ExternalUploadDestination':
            return Object.assign({}, ExternalUploadDestinationToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.file.ExternalUploadDestination' });
        case 'org.sagebionetworks.repo.model.file.S3UploadDestination':
            return Object.assign({}, S3UploadDestinationToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.file.S3UploadDestination' });
        default:
            return value;
    }
}
//# sourceMappingURL=UploadDestination.js.map