/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
/** @internal */
export const Four$inboundSchema = z
    .union([z.string(), z.number(), z.boolean()]);
/** @internal */
export const Four$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Four$;
(function (Four$) {
    /** @deprecated use `Four$inboundSchema` instead. */
    Four$.inboundSchema = Four$inboundSchema;
    /** @deprecated use `Four$outboundSchema` instead. */
    Four$.outboundSchema = Four$outboundSchema;
})(Four$ || (Four$ = {}));
export function fourToJSON(four) {
    return JSON.stringify(Four$outboundSchema.parse(four));
}
export function fourFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Four$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Four' from JSON`);
}
/** @internal */
export const Value$inboundSchema = z
    .union([
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.nullable(z.union([z.string(), z.number(), z.boolean()]))),
]);
/** @internal */
export const Value$outboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.nullable(z.union([z.string(), z.number(), z.boolean()]))),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Value$;
(function (Value$) {
    /** @deprecated use `Value$inboundSchema` instead. */
    Value$.inboundSchema = Value$inboundSchema;
    /** @deprecated use `Value$outboundSchema` instead. */
    Value$.outboundSchema = Value$outboundSchema;
})(Value$ || (Value$ = {}));
export function valueToJSON(value) {
    return JSON.stringify(Value$outboundSchema.parse(value));
}
export function valueFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Value$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Value' from JSON`);
}
/** @internal */
export const Six$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 Six$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()]))),
    ])),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Six$;
(function (Six$) {
    /** @deprecated use `Six$inboundSchema` instead. */
    Six$.inboundSchema = Six$inboundSchema;
    /** @deprecated use `Six$outboundSchema` instead. */
    Six$.outboundSchema = Six$outboundSchema;
})(Six$ || (Six$ = {}));
export function sixToJSON(six) {
    return JSON.stringify(Six$outboundSchema.parse(six));
}
export function sixFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Six$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Six' from JSON`);
}
/** @internal */
export const ConversationsFilterConditionValue$inboundSchema = z.union([
    z.lazy(() => Six$inboundSchema),
    z.string(),
    z.boolean(),
    z.number(),
    z.array(z.string()),
    z.record(z.any()),
]);
/** @internal */
export const ConversationsFilterConditionValue$outboundSchema = z.union([
    z.lazy(() => Six$outboundSchema),
    z.string(),
    z.boolean(),
    z.number(),
    z.array(z.string()),
    z.record(z.any()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ConversationsFilterConditionValue$;
(function (ConversationsFilterConditionValue$) {
    /** @deprecated use `ConversationsFilterConditionValue$inboundSchema` instead. */
    ConversationsFilterConditionValue$.inboundSchema = ConversationsFilterConditionValue$inboundSchema;
    /** @deprecated use `ConversationsFilterConditionValue$outboundSchema` instead. */
    ConversationsFilterConditionValue$.outboundSchema = ConversationsFilterConditionValue$outboundSchema;
})(ConversationsFilterConditionValue$ || (ConversationsFilterConditionValue$ = {}));
export function conversationsFilterConditionValueToJSON(conversationsFilterConditionValue) {
    return JSON.stringify(ConversationsFilterConditionValue$outboundSchema.parse(conversationsFilterConditionValue));
}
export function conversationsFilterConditionValueFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ConversationsFilterConditionValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ConversationsFilterConditionValue' from JSON`);
}
//# sourceMappingURL=conversationsfilterconditionvalue.js.map