/* 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';
/**
 * 
 * @export
 * @interface RagSearchRequest
 */
export interface RagSearchRequest {
    /**
     * 
     * @type {string}
     * @memberof RagSearchRequest
     */
    query: string;
    /**
     * 
     * @type {string}
     * @memberof RagSearchRequest
     */
    collection?: string;
    /**
     * 
     * @type {number}
     * @memberof RagSearchRequest
     */
    topK?: number;
}

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

export function RagSearchRequestFromJSON(json: any): RagSearchRequest {
    return RagSearchRequestFromJSONTyped(json, false);
}

export function RagSearchRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RagSearchRequest {
    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'],
    };
}

export function RagSearchRequestToJSON(json: any): RagSearchRequest {
    return RagSearchRequestToJSONTyped(json, false);
}

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

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

