/* 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 { SearchHitFromJSON, SearchHitToJSON, } from './SearchHit';
import { TableSelectColumnFromJSON, TableSelectColumnToJSON, } from './TableSelectColumn';
/**
 * @export
 */
export const SearchQueryResultsConcreteTypeEnum = {
    org_sagebionetworks_repo_model_search_SearchQueryResults: 'org.sagebionetworks.repo.model.search.SearchQueryResults'
};
/**
 * Check if a given object implements the SearchQueryResults interface.
 */
export function instanceOfSearchQueryResults(value) {
    if (!('concreteType' in value) || value['concreteType'] === undefined)
        return false;
    if (!Object.values(SearchQueryResultsConcreteTypeEnum).includes(value["concreteType"])) {
        return false;
    }
    return true;
}
export function SearchQueryResultsFromJSON(json) {
    return SearchQueryResultsFromJSONTyped(json, false);
}
export function SearchQueryResultsFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'concreteType': json['concreteType'],
        'hits': json['hits'] == null ? undefined : (json['hits'].map(SearchHitFromJSON)),
        'totalHits': json['totalHits'] == null ? undefined : json['totalHits'],
        'selectColumns': json['selectColumns'] == null ? undefined : (json['selectColumns'].map(TableSelectColumnFromJSON)),
        'aggregationResults': json['aggregationResults'] == null ? undefined : json['aggregationResults'],
        'nextSearchAfter': json['nextSearchAfter'] == null ? undefined : json['nextSearchAfter'],
        'offset': json['offset'] == null ? undefined : json['offset'],
    };
}
export function SearchQueryResultsToJSON(json) {
    return SearchQueryResultsToJSONTyped(json, false);
}
export function SearchQueryResultsToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'concreteType': value['concreteType'],
        'hits': value['hits'] == null ? undefined : (value['hits'].map(SearchHitToJSON)),
        'totalHits': value['totalHits'],
        'selectColumns': value['selectColumns'] == null ? undefined : (value['selectColumns'].map(TableSelectColumnToJSON)),
        'aggregationResults': value['aggregationResults'],
        'nextSearchAfter': value['nextSearchAfter'],
        'offset': value['offset'],
    };
}
//# sourceMappingURL=SearchQueryResults.js.map