/* 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';
/**
 * Scanner → RAG feedback record.
 * @export
 * @interface FeedbackRecord
 */
export interface FeedbackRecord {
    /**
     * 
     * @type {string}
     * @memberof FeedbackRecord
     */
    tokenAddress: string;
    /**
     * 
     * @type {string}
     * @memberof FeedbackRecord
     */
    chain?: string;
    /**
     * 
     * @type {number}
     * @memberof FeedbackRecord
     */
    safetyScore: number;
    /**
     * 
     * @type {Array<string>}
     * @memberof FeedbackRecord
     */
    riskFlags?: Array<string>;
    /**
     * 
     * @type {string}
     * @memberof FeedbackRecord
     */
    action?: string;
    /**
     * 
     * @type {string}
     * @memberof FeedbackRecord
     */
    source?: string;
}

/**
 * Check if a given object implements the FeedbackRecord interface.
 */
export function instanceOfFeedbackRecord(value: object): value is FeedbackRecord {
    if ((!('tokenAddress' in value) && !('token_address' in value)) || (value['tokenAddress'] === undefined && value['token_address'] === undefined)) return false;
    if ((!('safetyScore' in value) && !('safety_score' in value)) || (value['safetyScore'] === undefined && value['safety_score'] === undefined)) return false;
    return true;
}

export function FeedbackRecordFromJSON(json: any): FeedbackRecord {
    return FeedbackRecordFromJSONTyped(json, false);
}

export function FeedbackRecordFromJSONTyped(json: any, ignoreDiscriminator: boolean): FeedbackRecord {
    if (json == null) {
        return json;
    }
    return {
        
        'tokenAddress': json['token_address'],
        'chain': json['chain'] == null ? undefined : json['chain'],
        'safetyScore': json['safety_score'],
        'riskFlags': json['risk_flags'] == null ? undefined : json['risk_flags'],
        'action': json['action'] == null ? undefined : json['action'],
        'source': json['source'] == null ? undefined : json['source'],
    };
}

export function FeedbackRecordToJSON(json: any): FeedbackRecord {
    return FeedbackRecordToJSONTyped(json, false);
}

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

    return {
        
        'token_address': value['tokenAddress'],
        'chain': value['chain'],
        'safety_score': value['safetyScore'],
        'risk_flags': value['riskFlags'],
        'action': value['action'],
        'source': value['source'],
    };
}

