/* 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 { GoogleCloudFileHandleFromJSONTyped, GoogleCloudFileHandleToJSON, } from './GoogleCloudFileHandle';
import { S3FileHandleFromJSONTyped, S3FileHandleToJSON, } from './S3FileHandle';
export function CloudProviderFileHandleInterfaceFromJSON(json) {
    return CloudProviderFileHandleInterfaceFromJSONTyped(json, false);
}
export function CloudProviderFileHandleInterfaceFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        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.S3FileHandle':
            return Object.assign({}, S3FileHandleFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.file.S3FileHandle' });
        default:
            return json;
    }
}
export function CloudProviderFileHandleInterfaceToJSON(json) {
    return CloudProviderFileHandleInterfaceToJSONTyped(json, false);
}
export function CloudProviderFileHandleInterfaceToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        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.S3FileHandle':
            return Object.assign({}, S3FileHandleToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.file.S3FileHandle' });
        default:
            return value;
    }
}
//# sourceMappingURL=CloudProviderFileHandleInterface.js.map