/* 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 { AvgAggregationFromJSONTyped, AvgAggregationToJSON, } from './AvgAggregation';
import { CardinalityAggregationFromJSONTyped, CardinalityAggregationToJSON, } from './CardinalityAggregation';
import { ExtendedStatsAggregationFromJSONTyped, ExtendedStatsAggregationToJSON, } from './ExtendedStatsAggregation';
import { MaxAggregationFromJSONTyped, MaxAggregationToJSON, } from './MaxAggregation';
import { MinAggregationFromJSONTyped, MinAggregationToJSON, } from './MinAggregation';
import { StatsAggregationFromJSONTyped, StatsAggregationToJSON, } from './StatsAggregation';
import { SumAggregationFromJSONTyped, SumAggregationToJSON, } from './SumAggregation';
import { ValueCountAggregationFromJSONTyped, ValueCountAggregationToJSON, } from './ValueCountAggregation';
export function MissingValueOptionFromJSON(json) {
    return MissingValueOptionFromJSONTyped(json, false);
}
export function MissingValueOptionFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.search.dsl.AvgAggregation':
            return Object.assign({}, AvgAggregationFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.AvgAggregation' });
        case 'org.sagebionetworks.repo.model.search.dsl.CardinalityAggregation':
            return Object.assign({}, CardinalityAggregationFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.CardinalityAggregation' });
        case 'org.sagebionetworks.repo.model.search.dsl.ExtendedStatsAggregation':
            return Object.assign({}, ExtendedStatsAggregationFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.ExtendedStatsAggregation' });
        case 'org.sagebionetworks.repo.model.search.dsl.MaxAggregation':
            return Object.assign({}, MaxAggregationFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.MaxAggregation' });
        case 'org.sagebionetworks.repo.model.search.dsl.MinAggregation':
            return Object.assign({}, MinAggregationFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.MinAggregation' });
        case 'org.sagebionetworks.repo.model.search.dsl.StatsAggregation':
            return Object.assign({}, StatsAggregationFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.StatsAggregation' });
        case 'org.sagebionetworks.repo.model.search.dsl.SumAggregation':
            return Object.assign({}, SumAggregationFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.SumAggregation' });
        case 'org.sagebionetworks.repo.model.search.dsl.ValueCountAggregation':
            return Object.assign({}, ValueCountAggregationFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.ValueCountAggregation' });
        default:
            return json;
    }
}
export function MissingValueOptionToJSON(json) {
    return MissingValueOptionToJSONTyped(json, false);
}
export function MissingValueOptionToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.search.dsl.AvgAggregation':
            return Object.assign({}, AvgAggregationToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.AvgAggregation' });
        case 'org.sagebionetworks.repo.model.search.dsl.CardinalityAggregation':
            return Object.assign({}, CardinalityAggregationToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.CardinalityAggregation' });
        case 'org.sagebionetworks.repo.model.search.dsl.ExtendedStatsAggregation':
            return Object.assign({}, ExtendedStatsAggregationToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.ExtendedStatsAggregation' });
        case 'org.sagebionetworks.repo.model.search.dsl.MaxAggregation':
            return Object.assign({}, MaxAggregationToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.MaxAggregation' });
        case 'org.sagebionetworks.repo.model.search.dsl.MinAggregation':
            return Object.assign({}, MinAggregationToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.MinAggregation' });
        case 'org.sagebionetworks.repo.model.search.dsl.StatsAggregation':
            return Object.assign({}, StatsAggregationToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.StatsAggregation' });
        case 'org.sagebionetworks.repo.model.search.dsl.SumAggregation':
            return Object.assign({}, SumAggregationToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.SumAggregation' });
        case 'org.sagebionetworks.repo.model.search.dsl.ValueCountAggregation':
            return Object.assign({}, ValueCountAggregationToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.ValueCountAggregation' });
        default:
            return value;
    }
}
//# sourceMappingURL=MissingValueOption.js.map