/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 9d23b61001ed
 */

import * as z from "zod/v4";
import {
  TextChunk,
  TextChunk$Outbound,
  TextChunk$outboundSchema,
} from "./textchunk.js";
import {
  ThinkChunk,
  ThinkChunk$Outbound,
  ThinkChunk$outboundSchema,
} from "./thinkchunk.js";

export type SystemMessageContentChunks = TextChunk | ThinkChunk;

/** @internal */
export type SystemMessageContentChunks$Outbound =
  | TextChunk$Outbound
  | ThinkChunk$Outbound;

/** @internal */
export const SystemMessageContentChunks$outboundSchema: z.ZodType<
  SystemMessageContentChunks$Outbound,
  SystemMessageContentChunks
> = z.union([TextChunk$outboundSchema, ThinkChunk$outboundSchema]);

export function systemMessageContentChunksToJSON(
  systemMessageContentChunks: SystemMessageContentChunks,
): string {
  return JSON.stringify(
    SystemMessageContentChunks$outboundSchema.parse(systemMessageContentChunks),
  );
}
