/* 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 UsageResponse
 */
export interface UsageResponse {
    /**
     * 
     * @type {string}
     * @memberof UsageResponse
     */
    agentId: string;
    /**
     * 
     * @type {number}
     * @memberof UsageResponse
     */
    dailyCalls: number;
    /**
     * 
     * @type {number}
     * @memberof UsageResponse
     */
    freeLimit: number;
    /**
     * 
     * @type {number}
     * @memberof UsageResponse
     */
    paidCalls: number;
    /**
     * 
     * @type {number}
     * @memberof UsageResponse
     */
    totalUsd: number;
    /**
     * 
     * @type {Array<{ [key: string]: any; }>}
     * @memberof UsageResponse
     */
    recentReceipts?: Array<{ [key: string]: any; }>;
}

/**
 * Check if a given object implements the UsageResponse interface.
 */
export function instanceOfUsageResponse(value: object): value is UsageResponse {
    if ((!('agentId' in value) && !('agent_id' in value)) || (value['agentId'] === undefined && value['agent_id'] === undefined)) return false;
    if ((!('dailyCalls' in value) && !('daily_calls' in value)) || (value['dailyCalls'] === undefined && value['daily_calls'] === undefined)) return false;
    if ((!('freeLimit' in value) && !('free_limit' in value)) || (value['freeLimit'] === undefined && value['free_limit'] === undefined)) return false;
    if ((!('paidCalls' in value) && !('paid_calls' in value)) || (value['paidCalls'] === undefined && value['paid_calls'] === undefined)) return false;
    if ((!('totalUsd' in value) && !('total_usd' in value)) || (value['totalUsd'] === undefined && value['total_usd'] === undefined)) return false;
    return true;
}

export function UsageResponseFromJSON(json: any): UsageResponse {
    return UsageResponseFromJSONTyped(json, false);
}

export function UsageResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsageResponse {
    if (json == null) {
        return json;
    }
    return {
        
        'agentId': json['agent_id'],
        'dailyCalls': json['daily_calls'],
        'freeLimit': json['free_limit'],
        'paidCalls': json['paid_calls'],
        'totalUsd': json['total_usd'],
        'recentReceipts': json['recent_receipts'] == null ? undefined : json['recent_receipts'],
    };
}

export function UsageResponseToJSON(json: any): UsageResponse {
    return UsageResponseToJSONTyped(json, false);
}

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

    return {
        
        'agent_id': value['agentId'],
        'daily_calls': value['dailyCalls'],
        'free_limit': value['freeLimit'],
        'paid_calls': value['paidCalls'],
        'total_usd': value['totalUsd'],
        'recent_receipts': value['recentReceipts'],
    };
}

