/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
/** @internal */
export const UploadMapping$inboundSchema = z.object({
    folder: z.string(),
    template: z.string(),
    external_id: z.string(),
    upload_preset_name: z.nullable(z.string()).optional(),
}).transform((v) => {
    return remap$(v, {
        "external_id": "externalId",
        "upload_preset_name": "uploadPresetName",
    });
});
/** @internal */
export const UploadMapping$outboundSchema = z.object({
    folder: z.string(),
    template: z.string(),
    externalId: z.string(),
    uploadPresetName: z.nullable(z.string()).optional(),
}).transform((v) => {
    return remap$(v, {
        externalId: "external_id",
        uploadPresetName: "upload_preset_name",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UploadMapping$;
(function (UploadMapping$) {
    /** @deprecated use `UploadMapping$inboundSchema` instead. */
    UploadMapping$.inboundSchema = UploadMapping$inboundSchema;
    /** @deprecated use `UploadMapping$outboundSchema` instead. */
    UploadMapping$.outboundSchema = UploadMapping$outboundSchema;
})(UploadMapping$ || (UploadMapping$ = {}));
export function uploadMappingToJSON(uploadMapping) {
    return JSON.stringify(UploadMapping$outboundSchema.parse(uploadMapping));
}
export function uploadMappingFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UploadMapping$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UploadMapping' from JSON`);
}
//# sourceMappingURL=uploadmapping.js.map