/* tslint:disable */
/* eslint-disable */
/**
 * HumanLayer Daemon REST API
 * REST API for HumanLayer daemon operations, providing session management, approval workflows, and real-time event streaming capabilities. 
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 *
 * 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 DebugInfoResponse
 */
export interface DebugInfoResponse {
    /**
     * Path to the SQLite database file
     * @type {string}
     * @memberof DebugInfoResponse
     */
    path: string;
    /**
     * Size of the database file in bytes
     * @type {number}
     * @memberof DebugInfoResponse
     */
    size: number;
    /**
     * Number of tables in the database
     * @type {number}
     * @memberof DebugInfoResponse
     */
    tableCount: number;
    /**
     * Database statistics
     * @type {{ [key: string]: number; }}
     * @memberof DebugInfoResponse
     */
    stats: { [key: string]: number; };
    /**
     * CLI command configured for MCP servers
     * @type {string}
     * @memberof DebugInfoResponse
     */
    cliCommand: string;
    /**
     * Last modification time of the database file
     * @type {Date}
     * @memberof DebugInfoResponse
     */
    lastModified?: Date;
}

/**
 * Check if a given object implements the DebugInfoResponse interface.
 */
export function instanceOfDebugInfoResponse(value: object): value is DebugInfoResponse {
    if (!('path' in value) || value['path'] === undefined) return false;
    if (!('size' in value) || value['size'] === undefined) return false;
    if (!('tableCount' in value) || value['tableCount'] === undefined) return false;
    if (!('stats' in value) || value['stats'] === undefined) return false;
    if (!('cliCommand' in value) || value['cliCommand'] === undefined) return false;
    return true;
}

export function DebugInfoResponseFromJSON(json: any): DebugInfoResponse {
    return DebugInfoResponseFromJSONTyped(json, false);
}

export function DebugInfoResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DebugInfoResponse {
    if (json == null) {
        return json;
    }
    return {
        
        'path': json['path'],
        'size': json['size'],
        'tableCount': json['table_count'],
        'stats': json['stats'],
        'cliCommand': json['cli_command'],
        'lastModified': json['last_modified'] == null ? undefined : (new Date(json['last_modified'])),
    };
}

export function DebugInfoResponseToJSON(json: any): DebugInfoResponse {
    return DebugInfoResponseToJSONTyped(json, false);
}

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

    return {
        
        'path': value['path'],
        'size': value['size'],
        'table_count': value['tableCount'],
        'stats': value['stats'],
        'cli_command': value['cliCommand'],
        'last_modified': value['lastModified'] == null ? undefined : ((value['lastModified']).toISOString()),
    };
}

