/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 378b7105180c
 */
import * as z from "zod/v4";
import { safeParse } from "../../lib/schemas.js";
import { smartUnion } from "../../types/smartUnion.js";
/** @internal */
export const RealtimeTranscriptionErrorDetailMessage$inboundSchema = smartUnion([z.string(), z.record(z.string(), z.any())]);
/** @internal */
export const RealtimeTranscriptionErrorDetailMessage$outboundSchema = smartUnion([z.string(), z.record(z.string(), z.any())]);
export function realtimeTranscriptionErrorDetailMessageToJSON(realtimeTranscriptionErrorDetailMessage) {
    return JSON.stringify(RealtimeTranscriptionErrorDetailMessage$outboundSchema.parse(realtimeTranscriptionErrorDetailMessage));
}
export function realtimeTranscriptionErrorDetailMessageFromJSON(jsonString) {
    return safeParse(jsonString, (x) => RealtimeTranscriptionErrorDetailMessage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RealtimeTranscriptionErrorDetailMessage' from JSON`);
}
/** @internal */
export const RealtimeTranscriptionErrorDetail$inboundSchema = z.object({
    message: smartUnion([z.string(), z.record(z.string(), z.any())]),
    code: z.int(),
});
/** @internal */
export const RealtimeTranscriptionErrorDetail$outboundSchema = z.object({
    message: smartUnion([z.string(), z.record(z.string(), z.any())]),
    code: z.int(),
});
export function realtimeTranscriptionErrorDetailToJSON(realtimeTranscriptionErrorDetail) {
    return JSON.stringify(RealtimeTranscriptionErrorDetail$outboundSchema.parse(realtimeTranscriptionErrorDetail));
}
export function realtimeTranscriptionErrorDetailFromJSON(jsonString) {
    return safeParse(jsonString, (x) => RealtimeTranscriptionErrorDetail$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RealtimeTranscriptionErrorDetail' from JSON`);
}
//# sourceMappingURL=realtimetranscriptionerrordetail.js.map