/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod/v3";
import { safeParse } from "../../lib/schemas.js";
import { ConversationsFilterAND$inboundSchema, ConversationsFilterAND$outboundSchema, } from "./conversationsfilterand.js";
import { ConversationsFilterCondition$inboundSchema, ConversationsFilterCondition$outboundSchema, } from "./conversationsfiltercondition.js";
import { ConversationsFilterOR$inboundSchema, ConversationsFilterOR$outboundSchema, } from "./conversationsfilteror.js";
/** @internal */
export const ConversationsFilter$inboundSchema = z.union([
    ConversationsFilterCondition$inboundSchema,
    z.lazy(() => ConversationsFilterAND$inboundSchema),
    z.lazy(() => ConversationsFilterOR$inboundSchema),
]);
/** @internal */
export const ConversationsFilter$outboundSchema = z.union([
    ConversationsFilterCondition$outboundSchema,
    z.lazy(() => ConversationsFilterAND$outboundSchema),
    z.lazy(() => ConversationsFilterOR$outboundSchema),
]);
export function conversationsFilterToJSON(conversationsFilter) {
    return JSON.stringify(ConversationsFilter$outboundSchema.parse(conversationsFilter));
}
export function conversationsFilterFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ConversationsFilter$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ConversationsFilter' from JSON`);
}
//# sourceMappingURL=conversationsfilter.js.map