/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: edca5ba151e1
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { ToolConfiguration$inboundSchema, ToolConfiguration$outboundSchema, } from "./toolconfiguration.js";
/** @internal */
export const ImageGenerationTool$inboundSchema = z.object({
    tool_configuration: z.nullable(ToolConfiguration$inboundSchema).optional(),
    type: z.literal("image_generation"),
}).transform((v) => {
    return remap$(v, {
        "tool_configuration": "toolConfiguration",
    });
});
/** @internal */
export const ImageGenerationTool$outboundSchema = z.object({
    toolConfiguration: z.nullable(ToolConfiguration$outboundSchema).optional(),
    type: z.literal("image_generation"),
}).transform((v) => {
    return remap$(v, {
        toolConfiguration: "tool_configuration",
    });
});
export function imageGenerationToolToJSON(imageGenerationTool) {
    return JSON.stringify(ImageGenerationTool$outboundSchema.parse(imageGenerationTool));
}
export function imageGenerationToolFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ImageGenerationTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImageGenerationTool' from JSON`);
}
//# sourceMappingURL=imagegenerationtool.js.map