/* 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 {
    /**
     * Command to execute
     * @type {string}
     * @memberof MCPServer
     */
    command: string;
    /**
     * Command arguments
     * @type {Array<string>}
     * @memberof MCPServer
     */
    args?: Array<string>;
    /**
     * Environment variables
     * @type {{ [key: string]: string; }}
     * @memberof MCPServer
     */
    env?: { [key: string]: string; };
}

/**
 * Check if a given object implements the MCPServer interface.
 */
export function instanceOfMCPServer(value: object): value is MCPServer {
    if (!('command' in value) || value['command'] === undefined) return false;
    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 {

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

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 {

        'command': value['command'],
        'args': value['args'],
        'env': value['env'],
    };
}
