/* 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 { ExternalFileHandleFromJSONTyped, ExternalFileHandleToJSON, } from './ExternalFileHandle';
import { ExternalObjectStoreFileHandleFromJSONTyped, ExternalObjectStoreFileHandleToJSON, } from './ExternalObjectStoreFileHandle';
import { ProxyFileHandleFromJSONTyped, ProxyFileHandleToJSON, } from './ProxyFileHandle';
export function ExternalFileHandleInterfaceFromJSON(json) {
    return ExternalFileHandleInterfaceFromJSONTyped(json, false);
}
export function ExternalFileHandleInterfaceFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.file.ExternalFileHandle':
            return Object.assign({}, ExternalFileHandleFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.file.ExternalFileHandle' });
        case 'org.sagebionetworks.repo.model.file.ExternalObjectStoreFileHandle':
            return Object.assign({}, ExternalObjectStoreFileHandleFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.file.ExternalObjectStoreFileHandle' });
        case 'org.sagebionetworks.repo.model.file.ProxyFileHandle':
            return Object.assign({}, ProxyFileHandleFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.file.ProxyFileHandle' });
        default:
            return json;
    }
}
export function ExternalFileHandleInterfaceToJSON(json) {
    return ExternalFileHandleInterfaceToJSONTyped(json, false);
}
export function ExternalFileHandleInterfaceToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.file.ExternalFileHandle':
            return Object.assign({}, ExternalFileHandleToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.file.ExternalFileHandle' });
        case 'org.sagebionetworks.repo.model.file.ExternalObjectStoreFileHandle':
            return Object.assign({}, ExternalObjectStoreFileHandleToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.file.ExternalObjectStoreFileHandle' });
        case 'org.sagebionetworks.repo.model.file.ProxyFileHandle':
            return Object.assign({}, ProxyFileHandleToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.file.ProxyFileHandle' });
        default:
            return value;
    }
}
//# sourceMappingURL=ExternalFileHandleInterface.js.map