/* 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 RecentPath
 */
export interface RecentPath {
    /**
     * Directory path
     * @type {string}
     * @memberof RecentPath
     */
    path: string;
    /**
     * Last time this path was used
     * @type {Date}
     * @memberof RecentPath
     */
    lastUsed: Date;
    /**
     * Number of times used
     * @type {number}
     * @memberof RecentPath
     */
    usageCount: number;
}

/**
 * Check if a given object implements the RecentPath interface.
 */
export function instanceOfRecentPath(value: object): value is RecentPath {
    if (!('path' in value) || value['path'] === undefined) return false;
    if (!('lastUsed' in value) || value['lastUsed'] === undefined) return false;
    if (!('usageCount' in value) || value['usageCount'] === undefined) return false;
    return true;
}

export function RecentPathFromJSON(json: any): RecentPath {
    return RecentPathFromJSONTyped(json, false);
}

export function RecentPathFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecentPath {
    if (json == null) {
        return json;
    }
    return {
        
        'path': json['path'],
        'lastUsed': (new Date(json['last_used'])),
        'usageCount': json['usage_count'],
    };
}

export function RecentPathToJSON(json: any): RecentPath {
    return RecentPathToJSONTyped(json, false);
}

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

    return {
        
        'path': value['path'],
        'last_used': ((value['lastUsed']).toISOString()),
        'usage_count': value['usageCount'],
    };
}

