/* 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 NewsAnalysisResponse
 */
export interface NewsAnalysisResponse {
    /**
     * 
     * @type {string}
     * @memberof NewsAnalysisResponse
     */
    newsId: string;
    /**
     * 
     * @type {string}
     * @memberof NewsAnalysisResponse
     */
    analysis: string | null;
    /**
     * 
     * @type {string}
     * @memberof NewsAnalysisResponse
     */
    model?: string | null;
    /**
     * 
     * @type {string}
     * @memberof NewsAnalysisResponse
     */
    error?: string | null;
}

/**
 * Check if a given object implements the NewsAnalysisResponse interface.
 */
export function instanceOfNewsAnalysisResponse(value: object): value is NewsAnalysisResponse {
    if ((!('newsId' in value) && !('news_id' in value)) || (value['newsId'] === undefined && value['news_id'] === undefined)) return false;
    if (!('analysis' in value) || value['analysis'] === undefined) return false;
    return true;
}

export function NewsAnalysisResponseFromJSON(json: any): NewsAnalysisResponse {
    return NewsAnalysisResponseFromJSONTyped(json, false);
}

export function NewsAnalysisResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): NewsAnalysisResponse {
    if (json == null) {
        return json;
    }
    return {
        
        'newsId': json['news_id'],
        'analysis': json['analysis'],
        'model': json['model'] == null ? undefined : json['model'],
        'error': json['error'] == null ? undefined : json['error'],
    };
}

export function NewsAnalysisResponseToJSON(json: any): NewsAnalysisResponse {
    return NewsAnalysisResponseToJSONTyped(json, false);
}

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

    return {
        
        'news_id': value['newsId'],
        'analysis': value['analysis'],
        'model': value['model'],
        'error': value['error'],
    };
}

