"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 (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.smsMessagesFromJSON = exports.smsMessagesToJSON = exports.SmsMessages$ = exports.SmsMessages$outboundSchema = exports.SmsMessages$inboundSchema = exports.smsMessagesMessageTypeFromJSON = exports.smsMessagesMessageTypeToJSON = exports.SmsMessagesMessageType$ = exports.SmsMessagesMessageType$outboundSchema = exports.SmsMessagesMessageType$inboundSchema = exports.SmsMessagesValue$ = exports.SmsMessagesValue$outboundSchema = exports.SmsMessagesValue$inboundSchema = exports.smsMessagesSourceValueFromJSON = exports.smsMessagesSourceValueToJSON = exports.SmsMessagesSourceValue$ = exports.SmsMessagesSourceValue$outboundSchema = exports.SmsMessagesSourceValue$inboundSchema = exports.smsMessages4FromJSON = exports.smsMessages4ToJSON = exports.SmsMessages4$ = exports.SmsMessages4$outboundSchema = exports.SmsMessages4$inboundSchema = exports.smsMessagesMessageContentFromJSON = exports.smsMessagesMessageContentToJSON = exports.SmsMessagesMessageContent$ = exports.SmsMessagesMessageContent$outboundSchema = exports.SmsMessagesMessageContent$inboundSchema = exports.SmsMessagesValue = void 0;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const enums_js_1 = 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(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SmsMessagesMessageContent$;
(function (SmsMessagesMessageContent$) {
    /** @deprecated use `SmsMessagesMessageContent$inboundSchema` instead. */
    SmsMessagesMessageContent$.inboundSchema = exports.SmsMessagesMessageContent$inboundSchema;
    /** @deprecated use `SmsMessagesMessageContent$outboundSchema` instead. */
    SmsMessagesMessageContent$.outboundSchema = exports.SmsMessagesMessageContent$outboundSchema;
})(SmsMessagesMessageContent$ || (exports.SmsMessagesMessageContent$ = SmsMessagesMessageContent$ = {}));
function smsMessagesMessageContentToJSON(smsMessagesMessageContent) {
    return JSON.stringify(exports.SmsMessagesMessageContent$outboundSchema.parse(smsMessagesMessageContent));
}
exports.smsMessagesMessageContentToJSON = smsMessagesMessageContentToJSON;
function smsMessagesMessageContentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SmsMessagesMessageContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SmsMessagesMessageContent' from JSON`);
}
exports.smsMessagesMessageContentFromJSON = smsMessagesMessageContentFromJSON;
/** @internal */
exports.SmsMessages4$inboundSchema = z.object({});
/** @internal */
exports.SmsMessages4$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SmsMessages4$;
(function (SmsMessages4$) {
    /** @deprecated use `SmsMessages4$inboundSchema` instead. */
    SmsMessages4$.inboundSchema = exports.SmsMessages4$inboundSchema;
    /** @deprecated use `SmsMessages4$outboundSchema` instead. */
    SmsMessages4$.outboundSchema = exports.SmsMessages4$outboundSchema;
})(SmsMessages4$ || (exports.SmsMessages4$ = SmsMessages4$ = {}));
function smsMessages4ToJSON(smsMessages4) {
    return JSON.stringify(exports.SmsMessages4$outboundSchema.parse(smsMessages4));
}
exports.smsMessages4ToJSON = smsMessages4ToJSON;
function smsMessages4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SmsMessages4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SmsMessages4' from JSON`);
}
exports.smsMessages4FromJSON = smsMessages4FromJSON;
/** @internal */
exports.SmsMessagesSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.SmsMessages4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.SmsMessagesSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.SmsMessages4$outboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SmsMessagesSourceValue$;
(function (SmsMessagesSourceValue$) {
    /** @deprecated use `SmsMessagesSourceValue$inboundSchema` instead. */
    SmsMessagesSourceValue$.inboundSchema = exports.SmsMessagesSourceValue$inboundSchema;
    /** @deprecated use `SmsMessagesSourceValue$outboundSchema` instead. */
    SmsMessagesSourceValue$.outboundSchema = exports.SmsMessagesSourceValue$outboundSchema;
})(SmsMessagesSourceValue$ || (exports.SmsMessagesSourceValue$ = SmsMessagesSourceValue$ = {}));
function smsMessagesSourceValueToJSON(smsMessagesSourceValue) {
    return JSON.stringify(exports.SmsMessagesSourceValue$outboundSchema.parse(smsMessagesSourceValue));
}
exports.smsMessagesSourceValueToJSON = smsMessagesSourceValueToJSON;
function smsMessagesSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SmsMessagesSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SmsMessagesSourceValue' from JSON`);
}
exports.smsMessagesSourceValueFromJSON = smsMessagesSourceValueFromJSON;
/** @internal */
exports.SmsMessagesValue$inboundSchema = z
    .union([
    z.nativeEnum(SmsMessagesValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.SmsMessagesValue$outboundSchema = z.union([
    z.nativeEnum(SmsMessagesValue),
    z.string().and(z.custom()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SmsMessagesValue$;
(function (SmsMessagesValue$) {
    /** @deprecated use `SmsMessagesValue$inboundSchema` instead. */
    SmsMessagesValue$.inboundSchema = exports.SmsMessagesValue$inboundSchema;
    /** @deprecated use `SmsMessagesValue$outboundSchema` instead. */
    SmsMessagesValue$.outboundSchema = exports.SmsMessagesValue$outboundSchema;
})(SmsMessagesValue$ || (exports.SmsMessagesValue$ = SmsMessagesValue$ = {}));
/** @internal */
exports.SmsMessagesMessageType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.SmsMessages4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        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.lazy(() => exports.SmsMessages4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.SmsMessagesValue$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sourceValue: "source_value",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SmsMessagesMessageType$;
(function (SmsMessagesMessageType$) {
    /** @deprecated use `SmsMessagesMessageType$inboundSchema` instead. */
    SmsMessagesMessageType$.inboundSchema = exports.SmsMessagesMessageType$inboundSchema;
    /** @deprecated use `SmsMessagesMessageType$outboundSchema` instead. */
    SmsMessagesMessageType$.outboundSchema = exports.SmsMessagesMessageType$outboundSchema;
})(SmsMessagesMessageType$ || (exports.SmsMessagesMessageType$ = SmsMessagesMessageType$ = {}));
function smsMessagesMessageTypeToJSON(smsMessagesMessageType) {
    return JSON.stringify(exports.SmsMessagesMessageType$outboundSchema.parse(smsMessagesMessageType));
}
exports.smsMessagesMessageTypeToJSON = smsMessagesMessageTypeToJSON;
function smsMessagesMessageTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SmsMessagesMessageType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SmsMessagesMessageType' from JSON`);
}
exports.smsMessagesMessageTypeFromJSON = smsMessagesMessageTypeFromJSON;
/** @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",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SmsMessages$;
(function (SmsMessages$) {
    /** @deprecated use `SmsMessages$inboundSchema` instead. */
    SmsMessages$.inboundSchema = exports.SmsMessages$inboundSchema;
    /** @deprecated use `SmsMessages$outboundSchema` instead. */
    SmsMessages$.outboundSchema = exports.SmsMessages$outboundSchema;
})(SmsMessages$ || (exports.SmsMessages$ = SmsMessages$ = {}));
function smsMessagesToJSON(smsMessages) {
    return JSON.stringify(exports.SmsMessages$outboundSchema.parse(smsMessages));
}
exports.smsMessagesToJSON = smsMessagesToJSON;
function smsMessagesFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SmsMessages$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SmsMessages' from JSON`);
}
exports.smsMessagesFromJSON = smsMessagesFromJSON;
//# sourceMappingURL=smsmessages.js.map