/* 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 { HighlightFromJSONTyped, HighlightToJSON, } from './Highlight';
import { HighlightFieldFromJSONTyped, HighlightFieldToJSON, } from './HighlightField';
export function HighlightCommonOptionsFromJSON(json) {
    return HighlightCommonOptionsFromJSONTyped(json, false);
}
export function HighlightCommonOptionsFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.search.dsl.Highlight':
            return Object.assign({}, HighlightFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.Highlight' });
        case 'org.sagebionetworks.repo.model.search.dsl.HighlightField':
            return Object.assign({}, HighlightFieldFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.HighlightField' });
        default:
            return json;
    }
}
export function HighlightCommonOptionsToJSON(json) {
    return HighlightCommonOptionsToJSONTyped(json, false);
}
export function HighlightCommonOptionsToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.search.dsl.Highlight':
            return Object.assign({}, HighlightToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.Highlight' });
        case 'org.sagebionetworks.repo.model.search.dsl.HighlightField':
            return Object.assign({}, HighlightFieldToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.search.dsl.HighlightField' });
        default:
            return value;
    }
}
//# sourceMappingURL=HighlightCommonOptions.js.map