/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: c9beefa1092d
 */
import * as z from "zod/v4";
import { safeParse } from "../../lib/schemas.js";
import { ImageDetail$inboundSchema, ImageDetail$outboundSchema, } from "./imagedetail.js";
/** @internal */
export const ImageURL$inboundSchema = z.object({
    url: z.string(),
    detail: z.nullable(ImageDetail$inboundSchema).optional(),
});
/** @internal */
export const ImageURL$outboundSchema = z
    .object({
    url: z.string(),
    detail: z.nullable(ImageDetail$outboundSchema).optional(),
});
export function imageURLToJSON(imageURL) {
    return JSON.stringify(ImageURL$outboundSchema.parse(imageURL));
}
export function imageURLFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ImageURL$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImageURL' from JSON`);
}
//# sourceMappingURL=imageurl.js.map