/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod/v3";
import { safeParse } from "../../lib/schemas.js";
import { OpenAIConversation$inboundSchema, OpenAIConversation$outboundSchema, } from "./openaiconversation.js";
import { SupportCopilotConversation$inboundSchema, SupportCopilotConversation$outboundSchema, } from "./supportcopilotconversation.js";
import { SupportTicketConversation$inboundSchema, SupportTicketConversation$outboundSchema, } from "./supportticketconversation.js";
/** @internal */
export const Conversation$inboundSchema = z.union([
    OpenAIConversation$inboundSchema,
    SupportTicketConversation$inboundSchema,
    SupportCopilotConversation$inboundSchema,
]);
/** @internal */
export const Conversation$outboundSchema = z.union([
    OpenAIConversation$outboundSchema,
    SupportTicketConversation$outboundSchema,
    SupportCopilotConversation$outboundSchema,
]);
export function conversationToJSON(conversation) {
    return JSON.stringify(Conversation$outboundSchema.parse(conversation));
}
export function conversationFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Conversation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Conversation' from JSON`);
}
//# sourceMappingURL=conversation.js.map