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