/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: b6490fc32db0
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { smartUnion } from "../../types/smartUnion.js";
import { CompletionArgs$outboundSchema, } from "./completionargs.js";
import { ConversationInputs$outboundSchema, } from "./conversationinputs.js";
import { GuardrailConfig$outboundSchema, } from "./guardrailconfig.js";
export const ConversationRestartStreamRequestHandoffExecution = {
    Client: "client",
    Server: "server",
};
/** @internal */
export const ConversationRestartStreamRequestHandoffExecution$outboundSchema = z.enum(ConversationRestartStreamRequestHandoffExecution);
/** @internal */
export const ConversationRestartStreamRequestAgentVersion$outboundSchema = smartUnion([z.string(), z.int()]);
export function conversationRestartStreamRequestAgentVersionToJSON(conversationRestartStreamRequestAgentVersion) {
    return JSON.stringify(ConversationRestartStreamRequestAgentVersion$outboundSchema.parse(conversationRestartStreamRequestAgentVersion));
}
/** @internal */
export const ConversationRestartStreamRequest$outboundSchema = z.object({
    inputs: ConversationInputs$outboundSchema.optional(),
    stream: z.literal(true).default(true),
    store: z.boolean().default(true),
    handoffExecution: ConversationRestartStreamRequestHandoffExecution$outboundSchema.default("server"),
    completionArgs: CompletionArgs$outboundSchema.optional(),
    guardrails: z.nullable(z.array(GuardrailConfig$outboundSchema)).optional(),
    metadata: z.nullable(z.record(z.string(), z.any())).optional(),
    fromEntryId: z.string(),
    agentVersion: z.nullable(smartUnion([z.string(), z.int()])).optional(),
}).transform((v) => {
    return remap$(v, {
        handoffExecution: "handoff_execution",
        completionArgs: "completion_args",
        fromEntryId: "from_entry_id",
        agentVersion: "agent_version",
    });
});
export function conversationRestartStreamRequestToJSON(conversationRestartStreamRequest) {
    return JSON.stringify(ConversationRestartStreamRequest$outboundSchema.parse(conversationRestartStreamRequest));
}
//# sourceMappingURL=conversationrestartstreamrequest.js.map