/* 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 { HitFromJSON, HitToJSON, } from './Hit';
import { FacetFromJSON, FacetToJSON, } from './Facet';
/**
 * Check if a given object implements the SearchResults interface.
 */
export function instanceOfSearchResults(value) {
    return true;
}
export function SearchResultsFromJSON(json) {
    return SearchResultsFromJSONTyped(json, false);
}
export function SearchResultsFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'found': json['found'] == null ? undefined : json['found'],
        'start': json['start'] == null ? undefined : json['start'],
        'matchExpression': json['matchExpression'] == null ? undefined : json['matchExpression'],
        'hits': json['hits'] == null ? undefined : (json['hits'].map(HitFromJSON)),
        'facets': json['facets'] == null ? undefined : (json['facets'].map(FacetFromJSON)),
    };
}
export function SearchResultsToJSON(json) {
    return SearchResultsToJSONTyped(json, false);
}
export function SearchResultsToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'found': value['found'],
        'start': value['start'],
        'matchExpression': value['matchExpression'],
        'hits': value['hits'] == null ? undefined : (value['hits'].map(HitToJSON)),
        'facets': value['facets'] == null ? undefined : (value['facets'].map(FacetToJSON)),
    };
}
//# sourceMappingURL=SearchResults.js.map