/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod/v3";
import { safeParse } from "../../lib/schemas.js";
import { OpenAIToolCallFunction$inboundSchema, OpenAIToolCallFunction$outboundSchema, } from "./openaitoolcallfunction.js";
export const OpenAIToolCallType = {
    Function: "function",
};
/** @internal */
export const OpenAIToolCallType$inboundSchema = z.nativeEnum(OpenAIToolCallType);
/** @internal */
export const OpenAIToolCallType$outboundSchema = OpenAIToolCallType$inboundSchema;
/** @internal */
export const OpenAIToolCall$inboundSchema = z.object({
    id: z.string(),
    type: OpenAIToolCallType$inboundSchema,
    function: OpenAIToolCallFunction$inboundSchema,
});
/** @internal */
export const OpenAIToolCall$outboundSchema = z.object({
    id: z.string(),
    type: OpenAIToolCallType$outboundSchema,
    function: OpenAIToolCallFunction$outboundSchema,
});
export function openAIToolCallToJSON(openAIToolCall) {
    return JSON.stringify(OpenAIToolCall$outboundSchema.parse(openAIToolCall));
}
export function openAIToolCallFromJSON(jsonString) {
    return safeParse(jsonString, (x) => OpenAIToolCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenAIToolCall' from JSON`);
}
//# sourceMappingURL=openaitoolcall.js.map