/* 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 { MatchBoolPrefixFieldOptionsFromJSONTyped, MatchBoolPrefixFieldOptionsToJSON, } from './MatchBoolPrefixFieldOptions';
import { MatchFieldOptionsFromJSONTyped, MatchFieldOptionsToJSON, } from './MatchFieldOptions';
import { MultiMatchQueryFromJSONTyped, MultiMatchQueryToJSON, } from './MultiMatchQuery';
import { SimpleQueryStringQueryFromJSONTyped, SimpleQueryStringQueryToJSON, } from './SimpleQueryStringQuery';
export function MinimumShouldMatchOptionFromJSON(json) {
    return MinimumShouldMatchOptionFromJSONTyped(json, false);
}
export function MinimumShouldMatchOptionFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.search.dsl.MatchBoolPrefixFieldOptions':
            return Object.assign({}, MatchBoolPrefixFieldOptionsFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.MatchBoolPrefixFieldOptions' });
        case 'org.sagebionetworks.repo.model.search.dsl.MatchFieldOptions':
            return Object.assign({}, MatchFieldOptionsFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.MatchFieldOptions' });
        case 'org.sagebionetworks.repo.model.search.dsl.MultiMatchQuery':
            return Object.assign({}, MultiMatchQueryFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.MultiMatchQuery' });
        case 'org.sagebionetworks.repo.model.search.dsl.SimpleQueryStringQuery':
            return Object.assign({}, SimpleQueryStringQueryFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.SimpleQueryStringQuery' });
        default:
            return json;
    }
}
export function MinimumShouldMatchOptionToJSON(json) {
    return MinimumShouldMatchOptionToJSONTyped(json, false);
}
export function MinimumShouldMatchOptionToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.search.dsl.MatchBoolPrefixFieldOptions':
            return Object.assign({}, MatchBoolPrefixFieldOptionsToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.MatchBoolPrefixFieldOptions' });
        case 'org.sagebionetworks.repo.model.search.dsl.MatchFieldOptions':
            return Object.assign({}, MatchFieldOptionsToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.MatchFieldOptions' });
        case 'org.sagebionetworks.repo.model.search.dsl.MultiMatchQuery':
            return Object.assign({}, MultiMatchQueryToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.MultiMatchQuery' });
        case 'org.sagebionetworks.repo.model.search.dsl.SimpleQueryStringQuery':
            return Object.assign({}, SimpleQueryStringQueryToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.SimpleQueryStringQuery' });
        default:
            return value;
    }
}
//# sourceMappingURL=MinimumShouldMatchOption.js.map