/* 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 { CountStarFromJSONTyped, CountStarToJSON, } from './CountStar';
import { SelectAllFromJSONTyped, SelectAllToJSON, } from './SelectAll';
import { SelectByNameFromJSONTyped, SelectByNameToJSON, } from './SelectByName';
import { SelectSelectionFromJSONTyped, SelectSelectionToJSON, } from './SelectSelection';
export function SelectItemFromJSON(json) {
    return SelectItemFromJSONTyped(json, false);
}
export function SelectItemFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.grid.query.SelectAll':
            return Object.assign({}, SelectAllFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.query.SelectAll' });
        case 'org.sagebionetworks.repo.model.grid.query.SelectByName':
            return Object.assign({}, SelectByNameFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.query.SelectByName' });
        case 'org.sagebionetworks.repo.model.grid.query.SelectSelection':
            return Object.assign({}, SelectSelectionFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.query.SelectSelection' });
        case 'org.sagebionetworks.repo.model.grid.query.function.CountStar':
            return Object.assign({}, CountStarFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.query.function.CountStar' });
        default:
            return json;
    }
}
export function SelectItemToJSON(json) {
    return SelectItemToJSONTyped(json, false);
}
export function SelectItemToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.grid.query.SelectAll':
            return Object.assign({}, SelectAllToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.query.SelectAll' });
        case 'org.sagebionetworks.repo.model.grid.query.SelectByName':
            return Object.assign({}, SelectByNameToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.query.SelectByName' });
        case 'org.sagebionetworks.repo.model.grid.query.SelectSelection':
            return Object.assign({}, SelectSelectionToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.query.SelectSelection' });
        case 'org.sagebionetworks.repo.model.grid.query.function.CountStar':
            return Object.assign({}, CountStarToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.query.function.CountStar' });
        default:
            return value;
    }
}
//# sourceMappingURL=SelectItem.js.map