/* 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 { CellValueFilterFromJSONTyped, CellValueFilterToJSON, } from './CellValueFilter';
import { RowIdFilterFromJSONTyped, RowIdFilterToJSON, } from './RowIdFilter';
import { RowIsValidFilterFromJSONTyped, RowIsValidFilterToJSON, } from './RowIsValidFilter';
import { RowSelectionFilterFromJSONTyped, RowSelectionFilterToJSON, } from './RowSelectionFilter';
import { RowValidationResultFilterFromJSONTyped, RowValidationResultFilterToJSON, } from './RowValidationResultFilter';
export function FilterFromJSON(json) {
    return FilterFromJSONTyped(json, false);
}
export function FilterFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.grid.query.CellValueFilter':
            return Object.assign({}, CellValueFilterFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.query.CellValueFilter' });
        case 'org.sagebionetworks.repo.model.grid.query.RowIdFilter':
            return Object.assign({}, RowIdFilterFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.query.RowIdFilter' });
        case 'org.sagebionetworks.repo.model.grid.query.RowIsValidFilter':
            return Object.assign({}, RowIsValidFilterFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.query.RowIsValidFilter' });
        case 'org.sagebionetworks.repo.model.grid.query.RowSelectionFilter':
            return Object.assign({}, RowSelectionFilterFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.query.RowSelectionFilter' });
        case 'org.sagebionetworks.repo.model.grid.query.RowValidationResultFilter':
            return Object.assign({}, RowValidationResultFilterFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.grid.query.RowValidationResultFilter' });
        default:
            return json;
    }
}
export function FilterToJSON(json) {
    return FilterToJSONTyped(json, false);
}
export function FilterToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.grid.query.CellValueFilter':
            return Object.assign({}, CellValueFilterToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.query.CellValueFilter' });
        case 'org.sagebionetworks.repo.model.grid.query.RowIdFilter':
            return Object.assign({}, RowIdFilterToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.query.RowIdFilter' });
        case 'org.sagebionetworks.repo.model.grid.query.RowIsValidFilter':
            return Object.assign({}, RowIsValidFilterToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.query.RowIsValidFilter' });
        case 'org.sagebionetworks.repo.model.grid.query.RowSelectionFilter':
            return Object.assign({}, RowSelectionFilterToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.query.RowSelectionFilter' });
        case 'org.sagebionetworks.repo.model.grid.query.RowValidationResultFilter':
            return Object.assign({}, RowValidationResultFilterToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.grid.query.RowValidationResultFilter' });
        default:
            return value;
    }
}
//# sourceMappingURL=Filter.js.map