/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 50bfb8b987a0
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { smartUnion } from "../../types/smartUnion.js";
import { CodeInterpreterTool$outboundSchema, } from "./codeinterpretertool.js";
import { CompletionArgs$outboundSchema, } from "./completionargs.js";
import { ConversationInputs$outboundSchema, } from "./conversationinputs.js";
import { CustomConnector$outboundSchema, } from "./customconnector.js";
import { DocumentLibraryTool$outboundSchema, } from "./documentlibrarytool.js";
import { FunctionTool$outboundSchema, } from "./functiontool.js";
import { GuardrailConfig$outboundSchema, } from "./guardrailconfig.js";
import { ImageGenerationTool$outboundSchema, } from "./imagegenerationtool.js";
import { WebSearchPremiumTool$outboundSchema, } from "./websearchpremiumtool.js";
import { WebSearchTool$outboundSchema, } from "./websearchtool.js";
export const ConversationRequestHandoffExecution = {
    Client: "client",
    Server: "server",
};
/** @internal */
export const ConversationRequestHandoffExecution$outboundSchema = z.enum(ConversationRequestHandoffExecution);
/** @internal */
export const ConversationRequestTool$outboundSchema = z.union([
    CodeInterpreterTool$outboundSchema,
    CustomConnector$outboundSchema,
    DocumentLibraryTool$outboundSchema,
    FunctionTool$outboundSchema,
    ImageGenerationTool$outboundSchema,
    WebSearchTool$outboundSchema,
    WebSearchPremiumTool$outboundSchema,
]);
export function conversationRequestToolToJSON(conversationRequestTool) {
    return JSON.stringify(ConversationRequestTool$outboundSchema.parse(conversationRequestTool));
}
/** @internal */
export const ConversationRequestAgentVersion$outboundSchema = smartUnion([z.string(), z.int()]);
export function conversationRequestAgentVersionToJSON(conversationRequestAgentVersion) {
    return JSON.stringify(ConversationRequestAgentVersion$outboundSchema.parse(conversationRequestAgentVersion));
}
/** @internal */
export const ConversationRequest$outboundSchema = z.object({
    inputs: ConversationInputs$outboundSchema,
    stream: z.literal(false).default(false),
    store: z.nullable(z.boolean()).optional(),
    handoffExecution: z.nullable(ConversationRequestHandoffExecution$outboundSchema).optional(),
    instructions: z.nullable(z.string()).optional(),
    tools: z.nullable(z.array(z.union([
        CodeInterpreterTool$outboundSchema,
        CustomConnector$outboundSchema,
        DocumentLibraryTool$outboundSchema,
        FunctionTool$outboundSchema,
        ImageGenerationTool$outboundSchema,
        WebSearchTool$outboundSchema,
        WebSearchPremiumTool$outboundSchema,
    ]))).optional(),
    completionArgs: z.nullable(CompletionArgs$outboundSchema).optional(),
    guardrails: z.nullable(z.array(GuardrailConfig$outboundSchema)).optional(),
    name: z.nullable(z.string()).optional(),
    description: z.nullable(z.string()).optional(),
    metadata: z.nullable(z.record(z.string(), z.any())).optional(),
    agentId: z.nullable(z.string()).optional(),
    agentVersion: z.nullable(smartUnion([z.string(), z.int()])).optional(),
    model: z.nullable(z.string()).optional(),
}).transform((v) => {
    return remap$(v, {
        handoffExecution: "handoff_execution",
        completionArgs: "completion_args",
        agentId: "agent_id",
        agentVersion: "agent_version",
    });
});
export function conversationRequestToJSON(conversationRequest) {
    return JSON.stringify(ConversationRequest$outboundSchema.parse(conversationRequest));
}
//# sourceMappingURL=conversationrequest.js.map