/*
 * 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";
import { Folder$inboundSchema, Folder$outboundSchema, } from "./folder.js";
/** @internal */
export const FoldersSearchResponse$inboundSchema = z.object({
    total_count: z.number().int(),
    time: z.number().int(),
    next_cursor: z.nullable(z.string()).optional(),
    folders: z.array(Folder$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "total_count": "totalCount",
        "next_cursor": "nextCursor",
    });
});
/** @internal */
export const FoldersSearchResponse$outboundSchema = z.object({
    totalCount: z.number().int(),
    time: z.number().int(),
    nextCursor: z.nullable(z.string()).optional(),
    folders: z.array(Folder$outboundSchema),
}).transform((v) => {
    return remap$(v, {
        totalCount: "total_count",
        nextCursor: "next_cursor",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var FoldersSearchResponse$;
(function (FoldersSearchResponse$) {
    /** @deprecated use `FoldersSearchResponse$inboundSchema` instead. */
    FoldersSearchResponse$.inboundSchema = FoldersSearchResponse$inboundSchema;
    /** @deprecated use `FoldersSearchResponse$outboundSchema` instead. */
    FoldersSearchResponse$.outboundSchema = FoldersSearchResponse$outboundSchema;
})(FoldersSearchResponse$ || (FoldersSearchResponse$ = {}));
export function foldersSearchResponseToJSON(foldersSearchResponse) {
    return JSON.stringify(FoldersSearchResponse$outboundSchema.parse(foldersSearchResponse));
}
export function foldersSearchResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => FoldersSearchResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FoldersSearchResponse' from JSON`);
}
//# sourceMappingURL=folderssearchresponse.js.map