/* 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 MCPServer
 */
export interface MCPServer {
    /**
     * Server type (http for HTTP servers, omit for stdio)
     * @type {string}
     * @memberof MCPServer
     */
    type?: string;
    /**
     * Command to execute (for stdio servers)
     * @type {string}
     * @memberof MCPServer
     */
    command?: string;
    /**
     * Command arguments (for stdio servers)
     * @type {Array<string>}
     * @memberof MCPServer
     */
    args?: Array<string>;
    /**
     * Environment variables (for stdio servers)
     * @type {{ [key: string]: string; }}
     * @memberof MCPServer
     */
    env?: { [key: string]: string; };
    /**
     * HTTP endpoint URL (for HTTP servers)
     * @type {string}
     * @memberof MCPServer
     */
    url?: string;
    /**
     * HTTP headers to include (for HTTP servers)
     * @type {{ [key: string]: string; }}
     * @memberof MCPServer
     */
    headers?: { [key: string]: string; };
}

/**
 * Check if a given object implements the MCPServer interface.
 */
export function instanceOfMCPServer(value: object): value is MCPServer {
    return true;
}

export function MCPServerFromJSON(json: any): MCPServer {
    return MCPServerFromJSONTyped(json, false);
}

export function MCPServerFromJSONTyped(json: any, ignoreDiscriminator: boolean): MCPServer {
    if (json == null) {
        return json;
    }
    return {

        'type': json['type'] == null ? undefined : json['type'],
        'command': json['command'] == null ? undefined : json['command'],
        'args': json['args'] == null ? undefined : json['args'],
        'env': json['env'] == null ? undefined : json['env'],
        'url': json['url'] == null ? undefined : json['url'],
        'headers': json['headers'] == null ? undefined : json['headers'],
    };
}

export function MCPServerToJSON(json: any): MCPServer {
    return MCPServerToJSONTyped(json, false);
}

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

    return {

        'type': value['type'],
        'command': value['command'],
        'args': value['args'],
        'env': value['env'],
        'url': value['url'],
        'headers': value['headers'],
    };
}
