/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 7ef605ec81a5
 */
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 ConversationRestartRequestHandoffExecution = {
    Client: "client",
    Server: "server",
};
/** @internal */
export const ConversationRestartRequestHandoffExecution$outboundSchema = z.enum(ConversationRestartRequestHandoffExecution);
/** @internal */
export const ConversationRestartRequestAgentVersion$outboundSchema = smartUnion([z.string(), z.int()]);
export function conversationRestartRequestAgentVersionToJSON(conversationRestartRequestAgentVersion) {
    return JSON.stringify(ConversationRestartRequestAgentVersion$outboundSchema.parse(conversationRestartRequestAgentVersion));
}
/** @internal */
export const ConversationRestartRequest$outboundSchema = z.object({
    inputs: ConversationInputs$outboundSchema.optional(),
    stream: z.literal(false).default(false),
    store: z.boolean().default(true),
    handoffExecution: ConversationRestartRequestHandoffExecution$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 conversationRestartRequestToJSON(conversationRestartRequest) {
    return JSON.stringify(ConversationRestartRequest$outboundSchema.parse(conversationRestartRequest));
}
//# sourceMappingURL=conversationrestartrequest.js.map