/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 6ce7f8eda9ad
 */
import * as z from "zod/v4";
import { safeParse } from "../../lib/schemas.js";
import { smartUnion } from "../../types/smartUnion.js";
/** @internal */
export const Arguments$inboundSchema = smartUnion([z.record(z.string(), z.any()), z.string()]);
/** @internal */
export const Arguments$outboundSchema = smartUnion([z.record(z.string(), z.any()), z.string()]);
export function argumentsToJSON(value) {
    return JSON.stringify(Arguments$outboundSchema.parse(value));
}
export function argumentsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Arguments$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Arguments' from JSON`);
}
/** @internal */
export const FunctionCall$inboundSchema = z
    .object({
    name: z.string(),
    arguments: smartUnion([z.record(z.string(), z.any()), z.string()]),
});
/** @internal */
export const FunctionCall$outboundSchema = z.object({
    name: z.string(),
    arguments: smartUnion([z.record(z.string(), z.any()), z.string()]),
});
export function functionCallToJSON(functionCall) {
    return JSON.stringify(FunctionCall$outboundSchema.parse(functionCall));
}
export function functionCallFromJSON(jsonString) {
    return safeParse(jsonString, (x) => FunctionCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FunctionCall' from JSON`);
}
//# sourceMappingURL=functioncall.js.map