"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.MessagingUserResult$ = exports.MessagingUserResult$outboundSchema = exports.MessagingUserResult$inboundSchema = exports.MessagingUserResultData$ = exports.MessagingUserResultData$outboundSchema = exports.MessagingUserResultData$inboundSchema = exports.MessagingUserResultBot$ = exports.MessagingUserResultBot$outboundSchema = exports.MessagingUserResultBot$inboundSchema = exports.MessagingUserResultSchemas2$ = exports.MessagingUserResultSchemas2$outboundSchema = exports.MessagingUserResultSchemas2$inboundSchema = exports.MessagingUserResultActive$ = exports.MessagingUserResultActive$outboundSchema = exports.MessagingUserResultActive$inboundSchema = exports.MessagingUserResult2$ = exports.MessagingUserResult2$outboundSchema = exports.MessagingUserResult2$inboundSchema = exports.MessagingUserResultSchemas2 = exports.MessagingUserResult2 = void 0;
exports.messagingUserResultActiveToJSON = messagingUserResultActiveToJSON;
exports.messagingUserResultActiveFromJSON = messagingUserResultActiveFromJSON;
exports.messagingUserResultBotToJSON = messagingUserResultBotToJSON;
exports.messagingUserResultBotFromJSON = messagingUserResultBotFromJSON;
exports.messagingUserResultDataToJSON = messagingUserResultDataToJSON;
exports.messagingUserResultDataFromJSON = messagingUserResultDataFromJSON;
exports.messagingUserResultToJSON = messagingUserResultToJSON;
exports.messagingUserResultFromJSON = messagingUserResultFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const rawresponse_js_1 = require("./rawresponse.js");
var MessagingUserResult2;
(function (MessagingUserResult2) {
    MessagingUserResult2["True"] = "true";
    MessagingUserResult2["False"] = "false";
})(MessagingUserResult2 || (exports.MessagingUserResult2 = MessagingUserResult2 = {}));
var MessagingUserResultSchemas2;
(function (MessagingUserResultSchemas2) {
    MessagingUserResultSchemas2["True"] = "true";
    MessagingUserResultSchemas2["False"] = "false";
})(MessagingUserResultSchemas2 || (exports.MessagingUserResultSchemas2 = MessagingUserResultSchemas2 = {}));
/** @internal */
exports.MessagingUserResult2$inboundSchema = z.nativeEnum(MessagingUserResult2);
/** @internal */
exports.MessagingUserResult2$outboundSchema = exports.MessagingUserResult2$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var MessagingUserResult2$;
(function (MessagingUserResult2$) {
    /** @deprecated use `MessagingUserResult2$inboundSchema` instead. */
    MessagingUserResult2$.inboundSchema = exports.MessagingUserResult2$inboundSchema;
    /** @deprecated use `MessagingUserResult2$outboundSchema` instead. */
    MessagingUserResult2$.outboundSchema = exports.MessagingUserResult2$outboundSchema;
})(MessagingUserResult2$ || (exports.MessagingUserResult2$ = MessagingUserResult2$ = {}));
/** @internal */
exports.MessagingUserResultActive$inboundSchema = z.union([z.boolean(), exports.MessagingUserResult2$inboundSchema]);
/** @internal */
exports.MessagingUserResultActive$outboundSchema = z.union([z.boolean(), exports.MessagingUserResult2$outboundSchema]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var MessagingUserResultActive$;
(function (MessagingUserResultActive$) {
    /** @deprecated use `MessagingUserResultActive$inboundSchema` instead. */
    MessagingUserResultActive$.inboundSchema = exports.MessagingUserResultActive$inboundSchema;
    /** @deprecated use `MessagingUserResultActive$outboundSchema` instead. */
    MessagingUserResultActive$.outboundSchema = exports.MessagingUserResultActive$outboundSchema;
})(MessagingUserResultActive$ || (exports.MessagingUserResultActive$ = MessagingUserResultActive$ = {}));
function messagingUserResultActiveToJSON(messagingUserResultActive) {
    return JSON.stringify(exports.MessagingUserResultActive$outboundSchema.parse(messagingUserResultActive));
}
function messagingUserResultActiveFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.MessagingUserResultActive$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MessagingUserResultActive' from JSON`);
}
/** @internal */
exports.MessagingUserResultSchemas2$inboundSchema = z.nativeEnum(MessagingUserResultSchemas2);
/** @internal */
exports.MessagingUserResultSchemas2$outboundSchema = exports.MessagingUserResultSchemas2$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var MessagingUserResultSchemas2$;
(function (MessagingUserResultSchemas2$) {
    /** @deprecated use `MessagingUserResultSchemas2$inboundSchema` instead. */
    MessagingUserResultSchemas2$.inboundSchema = exports.MessagingUserResultSchemas2$inboundSchema;
    /** @deprecated use `MessagingUserResultSchemas2$outboundSchema` instead. */
    MessagingUserResultSchemas2$.outboundSchema = exports.MessagingUserResultSchemas2$outboundSchema;
})(MessagingUserResultSchemas2$ || (exports.MessagingUserResultSchemas2$ = MessagingUserResultSchemas2$ = {}));
/** @internal */
exports.MessagingUserResultBot$inboundSchema = z.union([z.boolean(), exports.MessagingUserResultSchemas2$inboundSchema]);
/** @internal */
exports.MessagingUserResultBot$outboundSchema = z.union([z.boolean(), exports.MessagingUserResultSchemas2$outboundSchema]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var MessagingUserResultBot$;
(function (MessagingUserResultBot$) {
    /** @deprecated use `MessagingUserResultBot$inboundSchema` instead. */
    MessagingUserResultBot$.inboundSchema = exports.MessagingUserResultBot$inboundSchema;
    /** @deprecated use `MessagingUserResultBot$outboundSchema` instead. */
    MessagingUserResultBot$.outboundSchema = exports.MessagingUserResultBot$outboundSchema;
})(MessagingUserResultBot$ || (exports.MessagingUserResultBot$ = MessagingUserResultBot$ = {}));
function messagingUserResultBotToJSON(messagingUserResultBot) {
    return JSON.stringify(exports.MessagingUserResultBot$outboundSchema.parse(messagingUserResultBot));
}
function messagingUserResultBotFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.MessagingUserResultBot$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MessagingUserResultBot' from JSON`);
}
/** @internal */
exports.MessagingUserResultData$inboundSchema = z.object({
    active: z.nullable(z.union([z.boolean(), exports.MessagingUserResult2$inboundSchema]))
        .optional(),
    bot: z.nullable(z.union([z.boolean(), exports.MessagingUserResultSchemas2$inboundSchema])).optional(),
    email: z.nullable(z.string()).optional(),
    first_name: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    last_name: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    remote_id: z.nullable(z.string()).optional(),
    username: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "first_name": "firstName",
        "last_name": "lastName",
        "remote_id": "remoteId",
    });
});
/** @internal */
exports.MessagingUserResultData$outboundSchema = z.object({
    active: z.nullable(z.union([z.boolean(), exports.MessagingUserResult2$outboundSchema])).optional(),
    bot: z.nullable(z.union([z.boolean(), exports.MessagingUserResultSchemas2$outboundSchema])).optional(),
    email: z.nullable(z.string()).optional(),
    firstName: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    lastName: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    remoteId: z.nullable(z.string()).optional(),
    username: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        firstName: "first_name",
        lastName: "last_name",
        remoteId: "remote_id",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var MessagingUserResultData$;
(function (MessagingUserResultData$) {
    /** @deprecated use `MessagingUserResultData$inboundSchema` instead. */
    MessagingUserResultData$.inboundSchema = exports.MessagingUserResultData$inboundSchema;
    /** @deprecated use `MessagingUserResultData$outboundSchema` instead. */
    MessagingUserResultData$.outboundSchema = exports.MessagingUserResultData$outboundSchema;
})(MessagingUserResultData$ || (exports.MessagingUserResultData$ = MessagingUserResultData$ = {}));
function messagingUserResultDataToJSON(messagingUserResultData) {
    return JSON.stringify(exports.MessagingUserResultData$outboundSchema.parse(messagingUserResultData));
}
function messagingUserResultDataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.MessagingUserResultData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MessagingUserResultData' from JSON`);
}
/** @internal */
exports.MessagingUserResult$inboundSchema = z.object({
    data: z.nullable(z.lazy(() => exports.MessagingUserResultData$inboundSchema))
        .optional(),
    raw: z.nullable(z.array(rawresponse_js_1.RawResponse$inboundSchema)).optional(),
});
/** @internal */
exports.MessagingUserResult$outboundSchema = z.object({
    data: z.nullable(z.lazy(() => exports.MessagingUserResultData$outboundSchema))
        .optional(),
    raw: z.nullable(z.array(rawresponse_js_1.RawResponse$outboundSchema)).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var MessagingUserResult$;
(function (MessagingUserResult$) {
    /** @deprecated use `MessagingUserResult$inboundSchema` instead. */
    MessagingUserResult$.inboundSchema = exports.MessagingUserResult$inboundSchema;
    /** @deprecated use `MessagingUserResult$outboundSchema` instead. */
    MessagingUserResult$.outboundSchema = exports.MessagingUserResult$outboundSchema;
})(MessagingUserResult$ || (exports.MessagingUserResult$ = MessagingUserResult$ = {}));
function messagingUserResultToJSON(messagingUserResult) {
    return JSON.stringify(exports.MessagingUserResult$outboundSchema.parse(messagingUserResult));
}
function messagingUserResultFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.MessagingUserResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MessagingUserResult' from JSON`);
}
//# sourceMappingURL=messaginguserresult.js.map