/* 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 { mapValues } from '../runtime';
import { AggregationFromJSON, AggregationToJSON, } from './Aggregation';
import { SourceFilterFromJSON, SourceFilterToJSON, } from './SourceFilter';
import { HighlightFromJSON, HighlightToJSON, } from './Highlight';
import { RescoreFromJSON, RescoreToJSON, } from './Rescore';
import { FieldCollapseFromJSON, FieldCollapseToJSON, } from './FieldCollapse';
import { DslQueryFromJSON, DslQueryToJSON, } from './DslQuery';
/**
 * Check if a given object implements the SearchSearchQuery interface.
 */
export function instanceOfSearchSearchQuery(value) {
    return true;
}
export function SearchSearchQueryFromJSON(json) {
    return SearchSearchQueryFromJSONTyped(json, false);
}
export function SearchSearchQueryFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'query': json['query'] == null ? undefined : DslQueryFromJSON(json['query']),
        'post_filter': json['post_filter'] == null ? undefined : DslQueryFromJSON(json['post_filter']),
        'aggregations': json['aggregations'] == null ? undefined : (mapValues(json['aggregations'], AggregationFromJSON)),
        'highlight': json['highlight'] == null ? undefined : HighlightFromJSON(json['highlight']),
        'collapse': json['collapse'] == null ? undefined : FieldCollapseFromJSON(json['collapse']),
        'rescore': json['rescore'] == null ? undefined : RescoreFromJSON(json['rescore']),
        'sort': json['sort'] == null ? undefined : json['sort'],
        '_source': json['_source'] == null ? undefined : SourceFilterFromJSON(json['_source']),
        'from': json['from'] == null ? undefined : json['from'],
        'size': json['size'] == null ? undefined : json['size'],
        'search_after': json['search_after'] == null ? undefined : json['search_after'],
    };
}
export function SearchSearchQueryToJSON(json) {
    return SearchSearchQueryToJSONTyped(json, false);
}
export function SearchSearchQueryToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'query': DslQueryToJSON(value['query']),
        'post_filter': DslQueryToJSON(value['post_filter']),
        'aggregations': value['aggregations'] == null ? undefined : (mapValues(value['aggregations'], AggregationToJSON)),
        'highlight': HighlightToJSON(value['highlight']),
        'collapse': FieldCollapseToJSON(value['collapse']),
        'rescore': RescoreToJSON(value['rescore']),
        'sort': value['sort'],
        '_source': SourceFilterToJSON(value['_source']),
        'from': value['from'],
        'size': value['size'],
        'search_after': value['search_after'],
    };
}
//# sourceMappingURL=SearchSearchQuery.js.map