/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod/v3";
import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js";
import * as shared from "../shared/index.js";
/** @internal */
export const PartitionRequest$inboundSchema = z.object({
    partition_parameters: shared.PartitionParameters$inboundSchema,
    "unstructured-api-key": z.nullable(z.string()).optional(),
}).transform((v) => {
    return remap$(v, {
        "partition_parameters": "partitionParameters",
        "unstructured-api-key": "unstructuredApiKey",
    });
});
/** @internal */
export const PartitionRequest$outboundSchema = z.object({
    partitionParameters: shared.PartitionParameters$outboundSchema,
    unstructuredApiKey: z.nullable(z.string()).optional(),
}).transform((v) => {
    return remap$(v, {
        partitionParameters: "partition_parameters",
        unstructuredApiKey: "unstructured-api-key",
    });
});
export function partitionRequestToJSON(partitionRequest) {
    return JSON.stringify(PartitionRequest$outboundSchema.parse(partitionRequest));
}
export function partitionRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PartitionRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PartitionRequest' from JSON`);
}
/** @internal */
export const PartitionResponse$inboundSchema = z.union([z.string(), z.array(z.record(z.any()))]);
/** @internal */
export const PartitionResponse$outboundSchema = z.union([z.string(), z.array(z.record(z.any()))]);
export function partitionResponseToJSON(partitionResponse) {
    return JSON.stringify(PartitionResponse$outboundSchema.parse(partitionResponse));
}
export function partitionResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PartitionResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PartitionResponse' from JSON`);
}
//# sourceMappingURL=partition.js.map