/* 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';
import type { MCPConfig } from './MCPConfig';
import {
    MCPConfigFromJSON,
    MCPConfigFromJSONTyped,
    MCPConfigToJSON,
    MCPConfigToJSONTyped,
} from './MCPConfig';

/**
 *
 * @export
 * @interface ContinueSessionRequest
 */
export interface ContinueSessionRequest {
    /**
     * New query to continue with
     * @type {string}
     * @memberof ContinueSessionRequest
     */
    query: string;
    /**
     * Override system prompt
     * @type {string}
     * @memberof ContinueSessionRequest
     */
    systemPrompt?: string;
    /**
     * Append to system prompt
     * @type {string}
     * @memberof ContinueSessionRequest
     */
    appendSystemPrompt?: string;
    /**
     *
     * @type {MCPConfig}
     * @memberof ContinueSessionRequest
     */
    mcpConfig?: MCPConfig;
    /**
     * MCP tool for permissions
     * @type {string}
     * @memberof ContinueSessionRequest
     */
    permissionPromptTool?: string;
    /**
     * Allowed tools list
     * @type {Array<string>}
     * @memberof ContinueSessionRequest
     */
    allowedTools?: Array<string>;
    /**
     * Disallowed tools list
     * @type {Array<string>}
     * @memberof ContinueSessionRequest
     */
    disallowedTools?: Array<string>;
    /**
     * Custom instructions
     * @type {string}
     * @memberof ContinueSessionRequest
     */
    customInstructions?: string;
    /**
     * Max conversation turns
     * @type {number}
     * @memberof ContinueSessionRequest
     */
    maxTurns?: number;
}

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

export function ContinueSessionRequestFromJSON(json: any): ContinueSessionRequest {
    return ContinueSessionRequestFromJSONTyped(json, false);
}

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

        'query': json['query'],
        'systemPrompt': json['system_prompt'] == null ? undefined : json['system_prompt'],
        'appendSystemPrompt': json['append_system_prompt'] == null ? undefined : json['append_system_prompt'],
        'mcpConfig': json['mcp_config'] == null ? undefined : MCPConfigFromJSON(json['mcp_config']),
        'permissionPromptTool': json['permission_prompt_tool'] == null ? undefined : json['permission_prompt_tool'],
        'allowedTools': json['allowed_tools'] == null ? undefined : json['allowed_tools'],
        'disallowedTools': json['disallowed_tools'] == null ? undefined : json['disallowed_tools'],
        'customInstructions': json['custom_instructions'] == null ? undefined : json['custom_instructions'],
        'maxTurns': json['max_turns'] == null ? undefined : json['max_turns'],
    };
}

export function ContinueSessionRequestToJSON(json: any): ContinueSessionRequest {
    return ContinueSessionRequestToJSONTyped(json, false);
}

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

    return {

        'query': value['query'],
        'system_prompt': value['systemPrompt'],
        'append_system_prompt': value['appendSystemPrompt'],
        'mcp_config': MCPConfigToJSON(value['mcpConfig']),
        'permission_prompt_tool': value['permissionPromptTool'],
        'allowed_tools': value['allowedTools'],
        'disallowed_tools': value['disallowedTools'],
        'custom_instructions': value['customInstructions'],
        'max_turns': value['maxTurns'],
    };
}
