/* 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 { ExistsQueryFromJSONTyped, ExistsQueryToJSON, } from './ExistsQuery';
import { FuzzyFieldOptionsFromJSONTyped, FuzzyFieldOptionsToJSON, } from './FuzzyFieldOptions';
import { MatchAllQueryFromJSONTyped, MatchAllQueryToJSON, } from './MatchAllQuery';
import { MatchBoolPrefixFieldOptionsFromJSONTyped, MatchBoolPrefixFieldOptionsToJSON, } from './MatchBoolPrefixFieldOptions';
import { MatchFieldOptionsFromJSONTyped, MatchFieldOptionsToJSON, } from './MatchFieldOptions';
import { MatchPhraseFieldOptionsFromJSONTyped, MatchPhraseFieldOptionsToJSON, } from './MatchPhraseFieldOptions';
import { MatchPhrasePrefixFieldOptionsFromJSONTyped, MatchPhrasePrefixFieldOptionsToJSON, } from './MatchPhrasePrefixFieldOptions';
import { MultiMatchQueryFromJSONTyped, MultiMatchQueryToJSON, } from './MultiMatchQuery';
import { PrefixFieldOptionsFromJSONTyped, PrefixFieldOptionsToJSON, } from './PrefixFieldOptions';
import { RangeFieldOptionsFromJSONTyped, RangeFieldOptionsToJSON, } from './RangeFieldOptions';
import { SimpleQueryStringQueryFromJSONTyped, SimpleQueryStringQueryToJSON, } from './SimpleQueryStringQuery';
import { TermFieldOptionsFromJSONTyped, TermFieldOptionsToJSON, } from './TermFieldOptions';
import { WildcardFieldOptionsFromJSONTyped, WildcardFieldOptionsToJSON, } from './WildcardFieldOptions';
export function ClauseScoringOptionsFromJSON(json) {
    return ClauseScoringOptionsFromJSONTyped(json, false);
}
export function ClauseScoringOptionsFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.search.dsl.ExistsQuery':
            return Object.assign({}, ExistsQueryFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.ExistsQuery' });
        case 'org.sagebionetworks.repo.model.search.dsl.FuzzyFieldOptions':
            return Object.assign({}, FuzzyFieldOptionsFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.FuzzyFieldOptions' });
        case 'org.sagebionetworks.repo.model.search.dsl.MatchAllQuery':
            return Object.assign({}, MatchAllQueryFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.MatchAllQuery' });
        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.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' });
        case 'org.sagebionetworks.repo.model.search.dsl.PrefixFieldOptions':
            return Object.assign({}, PrefixFieldOptionsFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.PrefixFieldOptions' });
        case 'org.sagebionetworks.repo.model.search.dsl.RangeFieldOptions':
            return Object.assign({}, RangeFieldOptionsFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.RangeFieldOptions' });
        case 'org.sagebionetworks.repo.model.search.dsl.SimpleQueryStringQuery':
            return Object.assign({}, SimpleQueryStringQueryFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.SimpleQueryStringQuery' });
        case 'org.sagebionetworks.repo.model.search.dsl.TermFieldOptions':
            return Object.assign({}, TermFieldOptionsFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.TermFieldOptions' });
        case 'org.sagebionetworks.repo.model.search.dsl.WildcardFieldOptions':
            return Object.assign({}, WildcardFieldOptionsFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.WildcardFieldOptions' });
        default:
            return json;
    }
}
export function ClauseScoringOptionsToJSON(json) {
    return ClauseScoringOptionsToJSONTyped(json, false);
}
export function ClauseScoringOptionsToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.search.dsl.ExistsQuery':
            return Object.assign({}, ExistsQueryToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.ExistsQuery' });
        case 'org.sagebionetworks.repo.model.search.dsl.FuzzyFieldOptions':
            return Object.assign({}, FuzzyFieldOptionsToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.FuzzyFieldOptions' });
        case 'org.sagebionetworks.repo.model.search.dsl.MatchAllQuery':
            return Object.assign({}, MatchAllQueryToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.MatchAllQuery' });
        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.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' });
        case 'org.sagebionetworks.repo.model.search.dsl.PrefixFieldOptions':
            return Object.assign({}, PrefixFieldOptionsToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.PrefixFieldOptions' });
        case 'org.sagebionetworks.repo.model.search.dsl.RangeFieldOptions':
            return Object.assign({}, RangeFieldOptionsToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.RangeFieldOptions' });
        case 'org.sagebionetworks.repo.model.search.dsl.SimpleQueryStringQuery':
            return Object.assign({}, SimpleQueryStringQueryToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.SimpleQueryStringQuery' });
        case 'org.sagebionetworks.repo.model.search.dsl.TermFieldOptions':
            return Object.assign({}, TermFieldOptionsToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.TermFieldOptions' });
        case 'org.sagebionetworks.repo.model.search.dsl.WildcardFieldOptions':
            return Object.assign({}, WildcardFieldOptionsToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.WildcardFieldOptions' });
        default:
            return value;
    }
}
//# sourceMappingURL=ClauseScoringOptions.js.map