"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.SmsMessages$outboundSchema = exports.SmsMessages$inboundSchema = exports.SmsMessagesMessageType$outboundSchema = exports.SmsMessagesMessageType$inboundSchema = exports.SmsMessagesValue$outboundSchema = exports.SmsMessagesValue$inboundSchema = exports.SmsMessagesSourceValue$outboundSchema = exports.SmsMessagesSourceValue$inboundSchema = exports.SmsMessages4$outboundSchema = exports.SmsMessages4$inboundSchema = exports.SmsMessagesMessageContent$outboundSchema = exports.SmsMessagesMessageContent$inboundSchema = exports.SmsMessagesValue = void 0;
exports.smsMessagesMessageContentToJSON = smsMessagesMessageContentToJSON;
exports.smsMessagesMessageContentFromJSON = smsMessagesMessageContentFromJSON;
exports.smsMessages4ToJSON = smsMessages4ToJSON;
exports.smsMessages4FromJSON = smsMessages4FromJSON;
exports.smsMessagesSourceValueToJSON = smsMessagesSourceValueToJSON;
exports.smsMessagesSourceValueFromJSON = smsMessagesSourceValueFromJSON;
exports.smsMessagesMessageTypeToJSON = smsMessagesMessageTypeToJSON;
exports.smsMessagesMessageTypeFromJSON = smsMessagesMessageTypeFromJSON;
exports.smsMessagesToJSON = smsMessagesToJSON;
exports.smsMessagesFromJSON = smsMessagesFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const openEnums = __importStar(require("../../types/enums.js"));
/**
 * The unified message type.
 */
var SmsMessagesValue;
(function (SmsMessagesValue) {
    SmsMessagesValue["Email"] = "email";
    SmsMessagesValue["Sms"] = "sms";
    SmsMessagesValue["Push"] = "push";
    SmsMessagesValue["WebPush"] = "web_push";
    SmsMessagesValue["IosPush"] = "ios_push";
    SmsMessagesValue["AndroidPush"] = "android_push";
    SmsMessagesValue["AppPush"] = "app_push";
    SmsMessagesValue["OmniChannel"] = "omni_channel";
    SmsMessagesValue["ContentBlock"] = "content_block";
    SmsMessagesValue["InApp"] = "in_app";
    SmsMessagesValue["Unknown"] = "unknown";
    SmsMessagesValue["UnmappedValue"] = "unmapped_value";
})(SmsMessagesValue || (exports.SmsMessagesValue = SmsMessagesValue = {}));
/** @internal */
exports.SmsMessagesMessageContent$inboundSchema = z.object({
    body: z.nullable(z.string()).optional(),
    from: z.nullable(z.string()).optional(),
});
/** @internal */
exports.SmsMessagesMessageContent$outboundSchema = z.object({
    body: z.nullable(z.string()).optional(),
    from: z.nullable(z.string()).optional(),
});
function smsMessagesMessageContentToJSON(smsMessagesMessageContent) {
    return JSON.stringify(exports.SmsMessagesMessageContent$outboundSchema.parse(smsMessagesMessageContent));
}
function smsMessagesMessageContentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SmsMessagesMessageContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SmsMessagesMessageContent' from JSON`);
}
/** @internal */
exports.SmsMessages4$inboundSchema = z.object({});
/** @internal */
exports.SmsMessages4$outboundSchema = z.object({});
function smsMessages4ToJSON(smsMessages4) {
    return JSON.stringify(exports.SmsMessages4$outboundSchema.parse(smsMessages4));
}
function smsMessages4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SmsMessages4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SmsMessages4' from JSON`);
}
/** @internal */
exports.SmsMessagesSourceValue$inboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.SmsMessages4$inboundSchema),
    z.array(z.any()),
]);
/** @internal */
exports.SmsMessagesSourceValue$outboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.SmsMessages4$outboundSchema),
    z.array(z.any()),
]);
function smsMessagesSourceValueToJSON(smsMessagesSourceValue) {
    return JSON.stringify(exports.SmsMessagesSourceValue$outboundSchema.parse(smsMessagesSourceValue));
}
function smsMessagesSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SmsMessagesSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SmsMessagesSourceValue' from JSON`);
}
/** @internal */
exports.SmsMessagesValue$inboundSchema = openEnums.inboundSchema(SmsMessagesValue);
/** @internal */
exports.SmsMessagesValue$outboundSchema = openEnums.outboundSchema(SmsMessagesValue);
/** @internal */
exports.SmsMessagesMessageType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.SmsMessages4$inboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.SmsMessagesValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.SmsMessagesMessageType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.SmsMessages4$outboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.SmsMessagesValue$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sourceValue: "source_value",
    });
});
function smsMessagesMessageTypeToJSON(smsMessagesMessageType) {
    return JSON.stringify(exports.SmsMessagesMessageType$outboundSchema.parse(smsMessagesMessageType));
}
function smsMessagesMessageTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SmsMessagesMessageType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SmsMessagesMessageType' from JSON`);
}
/** @internal */
exports.SmsMessages$inboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    message_content: z.nullable(z.lazy(() => exports.SmsMessagesMessageContent$inboundSchema)).optional(),
    message_type: z.nullable(z.lazy(() => exports.SmsMessagesMessageType$inboundSchema))
        .optional(),
    name: z.nullable(z.string()).optional(),
    remote_id: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "message_content": "messageContent",
        "message_type": "messageType",
        "remote_id": "remoteId",
    });
});
/** @internal */
exports.SmsMessages$outboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    messageContent: z.nullable(z.lazy(() => exports.SmsMessagesMessageContent$outboundSchema)).optional(),
    messageType: z.nullable(z.lazy(() => exports.SmsMessagesMessageType$outboundSchema))
        .optional(),
    name: z.nullable(z.string()).optional(),
    remoteId: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        messageContent: "message_content",
        messageType: "message_type",
        remoteId: "remote_id",
    });
});
function smsMessagesToJSON(smsMessages) {
    return JSON.stringify(exports.SmsMessages$outboundSchema.parse(smsMessages));
}
function smsMessagesFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SmsMessages$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SmsMessages' from JSON`);
}
//# sourceMappingURL=smsmessages.js.map