/* tslint:disable */
/* eslint-disable */
/**
 * RMI Backend
 * Rug Munch Intelligence — institutional-grade crypto intelligence API. 13+ chains, 96 data providers, 8 MCP tools, x402 paid tier, sovereign-first FOSS.
 *
 * The version of the OpenAPI document: 2026.06.21
 * 
 *
 * 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';
/**
 * RAG search request.
 * @export
 * @interface SearchRequest
 */
export interface SearchRequest {
    /**
     * 
     * @type {string}
     * @memberof SearchRequest
     */
    query: string;
    /**
     * 
     * @type {string}
     * @memberof SearchRequest
     */
    collection?: string;
    /**
     * 
     * @type {number}
     * @memberof SearchRequest
     */
    topK?: number;
    /**
     * 
     * @type {number}
     * @memberof SearchRequest
     */
    minSimilarity?: number;
    /**
     * 
     * @type {{ [key: string]: any; }}
     * @memberof SearchRequest
     */
    filters?: { [key: string]: any; };
}

/**
 * Check if a given object implements the SearchRequest interface.
 */
export function instanceOfSearchRequest(value: object): value is SearchRequest {
    if (!('query' in value) || value['query'] === undefined) return false;
    return true;
}

export function SearchRequestFromJSON(json: any): SearchRequest {
    return SearchRequestFromJSONTyped(json, false);
}

export function SearchRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'query': json['query'],
        'collection': json['collection'] == null ? undefined : json['collection'],
        'topK': json['top_k'] == null ? undefined : json['top_k'],
        'minSimilarity': json['min_similarity'] == null ? undefined : json['min_similarity'],
        'filters': json['filters'] == null ? undefined : json['filters'],
    };
}

export function SearchRequestToJSON(json: any): SearchRequest {
    return SearchRequestToJSONTyped(json, false);
}

export function SearchRequestToJSONTyped(value?: SearchRequest | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {
        
        'query': value['query'],
        'collection': value['collection'],
        'top_k': value['topK'],
        'min_similarity': value['minSimilarity'],
        'filters': value['filters'],
    };
}

