/* 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 { UsedEntityFromJSONTyped, UsedEntityToJSON, } from './UsedEntity';
import { UsedURLFromJSONTyped, UsedURLToJSON, } from './UsedURL';
export function UsedFromJSON(json) {
    return UsedFromJSONTyped(json, false);
}
export function UsedFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.provenance.UsedEntity':
            return Object.assign({}, UsedEntityFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.provenance.UsedEntity' });
        case 'org.sagebionetworks.repo.model.provenance.UsedURL':
            return Object.assign({}, UsedURLFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.provenance.UsedURL' });
        default:
            return json;
    }
}
export function UsedToJSON(json) {
    return UsedToJSONTyped(json, false);
}
export function UsedToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.provenance.UsedEntity':
            return Object.assign({}, UsedEntityToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.provenance.UsedEntity' });
        case 'org.sagebionetworks.repo.model.provenance.UsedURL':
            return Object.assign({}, UsedURLToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.provenance.UsedURL' });
        default:
            return value;
    }
}
//# sourceMappingURL=Used.js.map