/*
 * 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 { Info$inboundSchema, Info$outboundSchema, } from "./info.js";
/** @internal */
export const ListResponse$inboundSchema = z.object({
    resources: z.array(Info$inboundSchema).optional(),
    next_cursor: z.nullable(z.string()).optional(),
    total_count: z.number().int().optional(),
}).transform((v) => {
    return remap$(v, {
        "next_cursor": "nextCursor",
        "total_count": "totalCount",
    });
});
/** @internal */
export const ListResponse$outboundSchema = z.object({
    resources: z.array(Info$outboundSchema).optional(),
    nextCursor: z.nullable(z.string()).optional(),
    totalCount: z.number().int().optional(),
}).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 ListResponse$;
(function (ListResponse$) {
    /** @deprecated use `ListResponse$inboundSchema` instead. */
    ListResponse$.inboundSchema = ListResponse$inboundSchema;
    /** @deprecated use `ListResponse$outboundSchema` instead. */
    ListResponse$.outboundSchema = ListResponse$outboundSchema;
})(ListResponse$ || (ListResponse$ = {}));
export function listResponseToJSON(listResponse) {
    return JSON.stringify(ListResponse$outboundSchema.parse(listResponse));
}
export function listResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ListResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListResponse' from JSON`);
}
//# sourceMappingURL=listresponse.js.map