"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConversationsFilterConditionValue$ = exports.ConversationsFilterConditionValue$outboundSchema = exports.ConversationsFilterConditionValue$inboundSchema = exports.Six$ = exports.Six$outboundSchema = exports.Six$inboundSchema = exports.Value$ = exports.Value$outboundSchema = exports.Value$inboundSchema = exports.Four$ = exports.Four$outboundSchema = exports.Four$inboundSchema = void 0;
exports.fourToJSON = fourToJSON;
exports.fourFromJSON = fourFromJSON;
exports.valueToJSON = valueToJSON;
exports.valueFromJSON = valueFromJSON;
exports.sixToJSON = sixToJSON;
exports.sixFromJSON = sixFromJSON;
exports.conversationsFilterConditionValueToJSON = conversationsFilterConditionValueToJSON;
exports.conversationsFilterConditionValueFromJSON = conversationsFilterConditionValueFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
/** @internal */
exports.Four$inboundSchema = z
    .union([z.string(), z.number(), z.boolean()]);
/** @internal */
exports.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.
 */
var Four$;
(function (Four$) {
    /** @deprecated use `Four$inboundSchema` instead. */
    Four$.inboundSchema = exports.Four$inboundSchema;
    /** @deprecated use `Four$outboundSchema` instead. */
    Four$.outboundSchema = exports.Four$outboundSchema;
})(Four$ || (exports.Four$ = Four$ = {}));
function fourToJSON(four) {
    return JSON.stringify(exports.Four$outboundSchema.parse(four));
}
function fourFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Four$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Four' from JSON`);
}
/** @internal */
exports.Value$inboundSchema = z
    .union([
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.nullable(z.union([z.string(), z.number(), z.boolean()]))),
]);
/** @internal */
exports.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.
 */
var Value$;
(function (Value$) {
    /** @deprecated use `Value$inboundSchema` instead. */
    Value$.inboundSchema = exports.Value$inboundSchema;
    /** @deprecated use `Value$outboundSchema` instead. */
    Value$.outboundSchema = exports.Value$outboundSchema;
})(Value$ || (exports.Value$ = Value$ = {}));
function valueToJSON(value) {
    return JSON.stringify(exports.Value$outboundSchema.parse(value));
}
function valueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Value$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Value' from JSON`);
}
/** @internal */
exports.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 */
exports.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.
 */
var Six$;
(function (Six$) {
    /** @deprecated use `Six$inboundSchema` instead. */
    Six$.inboundSchema = exports.Six$inboundSchema;
    /** @deprecated use `Six$outboundSchema` instead. */
    Six$.outboundSchema = exports.Six$outboundSchema;
})(Six$ || (exports.Six$ = Six$ = {}));
function sixToJSON(six) {
    return JSON.stringify(exports.Six$outboundSchema.parse(six));
}
function sixFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Six$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Six' from JSON`);
}
/** @internal */
exports.ConversationsFilterConditionValue$inboundSchema = z.union([
    z.lazy(() => exports.Six$inboundSchema),
    z.string(),
    z.boolean(),
    z.number(),
    z.array(z.string()),
    z.record(z.any()),
]);
/** @internal */
exports.ConversationsFilterConditionValue$outboundSchema = z.union([
    z.lazy(() => exports.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.
 */
var ConversationsFilterConditionValue$;
(function (ConversationsFilterConditionValue$) {
    /** @deprecated use `ConversationsFilterConditionValue$inboundSchema` instead. */
    ConversationsFilterConditionValue$.inboundSchema = exports.ConversationsFilterConditionValue$inboundSchema;
    /** @deprecated use `ConversationsFilterConditionValue$outboundSchema` instead. */
    ConversationsFilterConditionValue$.outboundSchema = exports.ConversationsFilterConditionValue$outboundSchema;
})(ConversationsFilterConditionValue$ || (exports.ConversationsFilterConditionValue$ = ConversationsFilterConditionValue$ = {}));
function conversationsFilterConditionValueToJSON(conversationsFilterConditionValue) {
    return JSON.stringify(exports.ConversationsFilterConditionValue$outboundSchema.parse(conversationsFilterConditionValue));
}
function conversationsFilterConditionValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ConversationsFilterConditionValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ConversationsFilterConditionValue' from JSON`);
}
//# sourceMappingURL=conversationsfilterconditionvalue.js.map