/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod/v3";
import { safeParse } from "../../lib/schemas.js";
import { FilterOperator$inboundSchema, FilterOperator$outboundSchema, } from "./filteroperator.js";
import { SemanticThreadField$inboundSchema, SemanticThreadField$outboundSchema, } from "./semanticthreadfield.js";
/** @internal */
export const SemanticThreadFilterConditionValueValue4$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
/** @internal */
export const SemanticThreadFilterConditionValueValue4$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
export function semanticThreadFilterConditionValueValue4ToJSON(semanticThreadFilterConditionValueValue4) {
    return JSON.stringify(SemanticThreadFilterConditionValueValue4$outboundSchema.parse(semanticThreadFilterConditionValueValue4));
}
export function semanticThreadFilterConditionValueValue4FromJSON(jsonString) {
    return safeParse(jsonString, (x) => SemanticThreadFilterConditionValueValue4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SemanticThreadFilterConditionValueValue4' from JSON`);
}
/** @internal */
export const SemanticThreadFilterConditionValueValue$inboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.nullable(z.union([z.string(), z.number(), z.boolean()]))),
]);
/** @internal */
export const SemanticThreadFilterConditionValueValue$outboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.nullable(z.union([z.string(), z.number(), z.boolean()]))),
]);
export function semanticThreadFilterConditionValueValueToJSON(semanticThreadFilterConditionValueValue) {
    return JSON.stringify(SemanticThreadFilterConditionValueValue$outboundSchema.parse(semanticThreadFilterConditionValueValue));
}
export function semanticThreadFilterConditionValueValueFromJSON(jsonString) {
    return safeParse(jsonString, (x) => SemanticThreadFilterConditionValueValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SemanticThreadFilterConditionValueValue' from JSON`);
}
/** @internal */
export const SemanticThreadFilterConditionValue7$inboundSchema = z.object({
    path: z.array(z.string()),
    value: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.nullable(z.union([z.string(), z.number(), z.boolean()]))),
    ])),
});
/** @internal */
export const SemanticThreadFilterConditionValue7$outboundSchema = z.object({
    path: z.array(z.string()),
    value: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.nullable(z.union([z.string(), z.number(), z.boolean()]))),
    ])),
});
export function semanticThreadFilterConditionValue7ToJSON(semanticThreadFilterConditionValue7) {
    return JSON.stringify(SemanticThreadFilterConditionValue7$outboundSchema.parse(semanticThreadFilterConditionValue7));
}
export function semanticThreadFilterConditionValue7FromJSON(jsonString) {
    return safeParse(jsonString, (x) => SemanticThreadFilterConditionValue7$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SemanticThreadFilterConditionValue7' from JSON`);
}
/** @internal */
export const SemanticThreadFilterConditionCondition$inboundSchema = z.object({
    field: SemanticThreadField$inboundSchema,
    operator: FilterOperator$inboundSchema,
    value: z.any().optional(),
});
/** @internal */
export const SemanticThreadFilterConditionCondition$outboundSchema = z.object({
    field: SemanticThreadField$outboundSchema,
    operator: FilterOperator$outboundSchema,
    value: z.any().optional(),
});
export function semanticThreadFilterConditionConditionToJSON(semanticThreadFilterConditionCondition) {
    return JSON.stringify(SemanticThreadFilterConditionCondition$outboundSchema.parse(semanticThreadFilterConditionCondition));
}
export function semanticThreadFilterConditionConditionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => SemanticThreadFilterConditionCondition$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SemanticThreadFilterConditionCondition' from JSON`);
}
/** @internal */
export const SemanticThreadFilterCondition$inboundSchema = z.object({
    condition: z.lazy(() => SemanticThreadFilterConditionCondition$inboundSchema),
});
/** @internal */
export const SemanticThreadFilterCondition$outboundSchema = z.object({
    condition: z.lazy(() => SemanticThreadFilterConditionCondition$outboundSchema),
});
export function semanticThreadFilterConditionToJSON(semanticThreadFilterCondition) {
    return JSON.stringify(SemanticThreadFilterCondition$outboundSchema.parse(semanticThreadFilterCondition));
}
export function semanticThreadFilterConditionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => SemanticThreadFilterCondition$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SemanticThreadFilterCondition' from JSON`);
}
//# sourceMappingURL=semanticthreadfiltercondition.js.map