/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 120aa0e03479
 */
import { safeParse } from "../../lib/schemas.js";
import { smartUnion } from "../../types/smartUnion.js";
import { DocumentURLChunk$inboundSchema, DocumentURLChunk$outboundSchema, } from "./documenturlchunk.js";
import { ImageURLChunk$inboundSchema, ImageURLChunk$outboundSchema, } from "./imageurlchunk.js";
import { TextChunk$inboundSchema, TextChunk$outboundSchema, } from "./textchunk.js";
import { ThinkChunk$inboundSchema, ThinkChunk$outboundSchema, } from "./thinkchunk.js";
import { ToolFileChunk$inboundSchema, ToolFileChunk$outboundSchema, } from "./toolfilechunk.js";
import { ToolReferenceChunk$inboundSchema, ToolReferenceChunk$outboundSchema, } from "./toolreferencechunk.js";
/** @internal */
export const MessageOutputContentChunks$inboundSchema = smartUnion([
    ToolFileChunk$inboundSchema,
    ToolReferenceChunk$inboundSchema,
    TextChunk$inboundSchema,
    ImageURLChunk$inboundSchema,
    DocumentURLChunk$inboundSchema,
    ThinkChunk$inboundSchema,
]);
/** @internal */
export const MessageOutputContentChunks$outboundSchema = smartUnion([
    ToolFileChunk$outboundSchema,
    ToolReferenceChunk$outboundSchema,
    TextChunk$outboundSchema,
    ImageURLChunk$outboundSchema,
    DocumentURLChunk$outboundSchema,
    ThinkChunk$outboundSchema,
]);
export function messageOutputContentChunksToJSON(messageOutputContentChunks) {
    return JSON.stringify(MessageOutputContentChunks$outboundSchema.parse(messageOutputContentChunks));
}
export function messageOutputContentChunksFromJSON(jsonString) {
    return safeParse(jsonString, (x) => MessageOutputContentChunks$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MessageOutputContentChunks' from JSON`);
}
//# sourceMappingURL=messageoutputcontentchunks.js.map