/* 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 Agent
 */
export interface Agent {
    /**
     * Agent name from YAML frontmatter
     * @type {string}
     * @memberof Agent
     */
    name: string;
    /**
     * Text to use for mentions
     * @type {string}
     * @memberof Agent
     */
    mentionText: string;
    /**
     * Whether agent is from local or global directory
     * @type {string}
     * @memberof Agent
     */
    source: AgentSourceEnum;
    /**
     * Optional description from YAML frontmatter
     * @type {string}
     * @memberof Agent
     */
    description?: string;
}


/**
 * @export
 */
export const AgentSourceEnum = {
    Local: 'local',
    Global: 'global'
} as const;
export type AgentSourceEnum = typeof AgentSourceEnum[keyof typeof AgentSourceEnum];


/**
 * Check if a given object implements the Agent interface.
 */
export function instanceOfAgent(value: object): value is Agent {
    if (!('name' in value) || value['name'] === undefined) return false;
    if (!('mentionText' in value) || value['mentionText'] === undefined) return false;
    if (!('source' in value) || value['source'] === undefined) return false;
    return true;
}

export function AgentFromJSON(json: any): Agent {
    return AgentFromJSONTyped(json, false);
}

export function AgentFromJSONTyped(json: any, ignoreDiscriminator: boolean): Agent {
    if (json == null) {
        return json;
    }
    return {
        
        'name': json['name'],
        'mentionText': json['mentionText'],
        'source': json['source'],
        'description': json['description'] == null ? undefined : json['description'],
    };
}

export function AgentToJSON(json: any): Agent {
    return AgentToJSONTyped(json, false);
}

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

    return {
        
        'name': value['name'],
        'mentionText': value['mentionText'],
        'source': value['source'],
        'description': value['description'],
    };
}

