/*
 * 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 Folder$inboundSchema = z
    .object({
    name: z.string(),
    path: z.string(),
    external_id: z.string(),
    created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
}).transform((v) => {
    return remap$(v, {
        "external_id": "externalId",
        "created_at": "createdAt",
    });
});
/** @internal */
export const Folder$outboundSchema = z.object({
    name: z.string(),
    path: z.string(),
    externalId: z.string(),
    createdAt: z.date().transform(v => v.toISOString()).optional(),
}).transform((v) => {
    return remap$(v, {
        externalId: "external_id",
        createdAt: "created_at",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Folder$;
(function (Folder$) {
    /** @deprecated use `Folder$inboundSchema` instead. */
    Folder$.inboundSchema = Folder$inboundSchema;
    /** @deprecated use `Folder$outboundSchema` instead. */
    Folder$.outboundSchema = Folder$outboundSchema;
})(Folder$ || (Folder$ = {}));
export function folderToJSON(folder) {
    return JSON.stringify(Folder$outboundSchema.parse(folder));
}
export function folderFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Folder$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Folder' from JSON`);
}
//# sourceMappingURL=folder.js.map