/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: d59a2fff599b
 */
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 ConversationStreamRequestHandoffExecution = {
    Client: "client",
    Server: "server",
};
/** @internal */
export const ConversationStreamRequestHandoffExecution$outboundSchema = z.enum(ConversationStreamRequestHandoffExecution);
/** @internal */
export const ConversationStreamRequestTool$outboundSchema = z.union([
    CodeInterpreterTool$outboundSchema,
    CustomConnector$outboundSchema,
    DocumentLibraryTool$outboundSchema,
    FunctionTool$outboundSchema,
    ImageGenerationTool$outboundSchema,
    WebSearchTool$outboundSchema,
    WebSearchPremiumTool$outboundSchema,
]);
export function conversationStreamRequestToolToJSON(conversationStreamRequestTool) {
    return JSON.stringify(ConversationStreamRequestTool$outboundSchema.parse(conversationStreamRequestTool));
}
/** @internal */
export const ConversationStreamRequestAgentVersion$outboundSchema = smartUnion([z.string(), z.int()]);
export function conversationStreamRequestAgentVersionToJSON(conversationStreamRequestAgentVersion) {
    return JSON.stringify(ConversationStreamRequestAgentVersion$outboundSchema.parse(conversationStreamRequestAgentVersion));
}
/** @internal */
export const ConversationStreamRequest$outboundSchema = z.object({
    inputs: ConversationInputs$outboundSchema,
    stream: z.literal(true).default(true),
    store: z.nullable(z.boolean()).optional(),
    handoffExecution: z.nullable(ConversationStreamRequestHandoffExecution$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 conversationStreamRequestToJSON(conversationStreamRequest) {
    return JSON.stringify(ConversationStreamRequest$outboundSchema.parse(conversationStreamRequest));
}
//# sourceMappingURL=conversationstreamrequest.js.map