/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod/v3";
import { safeParse } from "../../lib/schemas.js";
import { EventsField$inboundSchema, EventsField$outboundSchema, } from "./eventsfield.js";
import { FilterOperator$inboundSchema, FilterOperator$outboundSchema, } from "./filteroperator.js";
/** @internal */
export const Value4$inboundSchema = z
    .union([z.string(), z.number(), z.boolean()]);
/** @internal */
export const Value4$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
export function value4ToJSON(value4) {
    return JSON.stringify(Value4$outboundSchema.parse(value4));
}
export function value4FromJSON(jsonString) {
    return safeParse(jsonString, (x) => Value4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Value4' from JSON`);
}
/** @internal */
export const EventsFilterConditionValueValue$inboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.nullable(z.union([z.string(), z.number(), z.boolean()]))),
]);
/** @internal */
export const EventsFilterConditionValueValue$outboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.nullable(z.union([z.string(), z.number(), z.boolean()]))),
]);
export function eventsFilterConditionValueValueToJSON(eventsFilterConditionValueValue) {
    return JSON.stringify(EventsFilterConditionValueValue$outboundSchema.parse(eventsFilterConditionValueValue));
}
export function eventsFilterConditionValueValueFromJSON(jsonString) {
    return safeParse(jsonString, (x) => EventsFilterConditionValueValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EventsFilterConditionValueValue' from JSON`);
}
/** @internal */
export const EventsFilterConditionValue7$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 EventsFilterConditionValue7$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 eventsFilterConditionValue7ToJSON(eventsFilterConditionValue7) {
    return JSON.stringify(EventsFilterConditionValue7$outboundSchema.parse(eventsFilterConditionValue7));
}
export function eventsFilterConditionValue7FromJSON(jsonString) {
    return safeParse(jsonString, (x) => EventsFilterConditionValue7$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EventsFilterConditionValue7' from JSON`);
}
/** @internal */
export const EventsFilterConditionCondition$inboundSchema = z.object({
    field: EventsField$inboundSchema,
    operator: FilterOperator$inboundSchema,
    value: z.any().optional(),
});
/** @internal */
export const EventsFilterConditionCondition$outboundSchema = z.object({
    field: EventsField$outboundSchema,
    operator: FilterOperator$outboundSchema,
    value: z.any().optional(),
});
export function eventsFilterConditionConditionToJSON(eventsFilterConditionCondition) {
    return JSON.stringify(EventsFilterConditionCondition$outboundSchema.parse(eventsFilterConditionCondition));
}
export function eventsFilterConditionConditionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => EventsFilterConditionCondition$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EventsFilterConditionCondition' from JSON`);
}
/** @internal */
export const EventsFilterCondition$inboundSchema = z.object({
    condition: z.lazy(() => EventsFilterConditionCondition$inboundSchema),
});
/** @internal */
export const EventsFilterCondition$outboundSchema = z.object({
    condition: z.lazy(() => EventsFilterConditionCondition$outboundSchema),
});
export function eventsFilterConditionToJSON(eventsFilterCondition) {
    return JSON.stringify(EventsFilterCondition$outboundSchema.parse(eventsFilterCondition));
}
export function eventsFilterConditionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => EventsFilterCondition$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EventsFilterCondition' from JSON`);
}
//# sourceMappingURL=eventsfiltercondition.js.map