/* 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 { GoogleCloudFileHandleFromJSONTyped, GoogleCloudFileHandleToJSON, } from './GoogleCloudFileHandle';
import { ProxyFileHandleFromJSONTyped, ProxyFileHandleToJSON, } from './ProxyFileHandle';
import { S3FileHandleFromJSONTyped, S3FileHandleToJSON, } from './S3FileHandle';
export function FileHandleFromJSON(json) {
    return FileHandleFromJSONTyped(json, false);
}
export function FileHandleFromJSONTyped(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.GoogleCloudFileHandle':
            return Object.assign({}, GoogleCloudFileHandleFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.file.GoogleCloudFileHandle' });
        case 'org.sagebionetworks.repo.model.file.ProxyFileHandle':
            return Object.assign({}, ProxyFileHandleFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.file.ProxyFileHandle' });
        case 'org.sagebionetworks.repo.model.file.S3FileHandle':
            return Object.assign({}, S3FileHandleFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.file.S3FileHandle' });
        default:
            return json;
    }
}
export function FileHandleToJSON(json) {
    return FileHandleToJSONTyped(json, false);
}
export function FileHandleToJSONTyped(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.GoogleCloudFileHandle':
            return Object.assign({}, GoogleCloudFileHandleToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.file.GoogleCloudFileHandle' });
        case 'org.sagebionetworks.repo.model.file.ProxyFileHandle':
            return Object.assign({}, ProxyFileHandleToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.file.ProxyFileHandle' });
        case 'org.sagebionetworks.repo.model.file.S3FileHandle':
            return Object.assign({}, S3FileHandleToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.file.S3FileHandle' });
        default:
            return value;
    }
}
//# sourceMappingURL=FileHandle.js.map