/* 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 document ingestion request.
 * @export
 * @interface IngestRequest
 */
export interface IngestRequest {
    /**
     * 
     * @type {string}
     * @memberof IngestRequest
     */
    collection?: string;
    /**
     * 
     * @type {string}
     * @memberof IngestRequest
     */
    content: string;
    /**
     * 
     * @type {string}
     * @memberof IngestRequest
     */
    docId?: string | null;
    /**
     * 
     * @type {{ [key: string]: any; }}
     * @memberof IngestRequest
     */
    metadata?: { [key: string]: any; };
}

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

export function IngestRequestFromJSON(json: any): IngestRequest {
    return IngestRequestFromJSONTyped(json, false);
}

export function IngestRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): IngestRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'collection': json['collection'] == null ? undefined : json['collection'],
        'content': json['content'],
        'docId': json['doc_id'] == null ? undefined : json['doc_id'],
        'metadata': json['metadata'] == null ? undefined : json['metadata'],
    };
}

export function IngestRequestToJSON(json: any): IngestRequest {
    return IngestRequestToJSONTyped(json, false);
}

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

    return {
        
        'collection': value['collection'],
        'content': value['content'],
        'doc_id': value['docId'],
        'metadata': value['metadata'],
    };
}

