/* 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 { MatchFieldOptionsFromJSONTyped, MatchFieldOptionsToJSON, } from './MatchFieldOptions';
import { MatchPhraseFieldOptionsFromJSONTyped, MatchPhraseFieldOptionsToJSON, } from './MatchPhraseFieldOptions';
import { MatchPhrasePrefixFieldOptionsFromJSONTyped, MatchPhrasePrefixFieldOptionsToJSON, } from './MatchPhrasePrefixFieldOptions';
import { MultiMatchQueryFromJSONTyped, MultiMatchQueryToJSON, } from './MultiMatchQuery';
export function ZeroTermsQueryOptionFromJSON(json) {
    return ZeroTermsQueryOptionFromJSONTyped(json, false);
}
export function ZeroTermsQueryOptionFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        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.MatchPhraseFieldOptions':
            return Object.assign({}, MatchPhraseFieldOptionsFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.MatchPhraseFieldOptions' });
        case 'org.sagebionetworks.repo.model.search.dsl.MatchPhrasePrefixFieldOptions':
            return Object.assign({}, MatchPhrasePrefixFieldOptionsFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.MatchPhrasePrefixFieldOptions' });
        case 'org.sagebionetworks.repo.model.search.dsl.MultiMatchQuery':
            return Object.assign({}, MultiMatchQueryFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.MultiMatchQuery' });
        default:
            return json;
    }
}
export function ZeroTermsQueryOptionToJSON(json) {
    return ZeroTermsQueryOptionToJSONTyped(json, false);
}
export function ZeroTermsQueryOptionToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        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.MatchPhraseFieldOptions':
            return Object.assign({}, MatchPhraseFieldOptionsToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.MatchPhraseFieldOptions' });
        case 'org.sagebionetworks.repo.model.search.dsl.MatchPhrasePrefixFieldOptions':
            return Object.assign({}, MatchPhrasePrefixFieldOptionsToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.MatchPhrasePrefixFieldOptions' });
        case 'org.sagebionetworks.repo.model.search.dsl.MultiMatchQuery':
            return Object.assign({}, MultiMatchQueryToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.MultiMatchQuery' });
        default:
            return value;
    }
}
//# sourceMappingURL=ZeroTermsQueryOption.js.map