/* 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 { SearchFieldValueFromJSON, SearchFieldValueToJSON, } from './SearchFieldValue';
import { SearchHighlightFromJSON, SearchHighlightToJSON, } from './SearchHighlight';
/**
 * Check if a given object implements the SearchHit interface.
 */
export function instanceOfSearchHit(value) {
    return true;
}
export function SearchHitFromJSON(json) {
    return SearchHitFromJSONTyped(json, false);
}
export function SearchHitFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'rowId': json['rowId'] == null ? undefined : json['rowId'],
        'rowVersion': json['rowVersion'] == null ? undefined : json['rowVersion'],
        'score': json['score'] == null ? undefined : json['score'],
        'fields': json['fields'] == null ? undefined : (json['fields'].map(SearchFieldValueFromJSON)),
        'highlights': json['highlights'] == null ? undefined : (json['highlights'].map(SearchHighlightFromJSON)),
    };
}
export function SearchHitToJSON(json) {
    return SearchHitToJSONTyped(json, false);
}
export function SearchHitToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'rowId': value['rowId'],
        'rowVersion': value['rowVersion'],
        'score': value['score'],
        'fields': value['fields'] == null ? undefined : (value['fields'].map(SearchFieldValueToJSON)),
        'highlights': value['highlights'] == null ? undefined : (value['highlights'].map(SearchHighlightToJSON)),
    };
}
//# sourceMappingURL=SearchHit.js.map