/* 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 GenerateResponse
 */
export interface GenerateResponse {
    /**
     * 
     * @type {string}
     * @memberof GenerateResponse
     */
    reportId: string;
    /**
     * 
     * @type {string}
     * @memberof GenerateResponse
     */
    subjectType: string;
    /**
     * 
     * @type {string}
     * @memberof GenerateResponse
     */
    subjectId: string;
    /**
     * 
     * @type {number}
     * @memberof GenerateResponse
     */
    riskScore: number;
    /**
     * 
     * @type {string}
     * @memberof GenerateResponse
     */
    riskTier: string;
    /**
     * 
     * @type {Array<string>}
     * @memberof GenerateResponse
     */
    riskFactors?: Array<string>;
    /**
     * 
     * @type {string}
     * @memberof GenerateResponse
     */
    generatedByModel: string;
    /**
     * 
     * @type {string}
     * @memberof GenerateResponse
     */
    generatedAt: string;
    /**
     * 
     * @type {{ [key: string]: string; }}
     * @memberof GenerateResponse
     */
    sections?: { [key: string]: string; };
    /**
     * 
     * @type {string}
     * @memberof GenerateResponse
     */
    markdown: string;
    /**
     * 
     * @type {string}
     * @memberof GenerateResponse
     */
    paidViaX402?: string | null;
    /**
     * 
     * @type {string}
     * @memberof GenerateResponse
     */
    error?: string | null;
}

/**
 * Check if a given object implements the GenerateResponse interface.
 */
export function instanceOfGenerateResponse(value: object): value is GenerateResponse {
    if ((!('reportId' in value) && !('report_id' in value)) || (value['reportId'] === undefined && value['report_id'] === undefined)) return false;
    if ((!('subjectType' in value) && !('subject_type' in value)) || (value['subjectType'] === undefined && value['subject_type'] === undefined)) return false;
    if ((!('subjectId' in value) && !('subject_id' in value)) || (value['subjectId'] === undefined && value['subject_id'] === undefined)) return false;
    if ((!('riskScore' in value) && !('risk_score' in value)) || (value['riskScore'] === undefined && value['risk_score'] === undefined)) return false;
    if ((!('riskTier' in value) && !('risk_tier' in value)) || (value['riskTier'] === undefined && value['risk_tier'] === undefined)) return false;
    if ((!('generatedByModel' in value) && !('generated_by_model' in value)) || (value['generatedByModel'] === undefined && value['generated_by_model'] === undefined)) return false;
    if ((!('generatedAt' in value) && !('generated_at' in value)) || (value['generatedAt'] === undefined && value['generated_at'] === undefined)) return false;
    if (!('markdown' in value) || value['markdown'] === undefined) return false;
    return true;
}

export function GenerateResponseFromJSON(json: any): GenerateResponse {
    return GenerateResponseFromJSONTyped(json, false);
}

export function GenerateResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GenerateResponse {
    if (json == null) {
        return json;
    }
    return {
        
        'reportId': json['report_id'],
        'subjectType': json['subject_type'],
        'subjectId': json['subject_id'],
        'riskScore': json['risk_score'],
        'riskTier': json['risk_tier'],
        'riskFactors': json['risk_factors'] == null ? undefined : json['risk_factors'],
        'generatedByModel': json['generated_by_model'],
        'generatedAt': json['generated_at'],
        'sections': json['sections'] == null ? undefined : json['sections'],
        'markdown': json['markdown'],
        'paidViaX402': json['paid_via_x402'] == null ? undefined : json['paid_via_x402'],
        'error': json['error'] == null ? undefined : json['error'],
    };
}

export function GenerateResponseToJSON(json: any): GenerateResponse {
    return GenerateResponseToJSONTyped(json, false);
}

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

    return {
        
        'report_id': value['reportId'],
        'subject_type': value['subjectType'],
        'subject_id': value['subjectId'],
        'risk_score': value['riskScore'],
        'risk_tier': value['riskTier'],
        'risk_factors': value['riskFactors'],
        'generated_by_model': value['generatedByModel'],
        'generated_at': value['generatedAt'],
        'sections': value['sections'],
        'markdown': value['markdown'],
        'paid_via_x402': value['paidViaX402'],
        'error': value['error'],
    };
}

