/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: c2d3d68158f7
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
/** @internal */
export const DocumentURLChunk$inboundSchema = z.object({
    type: z.literal("document_url").default("document_url"),
    document_url: z.string(),
    document_name: z.nullable(z.string()).optional(),
}).transform((v) => {
    return remap$(v, {
        "document_url": "documentUrl",
        "document_name": "documentName",
    });
});
/** @internal */
export const DocumentURLChunk$outboundSchema = z.object({
    type: z.literal("document_url").default("document_url"),
    documentUrl: z.string(),
    documentName: z.nullable(z.string()).optional(),
}).transform((v) => {
    return remap$(v, {
        documentUrl: "document_url",
        documentName: "document_name",
    });
});
export function documentURLChunkToJSON(documentURLChunk) {
    return JSON.stringify(DocumentURLChunk$outboundSchema.parse(documentURLChunk));
}
export function documentURLChunkFromJSON(jsonString) {
    return safeParse(jsonString, (x) => DocumentURLChunk$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DocumentURLChunk' from JSON`);
}
//# sourceMappingURL=documenturlchunk.js.map