/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: cf396d4e697e
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { ToolConfiguration$inboundSchema, ToolConfiguration$outboundSchema, } from "./toolconfiguration.js";
/** @internal */
export const DocumentLibraryTool$inboundSchema = z.object({
    tool_configuration: z.nullable(ToolConfiguration$inboundSchema).optional(),
    type: z.literal("document_library"),
    library_ids: z.array(z.string()),
}).transform((v) => {
    return remap$(v, {
        "tool_configuration": "toolConfiguration",
        "library_ids": "libraryIds",
    });
});
/** @internal */
export const DocumentLibraryTool$outboundSchema = z.object({
    toolConfiguration: z.nullable(ToolConfiguration$outboundSchema).optional(),
    type: z.literal("document_library"),
    libraryIds: z.array(z.string()),
}).transform((v) => {
    return remap$(v, {
        toolConfiguration: "tool_configuration",
        libraryIds: "library_ids",
    });
});
export function documentLibraryToolToJSON(documentLibraryTool) {
    return JSON.stringify(DocumentLibraryTool$outboundSchema.parse(documentLibraryTool));
}
export function documentLibraryToolFromJSON(jsonString) {
    return safeParse(jsonString, (x) => DocumentLibraryTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DocumentLibraryTool' from JSON`);
}
//# sourceMappingURL=documentlibrarytool.js.map