/* 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 { DatasetFromJSONTyped, DatasetToJSON, } from './Dataset';
import { DatasetCollectionFromJSONTyped, DatasetCollectionToJSON, } from './DatasetCollection';
export function EntityRefCollectionViewFromJSON(json) {
    return EntityRefCollectionViewFromJSONTyped(json, false);
}
export function EntityRefCollectionViewFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.table.Dataset':
            return Object.assign({}, DatasetFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.Dataset' });
        case 'org.sagebionetworks.repo.model.table.DatasetCollection':
            return Object.assign({}, DatasetCollectionFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.table.DatasetCollection' });
        default:
            return json;
    }
}
export function EntityRefCollectionViewToJSON(json) {
    return EntityRefCollectionViewToJSONTyped(json, false);
}
export function EntityRefCollectionViewToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.table.Dataset':
            return Object.assign({}, DatasetToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.Dataset' });
        case 'org.sagebionetworks.repo.model.table.DatasetCollection':
            return Object.assign({}, DatasetCollectionToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.table.DatasetCollection' });
        default:
            return value;
    }
}
//# sourceMappingURL=EntityRefCollectionView.js.map